|
Mr DWeaver
I believe i answered your question by providing this probe-center.nc file The built in probe function is designed to work with a rectangle.
(After this file is run, the ProbeMap1.txt file will be generated in the root directory of the u disk. The coordinates of the three points and the center of the circle are recorded in the file.)
ClearCoords[1];Clear the contents of the ProbeMap1.txt file in the u disk directory
#1=0;probing the initial point X position
#2=0;probing the initial point Y position
#3=-5;probing the initial point Z position
#104=100;probed distance - was set to 100
#105=150;probed speed
G0X#1Y#2Z#3;Move to the initial point of probe
(X moves in the positive direction for the first point probed)
M101
G91G01X#104F#105
M102
G4P0
RecordCoords[1,#699,#700,#701,#702];Record the first point coordinates to the ProbeMap1.txt file
#110=#699;Save the first point X coordinate
#111=#700;Save the first point Y coordinate
G90G0X#1Y#2;Back to the initial point
(Y moves in the positive direction for the second point probed)
M101
G91G01Y#104F#105
M102
G04P0
RecordCoords[1,#699,#700,#701,#702];Record the second point coordinates to the ProbeMap1.txt file
#112=#699;Save the second point X coordinate
#113=#700;Save the second point Y coordinate
G90G0X#1Y#2;Back to the initial point
(X moves in the negative direction for the third point probed)
M101
G91G01X-#104F#105
M102
G04P0
RecordCoords[1,#699,#700,#701,#702];Record the third point coordinates to the ProbeMap1.txt file
#114=#699;Save the third point X coordinate
#115=#700;Save the third point Y coordinate
GetCenterPos[#110,#111,#112,#113,#114,#115,116,117];Calculate the center coordinates and store them in #16, #17 variables
RecordCoords[1,#116,#117,#701,#702];Record the center coordinates to the ProbeMap1.txt file
G90G0X#116Y#117;Move to the center of the circle
G92X0Y0;XY coordinate clear
|
|