@jrcl said in Learning- How G-Code and Firmware Interact:

In short, I'm attempting to operate a thermoform "onto" the print bed once the print is done. So once a print is done the print head moves out of the way and a heater heats up a thermoplastic sheet held by a carriage that moves parallel to the Z-Axis, via belt connected steppers, so the sheet can be pulled over the bed. Then the vacuum turns on. So in summary:

As far as the controller & firmware etc., everything you want to do can be done just with correct configuration and adding a macro to run the extra mechanics; or add the full code to the slicer end code, either way.

Rotating the head away while still maintaining full accuracy seems difficult though; using a larger frame so the axes can move clear of the required area is likely cheaper.

The only high-accuracy possibility I can think of could be to use an E3D toolchanger system, with a hinge and servo added above the tool attachment point so when the tool is unclamped it can be swivelled up over the carriage, rather than left in a static carrier.

Still complex and expensive, possibly more so than just longer axis rails to move a normal head clear.

All the other motions are straightforward and controllable, with pretty much off-the-shelf mechanical parts.