OK, sorted the typo...
Spindle start by toggle from first go, hmmm?
Are the #vars saved when Mach is closed?
If yes then it would start in the same rotation as left the day before - good or bad, I don't know.
If no then it would start forwards the first time as the #var would be zero, I guess we can add a reset macro to the INIT line that sets the #var however we want for the first time?
Depends if it's an issue or not i guess
If GetOEMLed(164) Then 'was running forwards
SetVar(1601,0)
DoSpinStop()
ElseIf GetOEMLed(165) Then 'was running reverse
SetVar(1601,1)
DoSpinStop()
Else 'was not running
If GetVar(1601)=0 Then
DoSpinCW()
Else
DoSpinCCW()
End If
End If