Can you put up what these variables represent ?
VTLCN is current tool
VNTOL is next tool
Have you single blocked thru the code and checked the variables after each block ?
Could an additional block be inserted that would error if conditions are not meet ? ie IF [ VTLCN NEQ TOOL ] err "TOOL NOT LOADED" after the M6 line
We have ours set to replace the M6 code with a G-code
works a similar way, no T/C if the tool is in the spindle but goes to P1, if T/C required , it goes to P1 and T/Cs
let me know if you want a look at the G116 fileCode:N1999 M1 () N2000 G116 T3 ( Tool 3, H3, D3, dia=25mm) N2001 T4 () N2002 G15 H1
Have a look at this thread-post #6
OKUMA MA40 HA variables
extra ideas ?? maybe