![]() | |
| 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
| |||
| |||
I wish to insert an error trap in a macro, to detect whether or not the spindle is rotating. I thought to check the value of #4113, which would store 3 if M03 is active. But the problem is that it would store (I believe) only the last commanded M-code. So, if M08 is commanded after M03, #4113 would contain 8. Then, how to check if M03 has been commanded in the calling program? Or, is it not possible? |
|
#2
| |||
| |||
| You care correct you would not be able to use #4113 because it will change based on the M-code programmed at the time. Just an idea but you could use the #4119 for the S() command. This is not exactly what you want but at least you can turn the spindle on if it is not running. But this would bring up another issue of was there an S() command programmed. If there was then you could write in your macro a M3S#4119. This would turn the spindle on to the programmed S value. Now if you were worried about no spindle speed being commanded then you could write a condition before that line with a minimum spindle speed setting. If the spindle speed is less then that then alarm out. So if it was never programmed then it would be 0. Example would be anything less then S10 alarm out. If not then start spindle rotation at programmed S(). IF[#4119LT10]GOTO1000 MSS#4119 … N1000 #3000=1(NO SPINDLE SPEED COMMANDED) Stevo |
|
#4
| |||
| |||
| I don’t know if you will need a S() with the M3 or will it take the modal #4113 no matter what. I think you will find that even though a S() was given in the main program that the M3 alone in the macro will not turn it on. You will have to try it and see. Yes you can compare to #0 providing that the state of #4113 is null. I used a number only because if someone did program a S0 then comparing it to #0 will not make the function. IIRC the state of #4113 is null when no S is programmed. I am not 100% so you may want to try it. Stevo |
![]() |
| 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 |
| New Machine Build- variable speed pulley system (variator) | acourtjester | General Metal Working Machines | 8 | 07-20-2009 11:23 AM |
| Dry-run system variable? | machzero | Okuma | 3 | 06-12-2009 09:08 AM |
| Anyone have a complete list of system variable for a 18-I tb lathe?? | theemudracer | Fanuc | 6 | 11-18-2007 01:05 AM |
| System Variable for Pallet location | Jason812 | Fanuc | 7 | 11-05-2007 07:23 AM |
| System variable for spindle tool Fanuc 15m | pieface | Fanuc | 8 | 06-01-2006 06:37 AM |