Author Topic: Z-axis Goto Zero not responding  (Read 5299 times)

lebies

  • Posts: 2
    • View Profile
Z-axis Goto Zero not responding
« on: May 28, 2015, 05:20:51 PM »
Hey all,

Am commissioning my machine and the only issue I have so far is that the Z-axis does not return to zero when I click the "Goto Zero" button. The X and Y axis both return to zero properly.

I'm on PMDX-422, Ver 0.25.111 plugin with licensed Mach4 Hobby Build 2336 running on a quad-core 2.8GHz cpu, 4GB Ram, Lenovo, Windows 7 Ultimate x64. Metric units.

Entering G-Code in MID tab like g0 x100 y100 z50, cycle start - moves X to 100, Y to 100 and Z to 50, as expected. Now hit the "Goto Zero" button and X and Y return to their respective zero positions but Z doesn't move at all. Hitting Z+ or Z- jog buttons now moves the axis down or up as commanded.

Or in Jogging tab, Cycle Jog Inc set to 1.0000 (or for any of the others), Jog Mode in either Cont or Step all axis move as expected for whatever settings. Say I move X, Y and Z to some point they move to that point. Now hit Goto Zero and X and Y do as commanded but Z ignores the button. Again, hitting Z+ or Z- jog buttons now moves Z down or up as commanded.

Any help would be much appreciated.

Thanks in advance.

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: Z-axis Goto Zero not responding
« Reply #1 on: May 28, 2015, 05:58:10 PM »
This is most likely due to the script that runs when the "Goto Zero" button is pressed.  Earlier versions of Mach4 only attempted to move the X & Y axis.

To fix this:

(1) open Mach and select the "Operator->Edit Screen" menu item.  This will bring up the screen editor.

(2) Click on the "Goto Zero" button

(3) In the "Properties" window in the lower left of the screen, click on the center icon that looks like a box with a lightning bolt on it.   You should see some text on the line for the "Left Down Script" item.  Click on the box with the 3 dots in it to edit this script.

(4) Make the script look like this:

local inst = mc.mcGetInstance();
mc.mcCntlMdiExecute(inst, 'G00 X0 Y0
G00 Z0');

That will move the X & Y axis to zero and then move the Z axis to zero.  Feel free to change the order of the commands to suite your machine.

(5) Click on the Screen->Save menu

(6) Click on Operator->Edit Screen to exit the screen editor.

WARNING: Since this was saved back to the original screen set, if you are using the default wxMach screen set it WILL BE OVERWRITTEN when you install a new version of Mach4.  To avoid this, you could "save as" to a different file, and then go to View->Load Screen to load the modified version.  The drawback to renaming it is you don't automatically get any updates to the screen set that come with new Mach4 versions.

Bob
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

lebies

  • Posts: 2
    • View Profile
Re: Z-axis Goto Zero not responding
« Reply #2 on: May 29, 2015, 02:47:45 PM »
Hey Bob,

Thanks for the fix, really appreciate your answer.

I'll implement in the morning and report back on outcome (for completeness).

I must say, to date it's been a real pleasure working with the PMDX-422. I'm sure I'll run into more 'issues' in due course, but to now I've had very little to complain about. And my machine is purring along beautifully and accurately.

Cheers ...