CAM: Avoid Z overtravel error on Fanuc tool changes

Enabling tool height compensation will cause the axis to move up
the length of the tool, which will cause a Z overtravel error when
the tool change take place close to the top of the machine.  To
counter this move, ask the machine to move its commanded position
down the length of the tool height, which in effect causes no upward
movement after the tool change.  The #4120 variable contain the
current tool number, and #2000 - #20XX contain the tool heights.
This commit is contained in:
Petter Reinholdtsen
2025-12-01 04:28:45 +01:00
parent fdd8e46c4d
commit 8f36c8cd79

View File

@@ -623,7 +623,8 @@ def parse(pathobj):
# add height offset
if USE_TLO:
outsuffix.append("G43 H" + str(int(c.Parameters["T"]))
outsuffix.append("G91 G0 G43 G54 Z-[#[2000+#4120]] H#4120")
outsuffix.append("G90")
if command == "message":
if OUTPUT_COMMENTS is False: