587,748 active members*
2,893 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > Parameter for current active tool!
Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2010
    Posts
    0

    Parameter for current active tool!

    Hi All,

    I'm developing a new macro for our machine, running on a Fanuc 31i controller. In this macro I want to check if the current tool is the touch probe, something like an if/then structure: IF[#xxxx=16]THENGOTO20. Block N19 could be a skip to the end N999 with an error #3000=999(wrong tool).

    The trouble is I don't know the parameter position for the current active tool.

    Can anyone help me out:idea: Or improve me coding

    LVX

  2. #2
    Join Date
    Aug 2007
    Posts
    793
    I don't know how it's made on 31i, but on 0T series it's current value of some counter in PMC
    its content you may see on diagnostic screen
    but i'm not sure you can read it out from there

  3. #3
    Join Date
    Feb 2006
    Posts
    338
    For the 16i #4120 is the last T number called, and #4111 is the last H number called.
    The 31i should be the same.

    Be aware that if you pre-call tools it picks up the pre call tool number rather than the tool in the spindle.

    AKA
    T14
    M6
    G43 H14 ... some code
    T15
    ... more code
    #1 = #4120 (will equal 15 even though 14 is in the spindle)
    #2 = #4111 (will equal 14)

    I use #4120 to automatically activate tool length comp in a M6 macro. When I call Dia. comp, I then use D#4111 If I need to change tool numbers for a program, I just have the T calls one at the M6 and one (pre-call) after the previous tool change. The offset is always for the right tool.

  4. #4
    Join Date
    Feb 2010
    Posts
    0
    thanx dpuch,

    That was a good push in the right direction.

    I checked the 31i manual for the parameter #4120, there it is explained to be the modal information on blocks that even been specified in the last minute for the T code. That sure sounds good, but a few lines down #4320 is explained to be modal information on blocks currently being executed for the T code. That sounds even better, correct?

  5. #5
    Join Date
    Mar 2005
    Posts
    988
    Some places will take #4120 and write it to a common variable in the Tool Change Macro to use in the program. For example, in the ATC macro, there would be a line added that might say "#599=#4120". Then in your probe program, you can go and check #599 to confirm the tool in the spindle.
    It's just a part..... cutter still goes round and round....

  6. #6
    Join Date
    Feb 2006
    Posts
    338
    Quote Originally Posted by LVX View Post
    #4320 is explained to be modal information on blocks currently being executed for the T code.
    Some controls only have the one set #41xx while others have both. Either can usually be made to do what you want, you just have to write the macro code accordingly.

    Test your program carefully, and pay attention to block look ahead. Try comparing results with single block on and running normal to make sure you always get the same result.

  7. #7
    Join Date
    Jun 2008
    Posts
    1511
    Psyco’s example would be the easiest to check for or incorporate into the macro. #4120 is for the modal T value being used. It sounds like to me that you are looking for a system variable that tracks the current tool in the spindle. Guhl touched on this as it is sometimes tracked in the PMC parameters. However to have a system variable that tracks this is up to the MTB. For example on some of my 15 series fanucs it is #1033 for the current tool in the spindle. Check the MTB manual it should tell you if one is set up to track the tool in the spindle.

    If not system variable is used then psyco’s idea should work. Put #599=#4120 in the tool change program probably right before the M99 is going to be the best place. Then in your probe program put the code to alarm or skip the tool.

    IF[#599EQ16]GOTO1000


    N1000#3000=1(WRONG TOOL)

    Stevo

  8. #8
    Join Date
    Feb 2010
    Posts
    0
    thanx guys,

    This is really helpful information.
    I'm trying to finish my macro and hopefully start the test runs next week.

Similar Threads

  1. can we read the current status of a parameter
    By sinha_nsit in forum Fanuc
    Replies: 12
    Last Post: 12-07-2009, 01:44 PM
  2. Current tool # variable
    By hydrospin01 in forum Fanuc
    Replies: 6
    Last Post: 07-15-2008, 07:32 PM
  3. Current Tool Status
    By barbter in forum NCPlot G-Code editor / backplotter
    Replies: 5
    Last Post: 07-11-2008, 03:09 AM
  4. Active high vs. Active low
    By aaronkeit in forum Gecko Drives
    Replies: 0
    Last Post: 08-22-2007, 08:57 AM
  5. Active High/Active Low
    By Sanghera in forum CNC Machine Related Electronics
    Replies: 21
    Last Post: 11-07-2004, 03:47 AM

Tags for this Thread

Posting Permissions

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