Skip to content

Manual, semi automatic and automatic tool change

Terje Io edited this page Nov 25, 2023 · 3 revisions

Manual, semi-automatic and automatic tool change


grblHAL has core support for tool change functionality via M6. Manual or semi-automatic tool change options are available when the driver and the sender supports the tool change protocol extension. Automatic tool change (ATC) mode requires driver support and is fully transparent to the sender.

Tool change modes:

  • Normal or basic mode (0)
    This mode is present in all versions of grblHAL and is 100% manual. Commands for stopping spindle and coolant and possibly moving to a tool change position should be added to the gcode program, as well as restoring spindle, coolant and position after the tool change is complete.

  • Manual touch off (1)
    Manual touch off mode will stop the spindle and coolant and then move the linear axis to the home position for the tool change. After the tool is changed a manual or automatic touch off by the $TPW command has to be performed before a cycle start is issued. On receiving the cycle start command the spindle and coolant is restored and the controlled point (tool tip) is moved back to the original position. If manual touch off is performed typically the new offset position is entered in the sender DRO before issuing the cycle start command. If automatic touch off succeeds the cycle start command is issued automatically.

  • Manual touch off @ G59.3 (2)
    This mode is similar to mode 1 above, the difference is a move to the G59.3 offsets is added after the move to the home position. This is useful when a predefined position is used for the tool touch off.

  • Automatic touch off @ G59.3 (3)
    Again similar to mode 1 above, the difference is when the cycle start command is issued an automatic tool touch off is performed on the tool sensor at the G59.3 offsets.

  • Ignore (4)
    Record the tool number and ignore M6.

  • Automatic tool change (ATC)
    This mode is fully transparent to the sender and is driver/plugin specific. Currently there are no publicly available implementations, however I am experimenting with a low cost version for my mini mill that I might publish later as a separate project.

Note: Mode 1 - 3 is available from build 20200805, mode 4 from build 20200929. Setting $341 is used to set the mode and settings $342 - $344 for probing distance and feed rates.

Note: Automatic touch off mode and the $TPW command requires an initial tool length offset to be established before use. This can be done by manually issuing a tool change command for the first tool and then setting the offset by issuing a $TLR system command.

System commands:

$TLR command is a shorthand for Tool Length Reference. Used to set the initial tool length reference after a sucessful probe. If issued before a successful probe, or after a failed one, any current tool length reference is cleared.

$TPW command is a shorthand for Tool Probe Workpiece. This command is only available in mode 1 and 2 and is used to start a probing sequence in order to change the dynamic tool offset for the new tool. It requires a tool length sensor of some form, typically on the workpiece itself.


2023-01-06