Thought I posted this yesterday,
Haven't tested this but add these from the m4 API manual to your m3 macro:
rc = mc.mcSpindleSetCommandRPM(number mInst, number RPM)
rc = mc.mcSpindleSetDirection(number mInst, number dir)
or
rc = mc.mcSpindleSetDirectionWait(number mInst, number dir)
to find out what the true spindle speed is (assuming you have feedback setup):
RPM, rc = mc.mcSpindleGetTrueRPM(number mInst)
Also, from the screen load script you could add the applicable lines to your macro:
---------------------------------------------------------------
function SpinCW()
local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON);
local sigState = mc.mcSignalGetState(sigh);
if (sigState == 1) then
mc.mcSpindleSetDirection(inst, 0);
else
mc.mcSpindleSetDirection(inst, 1);
end
end
---------------------------------------------------------------
this is called from the 'Spindle CW' button
HTH
RT