I thought you'd like that PROBE.
If the Probe is initially positioned at the rough centre of the Circle/Arc, and a rough diameter passed as an argument in the Macro Call block, the vector movement would not be difficult. I'm sure you get the drift on that.
The other thing that would be worthwhile to include in an Auto touch Macro would be to pass a rough Start and End angle for the three hits, so as to accommodate an Arc. These could be interpreted as Optional arguments by the Macro program, and therefore, with their omission, a full circle with hits of 120 degree spacing would be assumed.
As stated in my original Post, the partial Macro program listing is a conversion of a Software Routine I wrote. The math is solid, and the routine works perfectly in my software. The only mistake, if any, that may have made, is in transposing my more descriptively named variables to those used by the Fanuc User Macro language. Accordingly, if you discover any errors, I can send you my script for your own conversion if it helps. However, having said that, I'm confident that the Macro form of the routine will work OK.
I wouldn't mind seeing your resulting code.
Regards,
Bill
This is what I wrote. Be carefull, still not proved on the machine.
Few basic facts when measuring with the probe:
1. The effective probe tip diameter is not equal to geometric diameter, and also slightly differs in X and Y.
2. The probe tip center is off center from spindle center line.
This values are set during the probe calibration procedure and stored either in program or in 500 variables.
3. As the center of the circle is not known (finding it is in fact our task), the probe is placed before the execution of the routine somewhere "close". As the result the vector movement is not normal to the circle, and we do not know which point on the probe tip sphere is in touch with the circle (ring) surface. What we do know is that the center of the tip is laying on the circle concentric to the ring and the radius of that circle is equal to the differnce between the radius of the measured circle and the radius of the probe tip.
The program looks like that:
G65P9081D--A--B--C--F--Q--
%
O9081 (3 POINT CIRCLE)
G53
#120=500 (BASE NUMBER FOR PROBE DATA)
(#500 = 2.95 (EFFECTIVE RADIUS OF PROBE TIP IN X DIRECTION))
(#501 = 2.94 (EFFECTIVE RADIUS OF PROBE TIP IN Y DIRECTION))
(#502= 0.12 (OFFSET OF PROBE TIP CENTER FROM SPINDLE CENTERLINE IN X))
(#503=-0.07(OFFSET OF PROBE TIP CENTER FROM SPINDLE CENTERLINE IN X))
(G65P9081D--A--B--C--F--Q--)
#14=#5021
#15=#5022
#16=.1 (BACKOFF COEFFICIENT)
IF[#9NE#0]GOTO10
#9=5000 (FAST FEED)
#8=30 (MEASURING FEED)
N10
IF[#17NE#0]GOTO20
#17=10 (PREHIT AND AFTERHIT DISTANCE)
N20
#32=0
N40
#33=#32+1
#21=[#7/2-#17]*[COS#[#33]]
#22=[#7/2-#17]*[SIN#[#33]]
#23=[#7/2+#17]*[COS#[#33]]
#24=[#7/2+#17]*[SIN#[#33]]
#25=[#21-#23]*#16
#26=[#22-#24]*#16
N50
G91
G31X#21Y#22F#9
IF[#5061EQ#5041]GOTO60
#3000=91 (PATH OBSTRUCTED)
N60
IF[#5062EQ#5042]GOTO65
#3000=91 (PATH OBSTRUCTED)
N65
G31X#23Y#24F[#9*0.3]
IF[#5061NE#5041]GOTO70
#3000=92 (PROBE FAIL)
N70
IF[#5062NE#5042]GOTO75
#3000=92 (PROBE FAIL)
N75
#4=#5021
#5=#5022
G9X#25Y#26F#9
G31X[#4-#5021]Y[#5-#5022]F30
G0X[#14-#5021]Y[#15-#5022]
IF[#33EQ1]GOTO80
IF[#33EQ2]GOTO90
IF[#33EQ3]GOTO100
N80
#10=#5061+#[#120+3]
#11=#5062+#[#120+4]
#32=1
GOTO40
N90
#20=#5061+#[#120+3]
#21=#5062+#[#120+4]
#32=2
GOTO40
N100
#30=#5061+#[#120+3]
#31=#5062+#[#120+4]
N110
#1=#10
#2=#11
#3=#20
#4=#21
#5=#30
#6=#31
(GET PERPENDICULAR BISECTOR OF #1, #2 and #3, #4)
#7 = [#3 + #1] / 2
#8 = [#4 + #2] / 2
#9 = #3 - #1
#10 = -[#4 - #2]
(GET PERPENDICULAR BISECTOR OF #3, #4 and #5, #6)
#11 = [#5 + #3] / 2
#12 = [#6 + #4]/ 2
#13 = #5 - #3
#14 = -[#6 - #4]
(SEE WHERE THE LINE INTERSECT)
(X-CENTRE)
#15 = [#8 * #10 * #14 + #11 * #10 * #13 - #7 * #9 * #14 - #12 * #10 * #14] / [#10 * #13 - #9 * #14]
(Y-CENTRE)
#16 = (#15 - #7) * #9 / #10 + #8
(RADIUS)
#17= SQRT[ [ [#1-#15]* [#1-#15] ]+[ [#2-#16]*[#2-#16] ]] + [#[#120]+#[#120+1]]/2
M99
%
Remarks and improvements will be highly appreciated.