OK, I've spent an embarrasingly long time scratching my head on this one. I'm mapping some physical buttons to Gcode start/Feed hold and Stop. The buttons work fine, however for some reason I am unable to get the following code to switch between cycle start and feed hold.
I have tried a couple of different signals to indicate that gcode is running, neither mc.mcCntlIsInCycle nor mc.OSIG_RUNNUNG_GCODE work.
[mc.ISIG_INPUT8] = function (state) -- Console Start/Feed Hold button
local inst = mc.mcGetInstance()
local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_RUNNING_GCODE);
local holdState = mc.mcSignalGetState(sigh);
if (state == 1) then
if (holdState == TRUE) then
wx.wxMessageBox('This feed had better be held!');
mc.mcCntlFeedHold (inst)
else
CycleStart()
end
end
end,
I'm clearly missing something obvious