https://docs.duet3d.com/
Help

Revision to Configuring RepRapFirmware for a FiveAxisRobot

JoergS5

Status summary:
-* done: documentation, P0 and P2 kinematics and inverse kinematics, A parameter, P2:nnn, R parameter
-* current: working on prototype. Check and describe homing and M208 (probably there are bugs). Support for P1, P3 and P4
-* open: D, B, C parameters, 6th axis rail support, additional construction possibilities (arm 1/2 support more angles)
+* done: documentation, implemented P0, P2, P3, P4, A, R
+* current: working on 3D printer and validate code
+* open: D, B, C, rail support, additional construction possibilities (arm 1/2 support more angles). P1 and D postponed
Status History:
-* Sep 20: Xo, Yo Axis 5 offsets implemented. New P4
+* Sep 22: M208 as angle limits, remove A parameter
+* Sep 22: P3, P4 implemented
+* Sep 20: Xo, Yo Axis 5 offsets implemented
* Sep 15: changed B parameter
* Sep 10: added A to M669 report
* Xm, Ym are the cartesian coordinates of axis 1. Z is not relevant
* Xn, Yn, Zn are the cartesian coorindates of axis 2
-* Xo, Yo optional offset between end of arm 4 and axis 5, default is 0 each
+* Xo, Yo optional offset between end of arm 4 and axis 5, default is 0 each. See section Axis5offset section below for details.
'''Cm:xxx:yyy:zzz''' are parameters if the rail is used
'''Lnnn:mmm:ppp:qqq''' are the arm lengths for arms 2 to 5. Mandatory parameter without default. The arm length is measured from middle of hinge to middle of other hinge (arm 5: middle of nozzle).
-
-'''Aamin:amax:bmin:bmax:cmin:cmax:dmin:dmax:emin:emax''' restrictions for angles:
-
-* amin:amax axis1 restriction, 0 degree is straight to left. Positive is counterclockwise.
-* bmin:bmax axis2 restriction, positive angle is arm2 up, negative down. Angle2 is the angle between horizontal and arm 2.
-* cmin:cmax axis3 restriction, positive angle 3 is arm3 up, negative down. Angle 3 is the angle between angle 2 and angle 3.
-* dmin:dmax is the angle between arm 3 and arm 4, negative is down.
-* emin:emax is the angle from straight line between arms 2 to 4 and arm 5. 0 degree is straight to right. Positive is counterclockwise. The angle can be smaller than -180 degree and bigger than 180 degree to allow some necessary axis 5 rotations in modes P1 and P3. Care with the wires and filament must be taken to use it.
-* default is A-45:45:0:75:-75:-5:-170:170:-135:135
'''Pn''' defines the behaviour of axis 5:
* D2 check printable region by test moves and compare to M208 setting. Report problems. Show optimizing settings and used memory.
-'''Bor:a2:a3:a4:a5''' robot orientation and correction factor for bending the arms. Default is B0:0:0:0:0
+'''Bor:b2:b3:b4:b5''' robot orientation and correction factor for bending the arms. Default is B0:0:0:0:0
'''Important''': The coordinate system remains with X being the direction from axis 1 - arm2 - arm3 etc., Y "behind axis 1" and Z "above" the construction, even when the robot is assembled top-down (then Z directs to bottom). The B orientation tells the kinematics in which direction the arms bend.
I'l make images to explain when I have implemented it. The bending differs depending on the orientation due to the direction of the gravitational forces.
-a2 to a5 in mm in Z direction at the end of each arm when bending of the arms is horzontal and maximal. If the arm is angled up or down, a fraction of the bending is calculated according to the forces. The parameter is optional with default value 0. Bending can be measured or calculated by e-Module and weight. The e-Module depends on the material of the arm. Bending and arm length shortage of the arms are approximated (otherwise calculations would be very complex), so bending to arm length ratio should be small.
+b2 to b5 is the bending for arms 2 to 5 in mm in Z direction at the end of each arm when bending of the arms is horzontal and maximal. If the arm is angled up or down, a fraction of the bending is calculated according to the forces. The parameter is optional with default value 0. Bending can be measured or calculated by e-Module and weight. The e-Module depends on the material of the arm. Bending and arm length shortage of the arms are approximated (otherwise calculations would be very complex), so bending to arm length ratio should be small.
== Other config parameters ==
'''M92''' is calculated as usual, but instead of mm the degrees of the angles are used. Microsteps and Gear ratios must be accounted for in the values.
-'''M208''' defines the printable area. If the robot shall make a move to a point which is inside of M208, but not reachable by the arm and angle restrictions, an error will be reported and the move will not be possible.
-
-To be clarified: is M208 the cartesian coordinates limit or the limit of the different actuator angles?
+'''M208''' defines the range of the different axes and rail. An explanation of the values is in a separate section below. M208 is used by G1 H1, G1 H2 for homing and to restrict the printable area. The values hinder the printer to print outside this area.
'''G31 X Y Z''' probe as offset relative to hotend position for mesh compensation.
+G1 H1 and G1 H2 values for X, Y, Z, U, V are degree values. W is in the distance in mm.
+
== Homing ==
-The home file which homes all axes is called home5axisrobot.g
+The home file which homes all axes is called homeall.g
Axis 1 is homed so that 0 degree means arm 2 and 3 are parallel to the X axis. Plus angle is counterclockwise.
Axis 6 (if rail is used) is a linear actuator and defines an offset to coordinate X , Y or Z depending on the mode.
+
+G1 H1 doesn't make sense, because it sets the position to the M208 minimum/maximum value when hitting the endstop. After hitting the endstop, the position should be set by an additional G92.
== Object Model, M669 ==
};
-To support P1 and P3 modes, it is necessary for the kinematics to know the G0/G1 printing path of the current G-Code move. The method setPlannedPath is used to set the path. It must be called from a location in the DDA/Move/... classes. The following code must be added in ...:
+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). See https://github.com/Duet3D/RepRapFirmware/blob/v3.02-dev/BuildInstructions.md plus the changes above.
-... (tbd)
+== Axis5offset ==
-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).
+The offset allows that axis 5 doesn't need to be vertical below arm 4, but with an offset. In the image offset x is positive and offset y is negative:
+
+[image|2931]
+
+== M208 values ==
+
+M208 sets the limits for axes and rail angles:
+
+* axis 1 = X: 0 degree is straight to left. Positive is counterclockwise.
+* axis 2 = Y: positive angle is arm2 up, negative down. Angle2 is the angle between horizontal and arm 2.
+* axis 3 = Z: positive angle 3 is arm3 up, negative down. Angle 3 is the angle between angle 2 and angle 3.
+* axis 4 = U: angle between arm 3 and arm 4, negative is down. If axis 4 angles are too restrictive, printing can be disabled, because arm 4 must be able to be oriented vertical.
+* axis 5 = V: angle from straight line between arms 2 to 4 and arm 5. 0 degree is straight to right. Positive is counterclockwise. The angle can be smaller than -180 degree and bigger than 180 degree to allow some necessary axis 5 rotations in modes P1 and P3. Care with the wires and filament must be taken to use it.
+
+* rail = W: coordinate position in mm.
+
+An example of M208 setting is:
+
+M208 X-45.0:45.0 Y0.0:75.0 Z-75.0:-5.0 U-170.0:170.0 V-135.0:135.0 W0.0:5000.0

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

Revert Changes