Mike,
What are your Homing/SoftLimits set in Mach4 Configuration?
I have included mine below in the attachment.
Yours will be different.
You need to have the correct Home Dir and also include the Soft Enable Soft Min Soft Max.
Regards,
Mauri.
Also another way is to install this code in Mach4 Screen "Start Script."
---------------------------------------------------------------
-- Ref All Home() function.
---------------------------------------------------------------
function RefAllHome()
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')
end
---------------------------------------------------------------
-- Ref All Home With Offset() function.
---------------------------------------------------------------
function RefAllHomeWithOffset()
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
mc.mcCntlGcodeExecute(inst, "G1 X0.1 Y0.1 Z0.1 F30")
wx.wxMessageBox('Referencing and Offset Completed')
end