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


LinkBack URL
About LinkBacks




