I’ve been building a CNC Router, and now I’d like to add the rack of tools and toolchanger support.
When the interpreter encounters M6, the selected tool (via the T word:
M6 T1) is placed into the spindle (if different from the current tool). The tool length offset is not applied until G43 is executed (e.g.
Note: I think it’s possible to write
M6 T1 G43 to change to tool #1, and set its offset.
Remapping M6 is more complicated than remapping other Gcode commands.
We start by specifying in the INI file that we’d like to remap
[RS274NGC] REMAP=M6 modalgroup=6 python=rackchange
This says that upon encountering
M6, the interpreter should execute the Python function
rackchange, defined as described in the next section.