Mach3 has "Go Home" on the numeric keypad, but I think Mach4 is difficult.
I attached the following script to the numeric keypad.
The motor turned and worked, but an error like the one in the picture was displayed.
Please tell me the solution.
-- Ref All Home() function.
if mc.mcSignalGetState (mc.mcSignalGetHandle (inst, mc.ISIG_INPUT60)) == 1 then
mc.mcAxisDerefAll(inst) --Just to turn off all ref leds
mc.mcAxisHomeAll(inst)
coroutine.yield() --yield coroutine so we can do the following after motion stops
----See ref all home button and plc script for coroutine.create and coroutine.resume
wx.wxMessageBox('Referencing is complete.\nSoft Limits Set.')
else
-- Do something else
end