Skip to content

Commit 52ec2df

Browse files
Use G38.3 in qt_auto_probe_tool.ngc to be able to check probe status.
There is a test after one of the G38.2 in question that look like this: O500 IF [#5070 EQ 0] G90 O500 return [-3] ; indicate probe contact failure to epilog O500 endif But the manual state that "If the probing operation failed, G38.2 and G38.4 will signal an error by posting an message on screen if the selected GUI supports that. And by halting program execution.". When I try to include a similar test in my test program, the program is aborted and the test is never executed. This make me believe the wrong G code is used. Or is there something special about the M6 remapping environment that make G38.2 behave differently? Made sure both calls to G38.2 are changed to G38.2 with a test verifying the status. Also adjusted the handling of the measured height to take any coordinate system offsets.
1 parent 83936b3 commit 52ec2df

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

nc_files/remap-subroutines/qt_auto_probe_tool.ngc

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ o<qt_auto_probe_tool> sub
22
;(debug, in change tool_in_spindle=#<tool_in_spindle> current_pocket=#<current_pocket>)
33
;(debug, selected_tool=#<selected_tool> selected_pocket=#<selected_pocket>)
44

5+
; calculate Z offset value based on current work offset (#5220) and
6+
; G92/G52 offset if enabled (#5210)
7+
#<zworkoffset> = [#[5203 + #5220 * 20] + #5213 * #5210]
8+
9+
510
#<tool> = #<selected_tool>
611
#<pocket> = #<selected_pocket>
712
; we must execute this only in the milltask interpreter
@@ -61,22 +66,27 @@ O400 endif
6166

6267
F #<_hal[qtversaprobe.searchvel]>
6368
G91
64-
G38.2 Z- #<_ini[VERSA_TOOLSETTER]MAXPROBE>
69+
G38.3 Z- #<_ini[VERSA_TOOLSETTER]MAXPROBE>
6570
G0 Z #<_hal[qtversaprobe.backoffdist]>
6671

67-
;reprobe at probe speed
68-
F #<_hal[qtversaprobe.probevel]>
69-
G38.2 Z- [#<_hal[qtversaprobe.backoffdist]> *1.2]
70-
7172
O500 if [#5070 EQ 0]
7273
G90
7374
O500 return [-3] ; indicate probe contact failure to epilog
7475
O500 endif
7576

77+
;reprobe at probe speed
78+
F #<_hal[qtversaprobe.probevel]>
79+
G38.3 Z- [#<_hal[qtversaprobe.backoffdist]> *1.2]
80+
81+
O600 if [#5070 EQ 0]
82+
G90
83+
O600 return [-3] ; indicate probe contact failure to epilog
84+
O600 endif
85+
7686
G90
7787
G53 G0 Z[#<_ini[CHANGE_POSITION]Z>]
7888

79-
#<touch_result> = #5063
89+
#<touch_result> = [#5063 + #<zworkoffset>]
8090

8191
(DEBUG, %fProbe Height: #<_hal[qtversaprobe.probeheight]>)
8292
(DEBUG, %fBlock Height: #<_hal[qtversaprobe.blockheight]>)

0 commit comments

Comments
 (0)