74
« on: March 11, 2016, 01:40:54 PM »
tom|tom,
I am having problem with the } at the end of the code. I am getting "Unexpected character by }"
Here is the code I was using:
-- Turn on Laser at low power map to shuttle pro button 7
---------------------------------------------------------------
-- Signal Library
---------------------------------------------------------------
SigLib = {
[mc.OSIG_MACHINE_ENABLED] = function (state)
machEnabled = state;
scr.SetProperty('btnRefAll', 'Enabled', tostring(state));
scr.SetProperty('btnRefAll2', 'Enabled', tostring(state));
scr.SetProperty('btnGotoZero', 'Enabled', tostring(state));
scr.SetProperty('tabJogging', 'Enabled', tostring(state));
if (state == 1) then
AxisEnable();
end
end,
[mc.ISIG_INPUT7] = function (state)
local inst = mc.mcGetInstance();
local rpm = 1; -- Set this to the actual RPM you want as your starting point
mc.mcSpindleSetCommandRPM( inst, rpm );
mc.mcSpindleSetDirection( inst, 1 ); -- 1 == forward, 0 == off, -1 == reverse
}
-- End Turn on Laser at low power