This is driving me crazy - the good news is it is a very short trip!
I found the correct (I think) command for setting the laser power. I tried this:
function M3()
inst=mc.mcGetInstance()
mc.mcCntlSetLastError(inst, 'Spindle Clockwise')
mc.mcSpindleSetDirection (inst, 1)
mc.mcSpindleSetCommandRPM(inst, 1 )
end
if (mc.mcInEditor()==1) then
m3()
end
Did not work. Then I thought it may need the RPM before the command to turn on so I moved it - still does not work. Dang
I know I should be testing these before I use them, but not sure how? For example, I have this code on a button and it works well, but I don't seem to be able to get it to work elsewhere.
local inst = mc.mcGetInstance();
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);
local rpm = 1; -- Set this to the actual RPM you want as your starting point
mc.mcSpindleSetCommandRPM( inst, rpm );
end
I would like to achieve the same function with a ShuttlePro button. I don't mind reading about how to do this, but I don't know where. Also, I would rather not learn LUA to set a ShuttlePro button.
Alms for the confused???