Skip to content

Commit 2859fa8

Browse files
authored
Merge pull request #2567 from petterreinholdtsen/2.9-gcode-g38.2
Explain with example how to use G38.2 to measure tool height.
2 parents dfda2ed + e9cb6d9 commit 2859fa8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/src/gcode/g-code.adoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,24 @@ If the probing operation failed, G38.2 and G38.4 will signal an error
12491249
by posting an message on screen if the selected GUI supports that.
12501250
And by halting program execution.
12511251

1252+
Here is an example formula to probe tool height with conversion from a
1253+
local coordinate system Z offset to machine coordinates which is
1254+
stored in the tool table. The existing tool height compensation is
1255+
first cancelled with G49 to avoid including it in the calculation of
1256+
height, and the new height is loaded from the tool table. The start
1257+
position must be high enough above the tool height probe to compensate
1258+
for the use of G49.
1259+
1260+
.G38.2 Example
1261+
[source,{ngc}]
1262+
----
1263+
G49
1264+
G38.2 Z-100 F100
1265+
#<zworkoffset> = [#[5203 + #5220 * 20] + #5213 * #5210]
1266+
G10 L1 P#5400 Z#<zworkoffset> (set new tool offset)
1267+
G43
1268+
----
1269+
12521270
A comment of the form '(PROBEOPEN filename.txt)' will open
12531271
'filename.txt' and store the 9-number coordinate consisting of
12541272
XYZABCUVW of each successful straight probe in it.

0 commit comments

Comments
 (0)