Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: Tony Bullard on March 09, 2022, 09:35:27 AM
-
I think I understand that the OB axis motor has the same setting and the Z axis motor and the OB axis can be controlled with jog commands but how is the OB axis superimposed on the Z axis?
Thanks for any explanation or coding examples.
-
Hi,
I don't think an OB axis can be superimposed exactly. My understanding is that "Axis Overload' is employed. Thus tyhe Z axis motor is controlled by the Mach normally
but the 'overload component' adds or subtract a few steps to the Z axis.
Try searching for overload axis.
Craig
-
Thank you Craig and that explains it well to to me.
It lead me to Axis Override. I setup a button to test the OB6 axis override of the Z axis. It woks well with this code:
--in button script
--left button down script
local inst = mc.mcGetInstance()
-- Set the axis 6 to be the override axis for the Z axis.
mc.mcAxisSetOverrideAxis(inst, mc.AXIS6, mc.AXIS2);
-- Set the Z axis jog accel percentage to 25%.
rc = mc.mcJogSetAccel(inst, mc.AXIS6, 25);
-- Set the jog rate to 20% of the Z axis maximum velocity.
rc = mc.mcJogSetRate(inst, mc.AXIS6,20)
-- Start Z axis jogging in positive direction
rc = mc.mcJogVelocityStart(inst, mc.AXIS6, 1);
--in button script
--left button up script
local inst = mc.mcGetInstance()
mc.mcJogVelocityStop(inst, mc.AXIS6); -- Stop the axis.
-- Remove axis 6 from the Z axis.
mc.mcAxisRemoveOverrideAxis( inst, mc.AXIS6, mc.AXIS2 );
You are a great asset to this forum. Thank you again.
Tony