For a general guide to configuring RepRapFirmware, see Configuring RepRapFirmware for a Cartesian printer. Only the differences for polar printers are described here.
RepRapFirmware is configured at run-time by means of files in the /sys folder of the on-board SD card. This means that you must have an SD card in the on-board socket to use RepRapFirmware. You do not have to recompile RepRapFirmware to configure it, so if you wish to update the firmware on your Duet or other compatible electronics board, you can download a ready-built binary.
The easiest way to generate these files is using the RepRapFirmware configuration tool .
Polar printers are supported in RepRapFirmware 1.20 and later.
A Polar printer has a turntable (rotating bed) and an arm that moves along the radius of the bed. The radius motor should be connected to the X motor output of the Duet, and the turntable motor should be connected to the Y motor output.
Movement section of config.g file
Telling RepRapFirmware that your printer has Polar geometry
To tell RepRapFirmware that your printer is Polar and to define its parameters, put command M669 K7 Raaa:bbb Hccc Fnnn Annn in your sys/config.g file on the on-board SD card. The parameters are:
Knnn Geometry class, 7 = Polar
Raaa:bbb Minimum and maximum radius in mm. If only one value it given it will be used as the maximum radius, and the minimum radius will be assumed to be zero.
Hnnn Radius in mm at which the homing switch is triggered during a homing move. If this parameter is not present, the homing switch is assumed to trigger at the minimum radius.
Fnnn Maximum turntable speed in degrees per second
Annn Maximum turntable acceleration in degrees per second per second
Changes to other commands
In the M92 command, the Y parameter is the steps per degree of rotation of the turntable.
When you give a G1 H1 or G1 H2 command (or G1 S1/G1 S2 for older firmware versions), the Y coordinate in that command must be specified in degrees.
Here is an extract from a sample config.g file:
; Axis and motor configuration M569 P0 S1 ; Drive 0 (X) goes forwards M569 P1 S1 ; Drive 1 (Y) goes forwards M569 P2 S1 ; Drive 2 (Z) goes forwards M569 P3 S1 ; Drive 3 (E0) goes forwards M574 X1 Y0 Z0 S1 ; radius homing switch present, no turntable homing switch M669 K7 R0:150 H0.3 F30 A30 ; set Polar kinematics parameters M203 X6000 Y6000 Z300 E3600 ; maximum linear speeds mm/minute M906 X800 Y800 Y800 E800 ; set motor currents (mA)
If your endstop switches produce active low outputs instead of active high, replace S1 in the M574 command by S0.
You must provide homing files homeradius.g, homebed.g, homez.g and homeall.g.
homeradius.g should use a G1 H1 Xnnn command to move towards the radius at which the homing switch triggers. Then back off a little and repeat at slower speed.
homebed.g should move the turntable in an appropriate direction until the homing switch is triggered. If there is no homing switch for the turntable, then set the radius motor to a known position using a G1 H2 X command and then use G92 to define the X and Y positions. Note that if you want to support power down and resume functionality, you must provide a turntable homing switch so that the bed position can be restored.
homez.g is as for other types of printer, and homeall.g combines all the homing moves serially and/or concurrently as appropriate.
Here are some sample homing files. These assume that the radius homes to low radius, there is no turntable homing switch, and Z homing is done using a Z probe.
; File homeradius.g G91 ; relative movement G1 H2 Z4 F100 ; ensure head is clear of the bed G1 H1 X-200 F3000 ; move radius towards minimum until the endstop switch is triggered G1 H2 X5 ; move radius out by 5mm G1 H1 X-20 F600 ; move radius slowly to the endstop switch again G1 H2 Z-4 F100 ; restore original Z position
; File homebed.g G91 ; relative movement G1 H2 Z4 F100 ; ensure head is clear of the bed G90 ; absolute movement G1 H2 X50 ; move to 50mm radius G92 X50 Y0 ; define current position as X50 Y0 G91 ; relative movement G1 H2 Z-4 F100 ; restore original Z position
; File homez.g G91 ; relative movement G1 H2 Z4 F200 ; raise head 4mm to ensure it is above the Z probe trigger height G90 ; back to absolute mode G1 X0 Y0 ; put head over the centre of the bed, or wherever you want to probe G30 ; lower head, stop when probe triggered and set Z to trigger height
; File homeall.g G91 ; relative movement G1 H2 Z4 F100 ; ensure head is clear of the bed G1 H1 X-200 F3000 ; move radius towards minimum until the endstop switch is triggered G1 H2 X5 ; move radius out by 5mm G1 H1 X-20 F600 ; move radius slowly to the endstop switch again ; Home bed G90 ; absolute movement G1 H2 X50 ; move to 50mm from centre of bed G92 X50 Y0 ; define current position as X50 Y0 ; Home Z G1 X5 Y0 ; put head near the centre of the bed, or wherever you want to probe G30 ; lower head, stop when probe triggered and set Z to trigger height
Testing the motors individually
You can test the three motion motors individually by putting the printer in relative mode (G91 command) and then using the G1 command with H2 parameter. For example, sending G1 H2 X10 should increase the radius by 10mm, and sending G1 H2 Y-10 should rotate the turntable by 10 degrees clockwise.
If a motor moves the wrong way, you can reverse it by changing the corresponding M569 command in config.g. For example, if the radius motor moves the wrong way, change M569 P0 S1 to M569 P0 S0.