https://docs.duet3d.com/
Help

Revision to Configuring RepRapFirmware for a FiveAxisRobot

JoergS5

The kinematics will be pull requested into RRF3, but while developing and testing it is created in https://github.com/JoergS5/RepRapFirmware/tree/v3.02-dev/src/Movement/Kinematics as fork of RRF3 v3.02 dev branch. Filenames are FiveAxisRobotKinematics.cpp and .h
-For compilation, a few additional source changes must be made according to https://github.com/Duet3D/RepRapFirmware/blob/dev/AddingNewKinematics.md (steps 1 and 4).
+For compilation, a few additional source changes must be made according to https://github.com/Duet3D/RepRapFirmware/blob/dev/AddingNewKinematics.md (step 4, see below).
-Status:
+Status summary:
* done: documentation, P0 and P2 kinematics and inverse kinematics, A parameter, P2:nnn, R parameter
* current: working on prototype
-* current bug: P2:<angle> is only working in manual mode (not in config).
* open: P1, P3, D, B, C parameters, 6th axis rail support, additional construction possibilities (arm 1/2 support more angles)
-* changed: for rail new parameter C and moving away from X and Y.
+
+Status History:
+
+* Sep 08 2020: separate rail properties, compact M669 status display
== Construction ==
This shows that arms 2 to 3 are in one line, arm 4 is vertical, arm 5 rotates horizontically.
-An optional 6th rail axis is installed parallel to the X or Y axis. If K669 has a parameter C defined, a rail is used with letter W.
+An optional 6th rail axis is installed parallel to X, Y or Z axis and has drive letter W.
== M669 settings ==
'''Cm:xxx:yyy:zzz''' are parameters if the rail is used
-m is the mode of the rail
+m is the mode of the rail, XYZ are the offsets from the coordinates. All four parameters must be used, or C0 without xyz. Invalid settings are ignored.
-* C0... means no rail used
-* C1... means parallel to X axis, with X offset
-* C2... means parallel to Y axis, with Y offset
-* C3... means parallel to Z axis, with Z offset. That means the robot moves up and down like at a wall.
-
-If the 6th axis rail is used, X is the offset in X direction, Y and Z respectively. All four parameters must be used.
+* C0 means no rail used. Default
+* C1:x:y:z means parallel to X axis, with X offset
+* C2:x:y:z means parallel to Y axis, with Y offset
+* C3:x:y:z means parallel to Z axis, with Z offset. That means the robot moves up and down, e. g. if assembled at a wall.
'''Rn''' is the actuator construction type.
== Object Model, M669 ==
-The current M669 setting can be asked for by calling M669 without parameters.
+The current M669 setting can be asked for by calling M669 without parameters. Every time M669 is called to set all or some new values, the new settings are displayed.
The Object Model is defined including some of the important parameters like axis 1 and 2 coordinates, arm lengths, restrictions and current P mode.
== Configuration example ==
-M669 K13 X20.0:5.0 Y0.0:10.0 Z50.0 R1 L300.0:400.0:200.0:100.0 P0
+M669 K13 X20.0:5.0 Y0.0:10.0 Z50.0 L300.0:400.0:200.0:100.0 R1 P2:45.0 C0
+
+The example means: axis 1 is at position 20/0, Axis 2 is left of it and a bit behind and 50 mm height, the 4th axis has no actuator (R1), axis 5 has always angle 45° with respect to the XY coordinates and no rail is used.
+
+== Compiling firmware ==
+
+As long as the source is developed in a fork, it needs to add information at three places.
+
+In Kinematics.cpp:
+
+#include "FiveAxisRobotKinematics.h"
+
+then in the switch statement:
+
+case KinematicsType::robot5axis:
+
+return new FiveAxisRobotKinematics();
+
+and in Kinematics.h in the enum of KinematicsType robot5axis.
+
+In the .h it must be at the correct position:
+
+...
+
+markForged,
+
+collinearTriperon, // reserved...
+
+robot5axis,
+
+unknown // this one must be last!
+
+};
+
+The code will compile without errors, if the projects tags 3.1.0 are used with the addition of the two Robot files. (Go to github into the project, click on the button Tags, download the 3.1.0 zip file).

To undo the changes made by this version, click 'Revert Changes.' This will automatically restore the previous version of this guide.

Revert Changes