586,117 active members*
3,471 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > System Variable for Tool in Spindle
Results 1 to 13 of 13
  1. #1
    Join Date
    Jan 2009
    Posts
    39

    System Variable for Tool in Spindle

    Gentlemen,
    Correct me if I'm wrong, on Fanuc controls there is no system variable for tool in spindle like mazak has on there fusion 640m contol (#51999) ? The closest thing would be #4120= modal T code. :cheers:

  2. #2
    Join Date
    Jun 2008
    Posts
    1511
    This is depends on if the MTB set one up or not. You would have to check the MTB manual to find out. If there is not one you can set up a common variable to track the tool in the spindle #500-#999 if need be. I do this in all of my macro programs if the MTB did not set one.

    What fanuc control are you using and what are you trying to do. There are always alternatives.

    Stevo

  3. #3
    Join Date
    Aug 2009
    Posts
    684
    I haven't found anything better to use - I transfer it to a common variable inside M6 macro so that it can be referenced even after the next T is specified in the main program.

    Our control has a Tool Management screen that knows what tool is in the head and waiting pot, and these can be set if necessary to recover after a Tool Change problem. This seems to be independant to #4120 so it must be storing these values somewhere else in the exec. macros #10000+, but I haven't found it yet.

    DP

  4. #4
    Join Date
    Jan 2009
    Posts
    39

    Question System Variable for Tool in Spindle

    Stevo
    Sorry, it's 18I and I'm using a reneshaw TS27R tool probe and when using macro 9851 it uses T argument for length offset. I would like to send tool in spindle to a common variable so the operator does not have the wrong tool in spindle and the wrong offset in argument T so it would look something like this:
    #540=#4120(system variable for modal T code)
    G65P9851T#540

    But I think system variable for tool in spindle instead of #4120 would be more fool proof.

  5. #5
    Join Date
    Mar 2003
    Posts
    2932
    I found the system variable for the tool in the spindle on a Doosan HM6300 with Fanuc 31i! Probably doesn't help you, though as I can't find it in the 18i manual.

    #1032 - #1035 are interface input signals (long). This particular one was stored in #1035. You might try reading #1032 to #1035 to see if they exist:

    #102=#1032
    #103=#1033
    #104=#1034
    #105=#1035

    In this case, #105 was 40 when T40 was in the spindle.

  6. #6
    Join Date
    Jun 2008
    Posts
    1511
    I would first try as Dave said to check your system variables to see if one actually is tracking the tool in the spindle or if you have the MTB manual it should be in there.

    Ok I am going to try and take a stab at what you are trying to accomplish and ask a few questions along the way.

    If you designated say pocket 1 or T1 as your probe then your argument should always read G65P9851T1 so the correct tool is always used yes?

    Or are the operators allowed on there own to command this line G65P9851T1 and you don't want them to say accidentally type G65P9851T6. If this is the case then I would maybe add a line in the beginning of the macro program 9851 a condition like
    IF[#20NE1]GOTO1000
    ...
    N1000#3006=1(WRONG TOOL)

    Or you could write a common variable to track the tool in the spindle in your tool change program as already suggested.

    I really don't see any benefit to the code that you posted as it will only set the #540 equal to the tool you call and it can be any tool the operator decides to type in T6, T2, T10 etc. Even if he called the wrong tool to the spindle it is still going to use that tool to run the probing. Please let me know if I am completely missing the point.

    Stevo

  7. #7
    Join Date
    Feb 2006
    Posts
    1792
    Quote Originally Posted by dcoupar View Post
    I found the system variable for the tool in the spindle on a Doosan HM6300 with Fanuc 31i! Probably doesn't help you, though as I can't find it in the 18i manual.

    #1032 - #1035 are interface input signals (long). This particular one was stored in #1035. You might try reading #1032 to #1035 to see if they exist:

    #102=#1032
    #103=#1033
    #104=#1034
    #105=#1035

    In this case, #105 was 40 when T40 was in the spindle.
    Good information!
    #1033, 34, 35 are not Fanuc-defined. Must be MTB-defined.
    I guess, manual tool change updates #1035, on this machine.

  8. #8
    Join Date
    Aug 2009
    Posts
    684
    Ditto for HM1000 - #1035

  9. #9
    Join Date
    Jan 2009
    Posts
    39
    To answer stevo1 questions:
    Macro 9851 is being used to touch off tools on a TS27R tool setter probe.
    Right now the operator has to edit argument T with the right tool they are touching off. So if they are touching off tool 20, but have G65P9851T5 the length of tool 20 will go in to length offset for tool 5. So that is why I'm looking for a way to monitor tool in spindle and transfer to a common variable to try and make it fool proof example:

    #540=system variable for tool in spindle.
    G65P9851T#540

    I hope this makes what I'm trying to do a little more clear. Thanks :cheers:

  10. #10
    Join Date
    Mar 2003
    Posts
    2932
    Quote Originally Posted by sinha_nsit View Post
    Good information!
    #1033, 34, 35 are not Fanuc-defined. Must be MTB-defined.
    I guess, manual tool change updates #1035, on this machine.
    They are Fanuc system variables on the 31i and 0i-D. I've never seen them in the manual prior to these.

  11. #11
    Join Date
    Feb 2006
    Posts
    1792
    Quote Originally Posted by dcoupar View Post
    They are Fanuc system variables on the 31i and 0i-D. I've never seen them in the manual prior to these.
    So, Fanuc has finally taken care of this issue. Not yet known to everybody. I came to know about it today.

  12. #12
    Join Date
    Jun 2010
    Posts
    161
    Just to provide clarification, #1035 is a general purpose read-only variable within the part program. The MTB sets a 32 bit value in Gn284 - Gn287 in the PMC Ladder that is read in the part program as #1035.

    FANUC also provides communication from part program -> PMC Ladder. #1132 - #1135 can be set in the part program side and read in the PMC Ladder with Fn284 - Fn287.

    6001.0 (MIF) = 1 in order to use all of the above variables.

  13. #13
    Join Date
    Jun 2008
    Posts
    1511
    It is crystal clear now and it makes perfect sense what you are trying to do. Ok so these are a few options. If you do not have the MTB manual that says if you have system variable to track the tool in the spindle you can do a down and dirty check by programming the following.

    #1=0
    #2=0
    WHILE[#1LT35]DO1
    #[100+#2]=#[1000+#2]--(#100-#135 will be equal to #1000-#1035 in seq. )order
    #[136+#2]=#[1100+#2]--(#136-#171 will be equal to #1100-#1135 in seq. )order
    #1=#1+1
    #2=#2+1
    END1
    M30

    Now your common variables #100-#135 are set to #1000-#1035 in sequential order. #136-#171 are set to #1100-#1135. Look at the variables and see if any one of them are set to the current tool in the spindle. If so then do a tool change to a different tool number and run the program again. If it is the same variable that changed to the tool in the spindle you have found your tool tracking parameter.

    Now if the above does not work and you have no system variable to track the tool then you can set one up in a tool change macro using one of your common variables from #500-#999. In your program you can set say #500=#4120 so that every time you program a M6T() it will set #500 to the tool that you are calling. This is just an example and the #500 should actually be set after the M6 in the macro to ensure it is set properly. After that is complete I would first off set a custom code like G37 or something like that to call the tool offset program and now in the program you can use T#500.

    What that breaks down to is all the operator has to do is program G37 and its all automatic after that. Very little chance for error.

    Stevo

Similar Threads

  1. Dry-run system variable?
    By machzero in forum Okuma
    Replies: 12
    Last Post: 05-21-2015, 01:13 PM
  2. system variable for tool in spindle
    By ggborgen in forum Fanuc
    Replies: 7
    Last Post: 07-15-2010, 07:29 AM
  3. System Variable Z Work Shift
    By ggborgen in forum Parametric Programing
    Replies: 3
    Last Post: 11-26-2009, 06:57 AM
  4. System variable for tool in ready position
    By Dana099 in forum Mazak, Mitsubishi, Mazatrol
    Replies: 5
    Last Post: 07-20-2007, 09:30 PM
  5. System variable for spindle tool Fanuc 15m
    By pieface in forum Fanuc
    Replies: 8
    Last Post: 06-01-2006, 12:37 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
  •