Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: DanieGouws on August 06, 2021, 09:43:43 AM
-
Hi,
On my Denford CNC lathe, running a Pokeys57 card and Mach4 I'm trying to zero the Zero Fixture Z using an external button. I have done that very successfully for Cycle Start, Spindle Start and Spindle Stop by mapping external buttons to inputs and then editing the Mach4 Screen using "Edit Screen". Then I loaded the "Screen Load Script" and adding:
[mc.ISIG.INPUT0]=function (state)
if (state ==1) then
CycleStart()
end
end,
I assume I need to replace the CycleStart() with a variable the refers to the "Zero Fixture Z"; for the "Zero Fixture Z" key, under properties/events I found the variable "Zero Z" but that gives me a compiler error....
Hope you can help,
Kind regards and thank you
Danie
-
Try this;
mc.mcAxisSetPos(inst, 2, 0.0)
-
Hi,
It works perfectly! Thank you very much. Is there an easy way to determine the correct "parameter/ structure" for other buttons?
Regards
Danie
-
In your Mach4 folder there is a file called Mach4CoreAPI.chm
That has most of them
-
I will go and look, thanks again,
Regards Danie