11
Mach4 General Discussion / New to jogging/ non g-code moves
« on: January 30, 2020, 10:34:23 PM »
I am working on a sanding machine, and I want to be able to move away from the sanding surface quickly if I get an overload signal from the sanding motor.
I was thinking if I make each pass as a jog with the y axis, the z axis could be operated independently and moved away from the surface of the part while the y axis was still moving.
I was trying to test the mc.mcJogIncStart function with the following code:
function m91002()
local inst = mc.mcGetInstance()
rc = mc.mcJogIncStart(inst, 0, -.2)
if rc ~= mc.MERROR_NOERROR then
wx.wxMessageBox("failure")
end
end
I get the message "failure" when I run m91002 in the MDI, but if I remove the "function m91002()" at the beginning of the code, it works one time.
Any ideas about what I am missing or doing wrong? Also if anyone feels that there is a better way to go about this, I'm all ears!
Thanks,
David
I was thinking if I make each pass as a jog with the y axis, the z axis could be operated independently and moved away from the surface of the part while the y axis was still moving.
I was trying to test the mc.mcJogIncStart function with the following code:
function m91002()
local inst = mc.mcGetInstance()
rc = mc.mcJogIncStart(inst, 0, -.2)
if rc ~= mc.MERROR_NOERROR then
wx.wxMessageBox("failure")
end
end
I get the message "failure" when I run m91002 in the MDI, but if I remove the "function m91002()" at the beginning of the code, it works one time.
Any ideas about what I am missing or doing wrong? Also if anyone feels that there is a better way to go about this, I'm all ears!
Thanks,
David