This is the VB that I have in the M6Start macro, M6End is empty.
 'Toolchange macro for Chiron FZ12S
 
 Code "G53G0Y310Z-5M3S200"
 While IsMoving()
 Wend 
SetTool =GetSelectedTool() 
  
  tool = GetSelectedTool() Mod 12
  If Tool = 0 Then
  Tool = 12
  End If 
 
 Do                                       
 Call SetModOutput (tool,1)                  
 If GetInput (tool) Then Exit Do  
 Sleep 10 
 Loop 
 Call SetModOutput (tool,0)
 SetCurrentTool( SetTool )                                 
Hood