--This will turn off motor 4 continuous rotation and reconfigure it back to an axis function m3001() local inst = mc.mcGetInstance("m3001()"); --stop jogging mc.mcJogVelocityStop(inst, mc.OB1_AXIS) --wait until the motor is stopped IsStopping = mc.mcJogIsStopping(inst, mc.OB1_AXIS) while (IsStopping == 1) do IsStopping = mc.mcJogIsStopping(inst, mc.OB1_AXIS) end --revert motor back to A-axis mc.mcAxisEnable(inst, mc.OB1_AXIS, false) mc.mcAxisUnmapMotor(inst, mc.OB1_AXIS, mc.MOTOR4) mc.mcAxisMapMotor(inst, mc.A_AXIS, mc.MOTOR4) mc.mcAxisEnable(inst, mc.A_AXIS, true) wx.wxMilliSleep(200) --wait a little so the motor doesn't clunk when it gets remapped mc.mcAxisDeref(inst,mc.A_AXIS) --deref A axis since its position is now unknown end if(mc.mcInEditor() == 1) then m3001() end