Yes. It mentioned something about axis not properly datumed. I got a reply on the General Forum which more or less said disregard it as it detects things that are unusual, and as I started messing with the code then this was to be expected.
Anyway, good news! Not sure how or why but the SendSerial command is now working fine so I started experimenting with a little bit of coding on the RAH switch which works well.
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )
Sleep(100)
While IsMoving()
Sleep(100)
Wend
DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)
SendSerial("B0000133E167R25")
Sleep 3000
SendSerial("D44")
The first SendSeial is to check whether air is present and the D44 datums the carousel stepper motor.
I dont think the DoOEMButton 133, 134 and 135 are used as I don't have encoders fitted so I will delete these tomorrow and see if all works well. I will also remove the 2nd Sleep command and replace it with an input from the ATC that runs D44 when the ATC relay changes over after the first procedure completes.
With my new found confidence, and with many thanks to you TP, i have started to work on my Toolchanger screen for Mach3. I have tested the basic commands and they work too. Yippee!
The next big question is whether to have my tool offsets held within Mach or my CAM program. My first thought was to have them within Mach so I could use the machine manually as well as fully automatic but i wasn't sure if the CAM will try and bring across tool offsets of, say zero, when I load the Gcode?