![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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 Or improve me coding![]() LVX |
|
#2
| ||||
| ||||
| 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
__________________ Soviet ICs are the largest ICs in the world!!! ))) |
|
#3
| |||
| |||
| 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
| |||
| |||
| 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
| |||
| |||
| 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.... |
| Sponsored Links |
|
#6
| |||
| |||
| 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
| |||
| |||
| 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 |
![]() |
| Tags |
| 31i, macro, tool |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| can we read the current status of a parameter | sinha_nsit | Fanuc | 12 | 12-07-2009 06:44 AM |
| Current tool # variable | hydrospin01 | Fanuc | 6 | 07-15-2008 01:32 PM |
| Current Tool Status | barbter | NCPlot G-Code editor / backplotter | 5 | 07-10-2008 09:09 PM |
| Active high vs. Active low | aaronkeit | Gecko Drives | 0 | 08-22-2007 02:57 AM |
| Active High/Active Low | Sanghera | General Electronics Discussion | 21 | 11-06-2004 08:47 PM |