-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCALIBRATEPROBERING
More file actions
executable file
·44 lines (33 loc) · 1.46 KB
/
CALIBRATEPROBERING
File metadata and controls
executable file
·44 lines (33 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright 2024 Toolpath Labs Inc., Justin Gray, and Josh Smith
// CALIBRATEDIAMETER
// Description: Calibrate the Diameter of the probe using a ring guage
// Initial coding 1/14/2024: Joshua Smith
// Your probe must be concentric and you must use a ring guage!!!!!!!!!!
// #1 is the expected DIAMETER of the artifact
// load probe config
G65 "PROBECONFIG"
M19 // ORIENT SPINDLE
// important local variables
#100 = @100 // TOOL NUMBER PROVIDED BY PROBECONFIG MACRO
// Make sure diameter is zero when calibrating
W_TOOL_DATA[0,#100,3,0] // store tool diameter
// calling our slot macros the first time centers probe
G65 "PROBEXSLOT" A0 B#1 Q0
G65 "PROBEYSLOT" A0 B#1 Q0
// calling our slot macros a second time gives an accurate inspection
G65 "PROBEXSLOT" A0 B#1 Q0
G65 "PROBEYSLOT" A0 B#1 Q0
// average Diameter calculation
// @999 and @998 are set in the slot macros
// this could be improved by keeping track of both X and Y diameters and controling probe orientation
#131 = @998 // measured ring guage diameter in x
#132 = @999 // measured ring guage diameter in y
#133 = #1-#131 // error in x
#134 = #1-#132 // error in y
#135 = ABS[#133 + #134]/2 // average error
W_TOOL_DATA[0,#100,3,#135] // store tool diameter
MENU_ADD["Ruby Diameter Set To: #135",""];
MENU["CALIBRATION REPORT","RESULTS","",1];
M20 // UNLOCK SPINDLE ORIENTATION FOR SAFETY
G90
M99