Hello Guest it is March 28, 2024, 09:45:52 PM

Author Topic: How to create ZERO All button on Mach4  (Read 999 times)

0 Members and 1 Guest are viewing this topic.

How to create ZERO All button on Mach4
« on: August 12, 2021, 07:52:22 AM »
I want to attach ZERO All that was in Mach3 to Mach4.
Please let me know.

Is it possible to use Mach4's [Screen Scripts] to make it work? ??
Thank you for your cooperation.
Re: How to create ZERO All button on Mach4
« Reply #1 on: August 12, 2021, 11:51:11 AM »
Operator->Edit Screen
Create or select the button you want
In the properties tab for that button's left up script:

local rc = mc.mcAxisSetPos(mc.mcGetInstance(),mc.X_AXIS,0.0);
 rc = mc.mcAxisSetPos(mc.mcGetInstance(),mc.Y_AXIS,0.0);
 rc = mc.mcAxisSetPos(mc.mcGetInstance(),mc.Z_AXIS,0.0);

HTH

RT
Re: How to create ZERO All button on Mach4
« Reply #2 on: August 12, 2021, 04:56:44 PM »
Thank you.
Unfortunately, it looks like the picture.
It does not work.
Please tell me the solution.
« Last Edit: August 13, 2021, 12:46:17 AM by Tweakie.CNC »
Re: How to create ZERO All button on Mach4
« Reply #3 on: August 13, 2021, 01:01:09 AM »
I want to attach ZERO All that was in Mach3 to Mach4.
Please let me know.

Is it possible to use Mach4's [Screen Scripts] to make it work? ??
Thank you for your cooperation.

Yes you can, just put a button where you want and at Left up script put this:

Code: [Select]
inst = mc.mcGetInstance()

local rc = mc.mcAxisSetPos(inst, mc.X_AXIS,0.0);
 rc = mc.mcAxisSetPos(inst, mc.Y_AXIS,0.0);
 rc = mc.mcAxisSetPos(inst, mc.Z_AXIS,0.0);
Re: How to create ZERO All button on Mach4
« Reply #4 on: August 13, 2021, 02:47:55 AM »
Answer Hello Greekart.
Thank you for giving me the script.
It worked fine.
Please look at the photo.
My Mach4 (wx4) did not have a Zero All module.
Are you wx4?
Re: How to create ZERO All button on Mach4
« Reply #5 on: August 13, 2021, 02:52:13 AM »
Please look at the photo.My Mach4 (wx4) did not have a Zero All module.
Are you wx4?

No, that was a test screen. You need to find space and create a button or use other that you not use.
At w4x screenset is a button "Custom Button" that is for feature use (not do anything), use that.
Re: How to create ZERO All button on Mach4
« Reply #6 on: August 13, 2021, 09:04:30 PM »
thank you very much.