I am having a strange issue I can't seem to get my head around. I have the ESS which works fine, and I also have the Pokeys Plugin which I have been attempting to turn into a pendant. Much of that works as well.
I have defined Port3-Pin16 on the ESS as SERVO ON, then inside of MACH4, i define Enable#2 as SERVO ON.
I use a relay enabled by Port3-Pin16 to enable the servo drivers, that all works perfect. I can run gcode and that all works the servos are enabled.
Now when I move my Axis selector switch on my pendant that disables MACH4?
If I don't touch the pendant the message "No Axis Selected" prints on the console. I just put these messages in to verify it was seeing the switches. I can even comment out those messages for like the A Axis, the next switch position next to OFF, but it still disables MACH4.
If I enable Mach4 after this happens then I can use the pendant and jog the given axis. I must be doing something wrong here and can't seem to figure out where I went wrong.
Any help or suggests are welcome, I am sure I did something stupid. I remember this code all working before?
ESS Port3-Pin16 defined as SERVO ON
Mach4 Enable#2 SERVO ON
LUA code
if XSelect == 1 then
mc.mcMpgSetAxis(inst,0,0) -- X Axis
mc.mcCntlSetLastError(inst,"X Selected")
mc.mcSignalSetState(PenHandleLED,1)
mc.mcCntlSetLastError(inst,"Handle LED ON")
elseif YSelect == 1 then
mc.mcMpgSetAxis(inst,0,1) -- Y Axis
mc.mcCntlSetLastError(inst,"Y Selected")
mc.mcSignalSetState(PenHandleLED,1)
elseif ZSelect == 1 then
mc.mcMpgSetAxis(inst,0,2) -- Z Axis
mc.mcCntlSetLastError(inst,"Z Selected")
mc.mcSignalSetState(PenHandleLED,1)
elseif ASelect == 1 then
mc.mcMpgSetAxis(inst,0,3) -- A Axis
mc.mcCntlSetLastError(inst,"A Selected")
-- mc.mcSignalSetState(PenHandleLED,1)
elseif OFFSelect == 1 then
mc.mcMpgSetAxis(inst,0,-1) -- No Axis
mc.mcCntlSetLastError(inst,"No Axis Selected")
mc.mcSignalSetState(PenHandleLED,0)
end