Marlin2ForPipetBot: five axis CNC - DerAndere1/Marlin GitHub Wiki

Marlin for five axis CNC

Copyright 2022 - 2024 DerAndere

The Marlin2ForPipetBot branch adds support for true simultaneous 5 axis machining with rotational tool centerpoint control (TCPC) for multi axis CNC machines. It adds the G-code G43.4 which is a command to control the tool centerpoint (TCP) relative to the part during multi axis machining. To set up Marlin2ForPipetBot for a 5 axis CNC machine, follow these instructions.

PENTA_AXIS_TRT

One of the most common five axis CNC machine geometries features a tilting rotating table. Several settings must be configured correctly to make G43.4 (TCPC) work, as described below. To set the correct kinematics for this machine geometry, enable this option in Configuration.h:

#define PENTA_AXIS_TRT

DEFAULT_MRZP_OFFSET_X, DEFAULT_MRZP_OFFSET_Y, DEFAULT_MRZP_OFFSET_Z:

For machines with a tilting rotating table (XYZAC or XYZBC) the machine rotary zero point (MRZP) offset is the position of the center of rotation (P) in machine coordinates when tool 0 is selected. The center of rotation is usually the center of the top surface of the rotary table when all axes are at position 0 (in machine coordinates). In other words, the offsets are equal to the distance along the respective axis (X, Y, Z) from the origin of the machine coordinate system O(0,0,0) to the intersection P between the top surface of the rotary table and the verical centerline of joint 5.

PAX_XYZAC_TRT_MRZP_offsets Figure 1: MRZP offsets of a CNC machine with five axes (XYZAC), featuring a tilting rotating table. Note that the image shows the machine in a state where tool 0 is selected and all axes are in neutral position (position 0 in machine coordinates) so that the tilting rotating table is oriented horizontally. Copyright 2024 DerAndere. This image is licensed under the terms of the GNU General Public License, version 3.0 or later, or it is licensed under the terms of the Creative Commons Attribution 4.0 International license (CC BY 4.0).

The machine in figure 1 would thus have the following settings defined in Configuration.h:

#define DEFAULT_MRZP_OFFSET_X  280.83
#define DEFAULT_MRZP_OFFSET_Y  185.25
#define DEFAULT_MRZP_OFFSET_Z -217.00

DEFAULT_ROTATIONAL_JOINT_OFFSET_X, DEFAULT_ROTATIONAL_JOINT_OFFSET_Y, DEFAULT_ROTATIONAL_JOINT_OFFSET_Z

For machines with a tilting rotating table, the rotational joint offset is the distance between the centers of rotation of joints 4 and 5.

PAX_XYZAC_TRT_ROTATIONAL_JOINT_OFFSET_Z_edited Figure 2: Negative rotational joint Z offset of a CNC machine with five axes (XYZAC) with a tilting rotating table. Note that the image shows the machine in a state where all axes are at position 0 (in machine coordinates) so that the tilting rotating table is oriented horizontally. The rotational joint Z offset is represented as distance dz. This image is licensed under the terms of the GNU General Public License, version 3.0 or later, or it is licensed under the terms of the Creative Commons Attribution 4.0 International license (CC BY 4.0).

For the machine depicted in figure 2 with a rotational joint Z offset of dz = -50 mm, rotational joint offsets would be set as follows in Configuration.h:

#define DEFAULT_ROTATIONAL_JOINT_OFFSET_X  0.00
#define DEFAULT_ROTATIONAL_JOINT_OFFSET_Y  0.00
#define DEFAULT_ROTATIONAL_JOINT_OFFSET_Z -50.00

An asymmetic tilting rotating table has rotational joint offsets along two axes as shown in figure 3.

PAX_XYZAC_TRT_ROTATIONAL_JOINT_OFFSET_YZ Figure 3: Rotational joint offsets of a CNC machine with five axes (XYZAC) with an asymmetric tilting rotating table. Note that the image shows the machine in a state where all axes are in neutral position (position 0 in machine coordinates) so that the tilting rotating table is oriented horizontally. The rotational joint y offset of this machine is dy = 44.87 and the rotational joint z offset is dz = 39.69. This image is licensed under the terms of the GNU General Public License, version 3.0 or later, or it is licensed under the terms of the Creative Commons Attribution 4.0 International license (CC BY 4.0).

For the machine depicted in figure 3 with a rotational joint Y offset of dy = 44.87 and a rotational joint Z offset of dz = 39,69 mm, the follows settings are required in Configuration.h:

#define DEFAULT_ROTATIONAL_JOINT_OFFSET_X   0.00
#define DEFAULT_ROTATIONAL_JOINT_OFFSET_Y  44.87
#define DEFAULT_ROTATIONAL_JOINT_OFFSET_Z 39,69