Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: ysymidi on November 19, 2019, 12:15:52 AM

Title: "Go To WorkZero" doesn't lift up Z axis.
Post by: ysymidi on November 19, 2019, 12:15:52 AM
Hi

I'm changing a MACH4 computer(upgrading thw S/W too from MACH4 older version to 4388), and confront some problems. ;(

I clicked on "Go To WorkZero" on the default screen.
I thought it would lift up the Z axis first, but the machine just moved its X and Y axis only.

So I opened the screen editor and open the script.

I found it did have Z axis movement in the script.
(I deleted "\nG00 Z0" at the end.)


GoToWorkZero()
--local inst = mc.mcGetInstance()
--mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 A0")


Why the machine doesn't move Z axis?
Title: Re: "Go To WorkZero" doesn't lift up Z axis.
Post by: KatzYaakov on November 19, 2019, 12:28:01 AM
why its have the double minus at the line head?
is it just mistake when copy? or its also on script?
Title: Re: "Go To WorkZero" doesn't lift up Z axis.
Post by: ysymidi on November 19, 2019, 12:50:58 AM
why its have the double minus at the line head?
is it just mistake when copy? or its also on script?
It is as is in the script. I copied it.
I didn't make any change with "--"
Title: Re: "Go To WorkZero" doesn't lift up Z axis.
Post by: KatzYaakov on November 19, 2019, 12:53:59 AM
Do you know the meaning of --?
Title: Re: "Go To WorkZero" doesn't lift up Z axis.
Post by: joeaverage on November 19, 2019, 01:20:59 AM
Hi,
in Lua the '--' signals that ALL text thereafter, on the same line is a comment.

This line:
Quote
--mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 A0")
does absolutely nothing, Lua/Mach ignores it as a comment. If you remove the '--' then the code3 becomes active.

Craig
Title: Re: "Go To WorkZero" doesn't lift up Z axis.
Post by: ysymidi on November 19, 2019, 01:39:00 AM
Do you know the meaning of --?
I don't know about coding.... T.T
Craig told me "--"means comment. lol~
Title: Re: "Go To WorkZero" doesn't lift up Z axis.
Post by: ysymidi on November 19, 2019, 01:39:25 AM
Hi,
in Lua the '--' signals that ALL text thereafter, on the same line is a comment.

This line:
Quote
--mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 A0")
does absolutely nothing, Lua/Mach ignores it as a comment. If you remove the '--' then the code3 becomes active.

Craig
Thank you Craig, now I think I know what's wrong here. ;)
Title: Re: "Go To WorkZero" doesn't lift up Z axis.
Post by: ysymidi on November 19, 2019, 01:46:54 AM
Hi,
in Lua the '--' signals that ALL text thereafter, on the same line is a comment.

This line:
Quote
--mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 A0")
does absolutely nothing, Lua/Mach ignores it as a comment. If you remove the '--' then the code3 becomes active.

Craig

I removed "--" but Z axis still doesn't move...

GoToWorkZero()
local inst = mc.mcGetInstance()
mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0")

What would be wrong? ;(
Title: Re: "Go To WorkZero" doesn't lift up Z axis.
Post by: dws on November 19, 2019, 08:25:56 AM
I am not sure what it is; but, I had a similar problem with 4338. I switched to version 4322. All is well now.
Title: Re: "Go To WorkZero" doesn't lift up Z axis.
Post by: chuck.dunlap on January 20, 2020, 03:43:03 PM
Has this ever been resolved?
I am getting the same results in my newly installed Mach4 build 3200, GoToWork Zero moves all axis except Z
I tried Mill and Lathe profiles, same results.
Title: Re: "Go To WorkZero" doesn't lift up Z axis.
Post by: ysymidi on January 20, 2020, 05:05:57 PM
I think I found what't wrong.

This seems to be related to ESS plugin, not MACH4 itself.

If anyone use stepper motors and set it in CW/CCW mode, his/her machine might malfunction.

In this case, s/he needs to change his stepper driver configuration to Step/Dir mode.

Then the machine would work properly.


I posted something about it on
https://warp9td.com/index.php/kunena/7-general-discussion/8271-ess-v253-m4-4322-m6-toolchange-macro-malfunction?limitstart=0