Hi
I've built a remote pendant with "Cycle Start", "Feed Hold", "Stop", "Disable" and "E Stop" physical buttons all working via entries in the "Signal Library" but I'd like to make the "Disable" a toggle for "Enable/Disable".
I've tried a number of option but cannot get it working. I can get the first press of the button to "Enable" and the "Disable" always works but on subsequent presses of the button the "Enable" is only active whilst I hold the button down.
Here are the "Signal Library" entries I've got going. (without anything for the "Enable" included)
[mc.ISIG_INPUT1] = function (state) -- Cycle Start external button
local inst = mc.mcGetInstance()
if (state == 1) then
CycleStart(inst)
end
end,
[mc.ISIG_INPUT2] = function (state) -- Feed Hold external button
local inst = mc.mcGetInstance()
if (state == 1) then
mc.mcCntlFeedHold(inst)
end
end,
[mc.ISIG_INPUT3] = function (state) -- STOP external button
local inst = mc.mcGetInstance()
if (state == 1) then
CycleStop(inst)
end
end,
[mc.ISIG_INPUT4] = function (state) -- Disable external button
local inst = mc.mcGetInstance()
if (state == 1) then
mc.mcCntlEnable(inst, 0) -- Disable
end
end,
Hoping someone can point me in the correct direction.
Thanks
Phil