585,749 active members*
3,975 visitors online*
Register for free
Login
Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2008
    Posts
    74

    Reading offset values

    Hello all,
    I have gotten a lot of help on this forum before on lathe offsets, see if anybody can help me on this one. I am using the Fanuc 21i-t and 21-TB controls. When I set my workshift value, I use something like this "G10 P0 Z-3.25". Now I am wondering if it is possible to read this value into a variable so I can use it in further calculations? Is there a certain parameter that the workshift is stored in?

  2. #2
    Join Date
    Jun 2008
    Posts
    1511
    Yes this is setting the “common” workshift correct? I did not see the L2 in the line but I ass u me it is still setting it properly. Anyway there are variables that are set to the common. IIRC it should be #5201=X, #5202=Y and #5203=Z.

    So you can set this up however you want. The best way to do it would be to just use the #5203 in your calculations or change it to a common variable right after your G10 line.

    G10P0Z-3.25
    #500=#5203

    You can then use the #500 later in your calculations. The downside to this is if someone makes a manual change to your Z in the common offset then the #500 will not be updated to the current value.

    Stevo

  3. #3
    Join Date
    Jan 2008
    Posts
    74
    Ok, thanks for the info. But when I type in #1 = #5203, I get an error message, "Illegal variable number". When I try the same thing with variable #3000, the value of 3000 gets copied into 1. Is there another way to check the value of the system variables? Maybe my machine doesn't support these 52xx variables?

  4. #4
    Join Date
    Jun 2008
    Posts
    1511
    That’s odd. Your machine should support it. Try #5201 as this should relate to your X position in common, just to see if it works. You are on a lathe so it could be #5201 for X and #5202 for Z and you have no #5203. I don’t have any manuals in front of me at the moment to confirm this.

    There are other options to what you are trying to achieve. This is just an example and still holds true to what I said earlier if someone changes the common in the offset page then the variable you use in the calculation will not match what it actually is.

    #1=-3.25
    G10P0Z#1

    You can then use the #1 later in the program.

    Stevo

  5. #5
    Join Date
    Jan 2008
    Posts
    74
    No difference, 5201 and 5202 both cause error message as well, any more ideas?

  6. #6
    Join Date
    Jun 2008
    Posts
    1511
    You do have work offsets on the machine, correct? IOW you have G54-G59.

    Stevo

  7. #7
    Join Date
    Mar 2003
    Posts
    2932
    Quote Originally Posted by crazycnc View Post
    Hello all,
    I have gotten a lot of help on this forum before on lathe offsets, see if anybody can help me on this one. I am using the Fanuc 21i-t and 21-TB controls. When I set my workshift value, I use something like this "G10 P0 Z-3.25". Now I am wondering if it is possible to read this value into a variable so I can use it in further calculations? Is there a certain parameter that the workshift is stored in?
    On a 21-TB and the 21i-TB, #2501 is the X work coordinate shift, and #2601 is the Z work coordinate shift.

  8. #8
    Join Date
    Jun 2008
    Posts
    1511
    Quote Originally Posted by dcoupar View Post
    On a 21-TB and the 21i-TB, #2501 is the X work coordinate shift, and #2601 is the Z work coordinate shift.
    I thought that was for the tool geometry offsets??

    Well there you go crazy….my bad, give those a shot.

    Stevo

Similar Threads

  1. Are lathe offset values on radius or diameter?
    By sinha_nsit in forum Fanuc
    Replies: 5
    Last Post: 11-06-2009, 03:46 PM
  2. Reading workingoffset values
    By rui.costa in forum G-Code Programing
    Replies: 4
    Last Post: 12-20-2007, 09:27 AM
  3. Offset values get changed
    By sab in forum Uncategorised MetalWorking Machines
    Replies: 0
    Last Post: 06-28-2007, 05:42 AM
  4. wire offset values
    By Stevatome in forum Fanuc
    Replies: 4
    Last Post: 03-09-2007, 02:42 PM
  5. NC reading tool length from offset page, not data page..?
    By RMagnusson in forum Mazak, Mitsubishi, Mazatrol
    Replies: 1
    Last Post: 03-21-2006, 11:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •