Hello Guest it is April 23, 2024, 09:34:29 PM

Author Topic: Macro, Probing, Center of Y axis space with Distance  (Read 4982 times)

0 Members and 1 Guest are viewing this topic.

vmax549

*
Macro, Probing, Center of Y axis space with Distance
« on: March 28, 2009, 04:49:22 PM »
Here is a mnacro that probes the center of the Y axis space and returns to the center point. It also returns the Distance value. To run call M1057, it can be called from a Gcode program or the MDIline or from a button script.

To use position the probe inside of the Y axis space. It will probe the Y axis and return to the center point. It also returns the Distance value.

For the Distance to be accurate you must set the probe tip diameter on the settings page. If the sett is not set the distance will be off by the value of the tip diameter.

If the setting is not used the probe WILL return to the centerpont correctly.


EXAMPLE CODE:

'M1057 Y axis Center With Distance
Code "G91"
Code"G31Y10 f5"
While Ismoving()
Wend
Code"#4=#2001"
Code"G1y-.025"
Code"G31y-20 f5"
While ISmoving()
Wend
Code"#5 =#2001"
Code"#6 =[#4-#5]"
code"#8 =[#6/2]"
Code"G1y[#8]"
While Ismoving()
Wend
Code"G90 M30"
HD= Getvar(6)
 MsgBox ("Y axis Distance is " & HD)

« Last Edit: March 28, 2009, 04:51:42 PM by vmax549 »