Hello Guest it is November 12, 2019, 06:16:25 PM

Author Topic: "Go to Work Zero" button script  (Read 1003 times)

0 Members and 1 Guest are viewing this topic.

"Go to Work Zero" button script
« on: January 16, 2018, 09:25:09 PM »
M4 Lathe, latest release.
Looks to be running much better on a better XP set-up.  :)
Quirp:
The "Go to Work Zero" button sends ONLY the Z to 0.00, the X doesn't respond.
Attached is the script under the button.
Does it look to be correct ?
Thanks for looking,
Russ
Re: "Go to Work Zero" button script
« Reply #1 on: January 16, 2018, 10:31:51 PM »
Hi Russ,
yes that looks right.

Note that its the GoToWorkZero() function that actually runs and the lines below are actually just comments. They are left
there so you can see what the GoToWorkZero() function is and how it works. If you don't like what it does or
it doesn't work then you'll have to dig around and find the actual GoToWorkZero() code and edit it.

The operative code is the mc.mcCntlGcodeExecute statement and is composed of three lines all tacked together.
1) G53 Z0 causes the Z axis to go to MACHINE zero
2) G00 X0 Y0 causes the x and y axes to go to WORK zero
3) G00 Z0 causes the Z axis to go to WORK zero

The one statement then contains one machine coord move and two workcoord moves....if you run the code with that
understanding can you indeed see that its running as it should?

Craig
My wife left with my best friend...
     and I miss him!
Re: "Go to Work Zero" button script
« Reply #2 on: January 16, 2018, 10:50:11 PM »
Thanks Craig, I truly appreciate your attention.
I understand your explanation .... OK.
So, regarding... 1) why in the heck would a "Go to work" button  send an axis to MACHINE 0 ?
2) For a lathe, why wouldn't it be X an "Z" instead of X and Y ?
3) never happens.
Actually, regardless of where the Z axis, the Z axis DRO never changes . ? ?

If I load a file , then jog away several inches in  X and Z, then hit the button only the z goes to WORK 0.

I must be really missing something here.
Thanks for your attention ... and help.
Kindest regards,
Russ
Re: "Go to Work Zero" button script
« Reply #3 on: January 17, 2018, 12:25:00 AM »
Hi Russ,
that script looks like it belongs in the mill profile. There, having the Z axis move to the top of travel before moving X and Y makes sense.

If that script is not to your liking either edit it or write a new one instead. Its both the great strength of Mach4 and its greatest weakness...its so flexible it never quite
seems to do the basic stuff in the way you've become accustomed to.

Craig
My wife left with my best friend...
     and I miss him!
Re: "Go to Work Zero" button script
« Reply #4 on: January 17, 2018, 07:15:47 AM »
Hi Russ,
that script looks like it belongs in the mill profile. There, having the Z axis move to the top of travel before moving X and Y makes sense.

If that script is not to your liking either edit it or write a new one instead. Its both the great strength of Mach4 and its greatest weakness...its so flexible it never quite
seems to do the basic stuff in the way you've become accustomed to.

Craig
Thanks again Craig. Ah yes, that does make sense. Mill.
I've generally become accustomed to $200 products working as they are intended to. In the most basic sense.
It's a good thing that it is flexible.
It is also slip-shod ..... looks more and more like it was just thrown together from bits and pieces and never actually tested or actually used.  But ..... it is pretty.  ::)
The best part is that we have folks like you to help out.  :)
Kindest regards,'
Russ
Re: "Go to Work Zero" button script
« Reply #5 on: January 17, 2018, 09:02:59 AM »
Check out this support video on setting up the 'Go to Work Zero' button here: https://www.youtube.com/watch?v=SZuEJn046Pw

Please feel free to submit a support ticket using the 'Support' tab at machsupport.com with any questions, comments, or concerns. While we cannot address every forum post, we respond to every ticket we receive.

Thank you,
Bryanna
Newfangled Solutions Helpdesk: http://support.machsupport.com
YouTube Support Channel: https://www.youtube.com/c/MachSupportOfficial
Re: "Go to Work Zero" button script
« Reply #6 on: January 17, 2018, 09:31:26 AM »
Well !, How convenient is that !
Kudos to Rob for an excellent tut. (Although Bryanna is much more pleasant to listen to.)

Was my pleasure to speak with you at the show, hope to see you there again next year.
Thanks Bryanna,
Russ
Re: "Go to Work Zero" button script
« Reply #7 on: January 17, 2018, 11:10:08 PM »
Hey, did I miss something? been gone a while.......LOL..):
Ed VanEss