Hello Guest it is April 16, 2024, 10:06:03 AM

Author Topic: Help! How to Jog Axis till switch Hit Macro  (Read 2809 times)

0 Members and 1 Guest are viewing this topic.

Help! How to Jog Axis till switch Hit Macro
« on: August 05, 2012, 04:13:52 AM »
I am working on Plasma cutting, i have 2 switch on top and bottom on my Z axis, how to jog the Z axis down or up and stop till Switch Hit?

For jog up, i can use "dobutton(24)" or ref Z Axis, but for jog down? i have no idea.


Ardona.
Re: Help! How to Jog Axis till switch Hit Macro
« Reply #1 on: August 06, 2012, 10:59:18 AM »
I haven't tried this but it should work.  Set up one upper switch and one lower switch so they both trigger the "Digitize" input.  For your "UP" routine, do something like G31 Z4.000 and for your "DOWN" routine, do something like G31 Z-4.000.  I'm assuming a negative number drives your Z down.

Create two buttons and put each routine in it's own button, like....

code "G31 Z-4.000"

When the axis hits the switch it will stop.  If you want to do something else after it stops, add that code after the G31.

Just curious....Are you trying to make a floating head work?  Can't figure out why you'd want a switch on the bottom of the Z axis travel....Unless you're using it as a lower limit.  We use an upper travel limit and a floating head with the G31 code on the floating head.
« Last Edit: August 06, 2012, 11:04:39 AM by rrc1962 »
Re: Help! How to Jog Axis till switch Hit Macro
« Reply #2 on: August 27, 2012, 10:22:00 PM »
actually, i will use 2 switch for up switch and down switch, going to use input pin other than home or probe pin, (oem trig is preferred). but do not know how to send the axis to move.

regards
Ardona