I remapped M6. in the toolChange.ngc file, I have following:
; only execute this file if the requested tool is different tool in spindle
O100 IF [#<tool_in_spindle> NE #<selected_tool>]
(print, request tool different from loaded, start tc)
; debug code
G0 X5 Y5
o<toolchange> endsub 
I noticed after this file is executed, the default M6 is still called. e.g. the machine will still move to the predefined location and pop a message to ask me to change tools. if the tool request is different from the tool loaded, it will move to x5y5 first then move to the predefined location and pop the message.
any idea why?
I have this line in ini file: REMAP=M6 modalgroup=6 prolog=change_prolog ngc=toolchange epilog=change_epilog