This is my G111 Toolchange Macro.
It was written by out applications engineer to support a T0 call to have the machine take out the tool in the spindle.
I have notes on how to register the macro I will post later.
OTCHK
( SET GCODE PARAM. G111 TO OTCHK )
( AT TOOL CHANGE KEY IN G111 T= TOOL NO. Q = NEXT TOOL EX. G111 T1 Q2)
IF [ PT EQ 0 ]NSKP1
IF [ VTLCN EQ PT ]NST1 (ACTIVE TOOL)
IF [ VTLNN EQ PT ]NRT1 (NEXT TOOL)
IF [ VTLNN EQ 0 ]NOT1 (NEXT TOOL)
M64
NOT1 T=PT
NRT1 M06
NST1
IF [ PQ EQ EMPTY ]NEND (if ready tool empty/jump )
IF [ VTLNN EQ PQ ]NEND (if next called tool is at next tool pos./jump)
IF [ VTLNN EQ 0 ]NTT1 (if next tool has no value)
M64 (next tool pot back up)
NTT1
T=PQ
M356 (next pot down)
NEND
IF [ PW EQ EMPTY ]NEND2 (if ready tool empty/jump )
NEND2
GOTO NEND3
NSKP1
IF [ VTLCN EQ 0 ]NEND3 (ACTIVE TOOL)
IF [ VTLNN EQ 0 ]NSKP2 (NEXT TOOL)
M64
NSKP2
M63
M06
NEND3
RTS
pq def. when p is attached to a letter it become readable
It was written by out applications engineer to support a T0 call to have the machine take out the tool in the spindle.
I have notes on how to register the macro I will post later.
OTCHK
( SET GCODE PARAM. G111 TO OTCHK )
( AT TOOL CHANGE KEY IN G111 T= TOOL NO. Q = NEXT TOOL EX. G111 T1 Q2)
IF [ PT EQ 0 ]NSKP1
IF [ VTLCN EQ PT ]NST1 (ACTIVE TOOL)
IF [ VTLNN EQ PT ]NRT1 (NEXT TOOL)
IF [ VTLNN EQ 0 ]NOT1 (NEXT TOOL)
M64
NOT1 T=PT
NRT1 M06
NST1
IF [ PQ EQ EMPTY ]NEND (if ready tool empty/jump )
IF [ VTLNN EQ PQ ]NEND (if next called tool is at next tool pos./jump)
IF [ VTLNN EQ 0 ]NTT1 (if next tool has no value)
M64 (next tool pot back up)
NTT1
T=PQ
M356 (next pot down)
NEND
IF [ PW EQ EMPTY ]NEND2 (if ready tool empty/jump )
NEND2
GOTO NEND3
NSKP1
IF [ VTLCN EQ 0 ]NEND3 (ACTIVE TOOL)
IF [ VTLNN EQ 0 ]NSKP2 (NEXT TOOL)
M64
NSKP2
M63
M06
NEND3
RTS
pq def. when p is attached to a letter it become readable