Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: patycoop on November 27, 2013, 07:14:44 PM
-
Trying to probe the x- and x+ sides of a box then split the difference to get center.
Using this g code im having no trouble probing both sides, but cant figure out how to get the x+ DRO, divide by 2,
then @ line9 go half way back.
n1 g92x0y0z0
n2 g91x0y0z0
n3 g00z1.0f30
n4 g01 z-.5f30
n5 g00y.5f15
n6 g31x-6f15
n7 g92 x[0+.127/2](zero -x +probe dia)
n8 g31x6
n9 g01x(go to x [DRO-.065][2]???cant figure this out..
n10 g92x0
n11 g01y-1f15
n12 g00z1f15
n13 m30
Help appreciated!
Thx patycoop
-
When you are just probing in between 2 parralell points you do not have to worry about tool tip offsetting as each side cancels the other out.
NOW because mach3 does NOT have access to teh internal position values you have to gather the probe point value and store them as #vars.
Move into position to start the probe.
G91 ( set Inc)
G31 X-10 (Probe left)
#1 = #2000 (Store that value)
G0 X.1 ( pull OFF the probe point to the right)
G31 X10 ( Probe to the right)
#2 = #2000 (store that point)
#3 = [[#2-#1] /2] ( find the mid point value)
G1 X[-1*#3] ( move left back to the mid point)
G90 (reset to ABS)
Not testing it here but it should work.
(;-) TP
-
Thanks a lot TP!
Cleared up my confusion on #use.
Will try tomorrow and post results
Patycoop.
-
Work perfectly!
Thx TP