Hello Guest it is March 28, 2024, 12:52:20 PM

Author Topic: "Go To WorkZero" doesn't lift up Z axis.  (Read 1748 times)

0 Members and 1 Guest are viewing this topic.

"Go To WorkZero" doesn't lift up Z axis.
« 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?
Re: "Go To WorkZero" doesn't lift up Z axis.
« Reply #1 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?
Re: "Go To WorkZero" doesn't lift up Z axis.
« Reply #2 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 "--"
Re: "Go To WorkZero" doesn't lift up Z axis.
« Reply #3 on: November 19, 2019, 12:53:59 AM »
Do you know the meaning of --?
Re: "Go To WorkZero" doesn't lift up Z axis.
« Reply #4 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
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: "Go To WorkZero" doesn't lift up Z axis.
« Reply #5 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~
Re: "Go To WorkZero" doesn't lift up Z axis.
« Reply #6 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. ;)
Re: "Go To WorkZero" doesn't lift up Z axis.
« Reply #7 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? ;(

Offline dws

*
  •  24 24
    • View Profile
Re: "Go To WorkZero" doesn't lift up Z axis.
« Reply #8 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.
« Last Edit: November 19, 2019, 08:28:01 AM by dws »
David
Re: "Go To WorkZero" doesn't lift up Z axis.
« Reply #9 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.