73
« on: July 01, 2018, 06:27:19 PM »
Open the Screen Load script in the screen editor and find the line:
SigLib = {
This is the beginning of the signal table. Now try inserting the following between 2 existing entries:
--AW: Set cycle start if user presses key assigned to Input0
[mc.ISIG_INPUT0] = function (state)
if (state == 1) then
CycleStart()
end
end,
--AW: Set feed hold or stop if user presses key assigned to Input1
[mc.ISIG_INPUT1] = function (state)
if (state == 1) then
local hSig = mc.mcSignalGetHandle(inst, mc.OSIG_RUNNING_GCODE)
local codeRunning = mc.mcSignalGetState(hSig)
if (codeRunning == 1) then
mc.mcCntlFeedHold(inst)
--CycleStop()
end
end
end,
Use your own inputs instead of inputs 0 and 1. That's all there is to it.
Allan