Hello Guest it is October 18, 2019, 10:55:22 PM

Author Topic: Zero All  (Read 2947 times)

0 Members and 1 Guest are viewing this topic.

Zero All
« on: May 16, 2015, 12:51:13 PM »
I see button actions to zero the individual axes, but not a "Zero All".  Is there a way to zero all?  Maybe an equivalent to doOemButton() wher you can call the ZeroX, ZeroY and ZeroZ actions?

Thanks
Re: Zero All
« Reply #1 on: May 16, 2015, 02:03:27 PM »
I think you'd have to script a button and use rc = mc.mcAxisSetMachinePos(number mInst, number axis, number val) to zero the machine position and rc = mc.mcAxisSetPos(number mInst, number axis, number val) to zero the offset position where val = 0.
Would be nice to have an offset tab like M3.

Peter

Offline DazTheGas

*
  •  750 750
  • DazTheGas
    • View Profile
Re: Zero All
« Reply #2 on: May 16, 2015, 02:06:46 PM »
Make a new button in the editor and use something like the code below to zero DRO`s

Code: [Select]
local inst = mc.mcGetInstance()
mc.mcAxisSetPos(inst, 0, 0);
mc.mcAxisSetPos(inst, 1, 0);
mc.mcAxisSetPos(inst, 2, 0);
mc.mcAxisSetPos(inst, 3, 0);

DazTheGas
Theres always time for a choccy biccy
Re: Zero All
« Reply #3 on: May 16, 2015, 02:20:19 PM »
Thanks guys....Seems like everything has to be "coded" in M4.

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Zero All
« Reply #4 on: May 16, 2015, 08:18:32 PM »
Make a new button in the editor and use something like the code below to zero DRO`s

Code: [Select]
local inst = mc.mcGetInstance()
mc.mcAxisSetPos(inst, 0, 0);
mc.mcAxisSetPos(inst, 1, 0);
mc.mcAxisSetPos(inst, 2, 0);
mc.mcAxisSetPos(inst, 3, 0);

DazTheGas

bang on put it in a button as it is and it works