Apologies for this rather basic question, but I've just spent 3 days trying to get the Cycle START, Feed HOLD and Cycle STOP buttons working on my control panel, and only today realised that it needs some code written in the screen editor!
Thanks to a search on here I managed to get the buttons working (at least they seem to be) by adding the following:
SigLib = {
[mc.OSIG_MACHINE_ENABLED] = function (state)
machEnabled = state;
ButtonEnable()
end,
[mc.ISIG_INPUT0] = function (state)
end,
-- The following three blocks enable the buttons on the control panel to work
[mc.ISIG_INPUT0] = function (state)
if (state == 1) then
CycleStart() --0 G Code executed when Cycle START button is pressed
end
end,
[mc.ISIG_INPUT1] = function (state)
if (state == 1) then
mc.mcCntlFeedHold(0) --Stepper motors stop when Feed HOLD button is pressed,
-- spindle remains running, code can be resumed from the same point
end
end,
[mc.ISIG_INPUT2] = function (state)
if (state == 1) then
CycleStop(0) -- Stepper motors and spindle are stopped, cycle is aborted
end
end,
I'd be very grateful if someone could check that it is going to perform as it should, and in particular whether "then.. mc.mcCntlFeedHold(0)" and "then.. CycleStop(0)" are the correct form to use for this. Many thanks. Steve.