Hi,
I've made an Arduino MPG with pulse generator which is connected to Mach4 via serial. Everything works. Sends and receives data. However I can't get Mach4 to jog smooth and continuous jogging. When I turn the wheel the axis moves the amount of the increment and stops then again. What I want is, when I turn the wheel slow I want the selected axis move slow but continuously. And wise versa: as when I accelerate spinning the wheel I want the axis act the same and move fast. You know, I just want what we all want
The code is simple. When mach receives "I" or "D" from serial pendant mach gets the selected axis and jog increment then jogs the axis with it.
How can I change the to have a nice and smooth jog? I'm open to all suggestions.
Thanks.
elseif Command == "I" then
--mc.mcCntlSetLastError(inst, "Jog INC")
JogInc=mc.mcJogGetInc(inst,0)
MPGAxis = mc.mcMpgGetAxis(inst, 0)
if(mc.mcAxisIsStill(inst,MPGAxis)) then
mc.mcJogIncStart(inst, MPGAxis, JogInc)
end
elseif Command == "D" then
--mc.mcCntlSetLastError(inst, "Jog DEC")
JogInc=mc.mcJogGetInc(inst,0)
MPGAxis = mc.mcMpgGetAxis(inst, 0)
if(mc.mcAxisIsStill(inst,MPGAxis)) then
mc.mcJogIncStart(inst, MPGAxis, -1 * JogInc)
end
end