Hello Camsoft Users;
I have an unusual problem that I did not run into before today. I am able to turn on/off the mist coolant and the flood coolant from on screen buttons. Forthermore, you can turn on the mist coolant from the handheld pendent unit and by using M07 and M08 commands.
To simplify code, I created a Macro to turn them off and handle the lights and on screen messages that needed to be addressed. Now the problem. If the [M9] macro runs during the drill cycle, the machine will halt and tell you that the axis have not reached their commanded positions. I did change the code so that it is everywhere I could think of and I do not get the error, but I am wondering if/why a drill Macro (or any other Macro) will be interrupted if another request is made to run a macro. the code is as follows:
[[G81]]
' G81
\200=f 'CAPTURE FEEDRATE
IF\775>0THENIF\525=1THEN GOTO :W DRILL ' Still in W-axis drill mode.
ISTHERE R;\28;\29
IF\28>0THEN\30=\29
ISTHERE W;\500;\501
IF\500>0THEN\777=\501:GOTO :W DRILL
ISTHERE Z;\400;\401
IF\400>0THEN\776=\401
\20=r
COMMAND VS \3
DECELSTOP:RAPID x;y;;w
COMMAND VS \3
DECELSTOP :RAPID ;;\20;w:SLEEP .1
DECELSTOP:GO x;y;\776;w:SLEEP .1
COMMAND VS \3
DECELSTOP
IF\998=0THENz=\30:RAPID x;y;\30;w:SLEEP .1:EXIT
IF\998=1THENz=\132:RAPID x;y;\132;w:SLEEP .1:EXIT
:W DRILL
\525=1 ' W-axis drill mode flag
IF\500>0THEN\777=\501
\134=\133
COMMAND VS \3
DECELSTOP:RAPID x;y;;w
COMMAND VS \3
DECELSTOP:RAPID ;;;r :SLEEP .1
DECELSTOP:GO x;y;;\777 :SLEEP .1
COMMAND VS \3
DECELSTOP
IF\998=0THENRAPID x;y;;\30:w=\30:EXIT
IF\998=1THENRAPID x;y;;\133:w=\133:EXIT
[[M9]]
'coolant off
BUTTON18 ;;;COOLANTOFF.BMP
BUTTON14 ;;;MISTCOOLANTOFF.BMP:\340=1'mist coolant interlock
#24=1:#103=0:#102=0:MESSAGE ALL COOLANT OFF
\91=0
Thank you