This document is relevant to: All Duet boards
Firmware versions: All versions
Difficulty: Moderate
Time Required: 30 minutes - 1 hour
This guide covers configuring RepRapFirmware for your machine.
If you have any problems with your Duet when using this guide, rather than posting comments, please use our support forum: https://forum.duet3d.com/
If you have just changed your configuration, and the Duet has rebooted with mains power, IMMEDIATELY check that your new configuration is not heating heaters/moving axes/starting spindles or any other unexpected and unwanted behaviour. If it is, TURN OFF THE POWER! You can investigate any problems and check configuration by powering the Duet with USB power only.
If you changed the machine name in the RepRapFirmware Configurator, this will be reflected in the .local address. For instance, if you named the machine "My Printer", you will navigate to myprinter.local/ (without spaces and not case sensitive).
Open your browser and navigate to yourduetname.local
or the IP address you set.
If you have trouble finding the IP address of the Duet, you can:
You will be using Duet Web Console (DWC) for most of the commissioning; see User manual: Duet Web Console for a full introduction to the interface.
A good first check is to see if there are any errors in your configuration, by testing your config.g. You can do this by running the config.g, and any errors will be reported. In DWC go to the Control > Console option, and type in M98 P"config.g"
. This can also be sent from a USB-connected serial terminal. This will re-run your config.g. Note that it is best to run this command after a reset or power on, because if you have sent any commands to change settings, this will reset them.
A normal console output may look like this:
M98 P"config.g"
HTTP is enabled on port 80
FTP is disabled
TELNET is disabled
You may receive errors that look like these; comments after are added to help fix them:
Error: Unknown pin name 'duex.e1heat' ; incorrect pin name, see the 'Pin names' section of your boards hardware info page
Error: Heater 1 not found ; If the M950 command that defines a heater is incorrect, no heater is created, all subsequent commands referring to it generate an error
Error: Heater 1 does not exist ; see above
Error: Sensor 4 does not exist ; M950 heater definition includes a reference to a sensor that hasn't been configured
Error: Bad command: mp"" Y"thermistor" T100000 B4138 ; Related to the above, the M308 line defining the sensor is incorrect
Error: in file macro line 108: M308: missing parameter 'S' ; as above
Error: Heater 4 not found ; With the M308 and M950 command not correct, no heater is created, all subsequent commands referring to it generate an error
Error: Heater 4 does not exist ; as above
Error: Unknown pin name 'duex.fan0' ; Incorrect fan pin name, see the 'Pin names' section of your boards hardware info page
Error: Fan number 0 not found ; If the M950 command that defines a fan is incorrect, no fan is created, all subsequent commands referring to it generate an error
Warning: Heater 0 predicted maximum temperature at full power is 403°C ; This is just a warning, not necessarily an error. It is usually due to M307 parameters for that heater, and often that the heater has not been tuned, but also the heater might just be able to get that hot!
Depending on the error reported, check Gcode in your config.g and fix the error.
You can use M98 P"config.g"
any time to check your config.g, and is a useful diagnostic tool.
To get accurate temperatures, you must configure temperature sensing correctly for the type of temperature sensor you are using. The default values in the RepRapFirmware Configuration Tool are unlikely to be correct!
On the 'Control > Dashboard' page of DWC, in the Tools section, check the 'Current' temperature reading on each heater. Each heater is configured to be either a Tool, Bed or Chamber, eg "T0", "Bed".
Troubleshooting
If you get a temperature reading of "-273°C", this indicates an open circuit, i.e. nothing is connected to the defined pins.
If you get a temperature reading of "2000°C", this indicates a dead short between the temperature sensor pins on the Duet, or mis-configured firmware.
Further reading
See User manual: Connecting thermistor and PT1000 temperature sensors and M308 (RRF 3.x) or M305 (RRF 2.x) for more details.
Next, check the fans are operating correctly.
Always On fans
Always On fans should already be on. Check them at this time.
Part cooling fans
Test fans in DWC with the Control > Dashboard > Fan Control slider:
Test fans by entering GCode commands directly:
M106 P0 S1
. The S parameter sets the fan speed, where 0 is off and 1 is on 100%.M106 P0 S0
.Thermostatically controlled fans
Thermostatically controlled fans are not displayed on the Fan Control slider. But we can check them by temporarily changing the temperature at which they activate.
M106 P1 T1 H1
. The T parameter sets the temperature the fan comes on at.M106 P1 T50 H1
Further reading
See User manual: Connecting and configuring fans and GCode M106 for more details.
After confirming the operation of the fans, to reset the configuration you can either press the "Reset" button on the Duet, or send
M999
, or re-run config.g by sendingM98 P"config.g"
in 'Control > Console'.
Manually controlling heaters
On the Dashboard page, the Tools section lists the tools, bed heaters and chamber heaters. The Temperature Chart shows the heater temperature over time.
The firmware allows one tool to be selected/active at a time. The associated heater(s) is/are set to 'active' when the tool is selected, and set to 'standby' when the tool is deselected. However, tool heaters can also be manually controlled, independently of tools.
Under the first 'Heater [#]' (where # is the heater number) it should say 'off', 'standby' or 'active'.
Testing heaters
WARNING: If you enable the heater but do not observe an increase in the temperature reading, turn off the controller immediately and check your wiring.
Enter a number in the "Active" box for the first tool, or choose an appropriate temperature from the drop-down list. Start off with a low number such as 35°C. Press return to set this temperature.
With the heater set to 'active', you should see the corresponding temperature begin to rise, and this will show on the temperature chart. It is possible that it will overshoot the set temperature a bit; this is OK.
You can also check that thermostatically controlled fans are working as expected, by setting a heater temperature higher than the trigger temperature for the fan, eg 60°C.
Complete this step by clicking the tool, bed or chamber name, or the heater name, to set the tool/heater into 'standby' or 'off'.
Repeat this step for the rest of the tool, bed and chamber heaters. Bed and chamber heaters usually take much longer than nozzle heaters to heat up and cool down, so you can set their active temperature lower to test.
Troubleshooting
You may receive errors such as "Error: Heater [heater #] fault: temperature rising too slowly". This is usually because the firmware does not have an accurate model of how the heater responds. You will need to 'tune' the heaters, which is covered in the next section.
It is recommended that you 'tune' your heaters after ensuring their functionality. This gives the firmware an accurate model of how your heater responds, so it can spot if something goes wrong. Make sure that your temperature sensors are configured correctly and reporting sensible temperatures first!
If you have received a temperature error and a heater is marked as 'fault', click on the tool, bed or chamber name, or the heater name, to reset the heater fault. DWC will pop up a stern warning with a timer, and allow you to reset the fault after a few seconds. You can also send M562 to reset temperature faults.
Tuning heaters
To tune heaters, use the M303 GCode command.
Tune tool heaters first. In Control > Console, send M303 T0 S200
where 'T' is the tool number, and 'S' is the target temperature. Tuning a tool heater usually takes around five to ten minutes.
M303 H1 S200
, where 'H' is the heater number.To tune a bed or chamber heater, send M303 H0 S60
where 'H' is the heater number for the bed or chamber, and 'S' is the target temperature. Tuning these heaters can take a long time, possibly up to 2 hours, as the heater needs to go through a number of heating and cooling cycles. The bigger the heater, the longer this takes.
Result
If successful, the firmware will report the parameters to use, and an M307 GCcode command e.g.:
M307 H1 R7.046 K1.519:0.006 D3.58 E1.35 S1.00 B0 V23.9
(RRF 3.4 and later)
M307 H1 B0 R1.839 C270.7:170.1 D8.10 S1.00 V12.1
(RRF 3.3 and earlier)
Then, either:
If you need to 'hot-tighten' your hot end nozzle, now is a good time to do it. Set the Tool heater active temperature to the temperature specified by the manufacturer and click the tool name to set the tool to active. Once finished, click the tool name to turn off the heater.
After confirming the operation of the heaters and to save and implement the changes you have made, you need to reset the Duet. If you edit then save the config.g, DWC should ask if you want to reset the Duet or re-run config.g. You can also press the "Reset" button on the Duet, or send
M999
, or re-run config.g by sendingM98 P"config.g"
in 'Control > Console'.
Troubleshooting and further reading
If you encounter any errors, see User manual: Tuning the heater temperature control for more details.
Never connect endstop wires from +3.3v to ground. This will create a short circuit and could damage the Duet.
When 'homing' your machine, each axis will move towards the end of its travel. It expects to trigger a switch, which will set the axis location. Simple microswitches, hall sensors or optical sensors can be used.
M574
in the console.You can check the status of your endstops a number of ways:
In DWC v3.5 and later, the endstop status is indicated in the Status panel. If the endstop is triggered, a green square will highlight the axis that is triggered. If there is no green square, it is not triggered.
Send M119 to check endstop status in all versions of DWC/RRF. This can be sent from DWC, a PanelDue, or over USB, if connected by serial terminal.
M119
in the text box, then press return or the 'Send' button. You should get the endstop status response in the area below.M119
and press return; the Duet will respond with the endstop status.You can check the endstops status in the DWC Object model browser in RRF/DWC v3.0 and later. The RepRapFirmware Object model shows all the firmware variables and values.
In DWC v3.3 and v3.4, you can also install a plugin to show endstop status.
If you found that any endstops are not configured properly in the last step, navigate to 'Files > System' and open the config.g file. Endstops are configured here. In RRF 3.x, each endstop has it's own configuration line, using M574, e.g.
; Endstops
M574 X2 S1 P"io1.in" ; configure switch-type (e.g. microswitch) endstop for high end on X via pin io1.in
M574 Y1 S1 P"io2.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin io2.in
M574 Z2 S1 P"!io4.in" ; configure switch-type (e.g. microswitch) endstop for high end on Z via pin !io4.in
High end or low end?
M574 X0
would mean no endstop on X, M574 Y2
means Y endstop on the high end.Note that if you changed which end your endstop is located, you will generally need to update your homing macros (homeall.g, homex.g, homey.g, homez.g and any others if you have more axes) to get the axis to move in the correct direction, towards the endstop, during homing.
Active high or active low?
!
, eg M574 Y2 P"!ystop"
!
in it, remove it.After confirming the operation of the endstops and to save and implement the changes you have made, you need to reset the Duet. If you edit then save the config.g, DWC should ask if you want to reset the Duet or re-run config.g. You can also press the "Reset" button on the Duet, or send
M999
, or re-run config.g by sendingM98 P"config.g"
in 'Control > Console'.
Further reading
See Configuring endstop switches for more details.
Check the operation of your X, Y, Z and other axes stepper motors.
M564 S0 H0
. You can also enter GCodes into the field in the centre of the bar at the top of the page.Check the operation of your extruder stepper motors.
M302 P1
. You can also enter GCodes into the field in the centre of the bar at the top of the page.M302 P0
.Reversing a Stepper Motor
After confirming the operation of the motors and to save and implement the changes you have made, you need to reset the Duet. If you edit then save the config.g, DWC should ask if you want to reset the Duet or re-run config.g. You can also press the "Reset" button on the Duet, or send
M999
, or re-run config.g by sendingM98 P"config.g"
in 'Control > Console'.
Check distance moved
Once the motors are moving in the correct direction, you can test if they are configured to move the correct distance.
The distance an axis moves is defined by:
These should have been set correctly during Configuring firmware.
Test the X, Y, Z and any other axis motor by moving each axis a bit further (+/-10mm, then +/-100mm) and measure the distance moved with a ruler. If an axis moves too far, or not far enough, check the values you set for microstepping (M350) and steps per mm (M92).
Testing and calibrating extruder motors is covered in the next guide, Calibration
Test homing
Once you have checked your motors are moving the correct direction and distance, you can test homing.
Check configuration
Test Z Probe
M575 P1 S1 B57600
Congratulations! Upon completion of this guide, your Duet is set up.
The next step will be calibrating and tuning the various parts of your printer, running test prints, and then printing! This can include:
For the above see User manual: Tuning
For further details the following wiki pages are a good place to start: