Hello Guest it is April 13, 2021, 11:41:25 AM

Author Topic: How do I make "Go to Work 0" work?  (Read 1327 times)

0 Members and 1 Guest are viewing this topic.

How do I make "Go to Work 0" work?
« on: April 02, 2018, 10:14:47 AM »
I completed setting up Mach 4 with my machine. I have everything working except the "Go to work 0" button. When I press it, it does nothing.

What I am doing.
1. Power up machine
2. Star mach 4
3. Home machine
4. Find the corner of my board
5. Press the "Zero X", "Zero Y", "Zero Z"
6. move to a random spot on the table
7. Hit "Go To Work 0"

Nothing happens except the screen flashes.

I am using an ESS smooth stepper if that makes a difference.

I'm ready to purchase a license for Mach 4, but unless I can get this feature working, the program is useless for my projects. After all the work setting it up I'd hate to abandon it.
Re: How do I make "Go to Work 0" work?
« Reply #1 on: April 02, 2018, 10:52:29 AM »
If you are running the demo, make sure it hasn't timed out.  You only have a limited time frame in the demo.

Restart Mach4 and try again.
Chad Byrd
Re: How do I make "Go to Work 0" work?
« Reply #2 on: April 02, 2018, 02:28:57 PM »
Hi,
if you open the screen editor and have a look at the script attached to the Go To Work Zero button you will find a function:
GoToWorkZero().

The function it self is in the screen load script, in my somewhat modified screenset  around line 250:
Code: [Select]
---------------------------------------------------------------
-- Go To Work Zero() function.
---------------------------------------------------------------
function GoToWorkZero()
    mc.mcCntlMdiExecute(inst, "G00 X0 Y0 A0")--Without Z moves
    --mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 A0\nG00 Z0")--With Z moves
end

Note there are two lines, the second is commented out so only the first line is active. The comment associated with that line says 'Without Z moves' but note also that it demands that
the A axis be sent to work zero as well.  My machine does not have an A axis and is not defined  and therefore this line of code fails.  If I modify the line to not include the non existant
axis like this:
Code: [Select]
---------------------------------------------------------------
-- Go To Work Zero() function.
---------------------------------------------------------------
function GoToWorkZero()
    mc.mcCntlMdiExecute(inst, "G00 X0 Y0 ")--Without Z moves
    --mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 A0\nG00 Z0")--With Z moves
end
The button now works.

Craig
My wife left with my best friend...
     and I miss him!
Re: How do I make "Go to Work 0" work?
« Reply #3 on: April 02, 2018, 02:43:53 PM »
I never noticed the "A" being in there.  I generally always set up the A Axis on mills (we use the 4th axis) so I have never had this issue.  
Good to know, thanks Craig!
Chad Byrd

Offline DazTheGas

*
  •  753 753
  • DazTheGas
    • View Profile
Re: How do I make "Go to Work 0" work?
« Reply #4 on: April 02, 2018, 05:11:51 PM »
I sometimes have the same problem myself after doing a probe move, I overcome this by pressing the reset before the GotoZero.

DazTheGas
Theres always time for a choccy biccy
Re: How do I make "Go to Work 0" work?
« Reply #5 on: April 02, 2018, 06:42:59 PM »
 :D

Joeaverage! Your fix worked! about 5 min editing and everything is running perfectly now!

Big Thanks!