Hello Guest it is April 19, 2024, 04:27:32 PM

Author Topic: Reprogram Jog Button code to not move if Z is < variable height  (Read 2791 times)

0 Members and 1 Guest are viewing this topic.

Reprogram Jog Button code to not move if Z is < variable height
« on: December 10, 2010, 06:40:07 AM »
Hi All

I have built a new screen for manual stone cutting with a vertical saw blade. However, I would like to code the JOG BUTTONS with an IF statement to not work if the Z height is lower than a certain height which can be calculated. I need this because the operator of the machine forgets to lift the blade to a SAFE Z height above the stone material which is being cut when jogging. The blade then hits the stone and gets damaged!

Can someone assist with code?

Offline Mattw

*
  •  41 41
    • View Profile
Re: Reprogram Jog Button code to not move if Z is < variable height
« Reply #1 on: December 28, 2010, 11:11:45 PM »
Wow.  I'm surprised someone hasn't helped you out with this one yet.  Let me give it a shot, though I'm one of the least qualified.

You'll want to make the button to run VB code edited in Mach 3

For the X+ jog button the script should be something like...

If GetOEMDRO(802)>[your value here] then
DoOEMButton(307)
End if

X- DoOEMButton (308), Y+ and Y- are 309 and 310.

This may also be completely wrong.  For example, I'm not sure how continuous jog mode will work with this.  Test carefully.

Maybe one of the smart guys will take this opportunity to point out the errors in my thinking.