### Example Configuration File Source: https://docs.duet3d.com/User_manual/Machine_configuration/Configuration_five_bar_parallel_scara A sample configuration snippet showing drive setup, homing switches, M669 geometry, and motor parameters. ```G-code 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 Y1 Z0 S1 ; proximal L and R homing switches trigger when the arm is at M669 B positions and are active high M669 K9 X0:100 Y0:0 P300:300 D300:300:0:0 ; arms are 300 mm long, actuators are 100 mm apart, other parameters take defaults. (Be aware, that D always needs 4 Parameters) M203 X10000 Y10000 Z300 E3600 ; maximum speeds mm/minute M906 X800 Y800 Z800 E800 ; set motor currents (mA) ``` -------------------------------- ### Bootloader update result Source: https://docs.duet3d.com/User_manual/RepRapFirmware/Updating_bootloader Example output confirming the start of a bootloader update process. ```text 14/11/2020, 19:01:25 M997 B20 S3 Board 20 starting bootloader update ``` -------------------------------- ### G0/G1 Examples Source: https://docs.duet3d.com/User_manual/Reference/Gcodes/M669 Illustrative examples of how to use the G0 and G1 commands with different parameters. ```APIDOC ## G0/G1 Examples ### Request Example ``` G0 X12 ; (move to 12mm on the X axis) G0 F1500 ; (Set the feedrate to 1500mm/minute) G1 X90.6 Y13.8 E22.4 ; (Move to 90.6mm on the X axis and 13.8mm on the Y axis while extruding 22.4mm of material) G1 E10:10:5:0:0 F300 ; with a tool that has 5 extruder drives, extrude 10mm on drive 0, 10mm on drive 1, 5mm on drive 2 and 0mm on drive 3 and 4. ``` ``` -------------------------------- ### M558 Examples Source: https://docs.duet3d.com/User_manual/Reference/Gcodes/G32 Illustrative examples of using the M558 command for various probe setups. ```APIDOC ## M558 Examples ### Probe Connected to Duet 2 E0 Endstop Input ``` M558 P5 C"e0stop" H5 F120 T3000 ``` ### No Z Endstop Switch (RRF 3.0 on Duet 2 ONLY) ``` M574 Z0 P"nil" M558 P5 C"zstop" H5 F120 T3000 ``` ### BL Touch on Duet 3 Mini 5+ ``` M950 S0 C"io3.out" M558 P9 C"io3.in" H5 F500:120 T3000 M280 P0 S10 ``` ### BL Touch on Duet WiFi ``` M950 S0 C"exp.heater3" M558 P9 C"^zprobe.in" H5 F120 T3000 M280 P0 S10 ``` ### Duet Smart Effector on Duet 2 ``` M558 P8 C"zprobe.in+zprobe.mod" R0.4 F1200 ``` ``` -------------------------------- ### Example mesh.g for Tool Changer Source: https://docs.duet3d.com/User_manual/Tuning/scanning_z_probe_calibration A mesh.g file example configured for a tool changer setup. ```G-code T-1 M208 S0 Y100 G29 S2 G1 X0 Y0 F30000 G30 if exists(param.K) & param.K=1 G1 Z6 ; to avoid backlash M558.1 K1 S1.7 G29 S0 K{exists(param.K) ? param.K : 0} G1 X0 Y-150 F18000 M208 S0 Y49 ``` -------------------------------- ### Configure MQTT in Standalone and SBC Mode Source: https://docs.duet3d.com/User_manual/Reference/Gcodes/G17 Examples for setting up MQTT client parameters, enabling the protocol, and publishing messages. ```G-code M586.4 C"duet" ; Set client ID M586.4 U"username" K"password" ; Set authentication credentials M586.4 S"subscription" O2 ; Subscribe to topic M586 P4 R1884 H192.168.10.244 S1 ; Enable MQTT protocol/client M118 P6 S"message" T"topic" ; Publish message (See M118 for more details) M586 P4 S0 ; Disable MQTT protocol/client; disconnects from broker gracefully. ``` ```G-code M586.4 C"duet" U"username" K"password" S"subscription" O2 ; configure MQTT parameters M586 P4 R1884 H192.168.10.244 S1 ; Enable MQTT protocol/client M118 P6 S"message" T"topic" ; Publish message (See M118 for more details) M586 P4 S0 ; Disable MQTT protocol/client; disconnects from broker ``` -------------------------------- ### Robot Configuration Example Source: https://docs.duet3d.com/User_manual/Machine_configuration/RobotViewer_DWC_plugin Example of a 6-axis robot configuration including DH parameters and tool length specification. The G10 command might need adjustment for specific setups. ```gcode AT:RPRRRR Tool 1 G10 P1 X0 Y0 Z0 ``` -------------------------------- ### Initialize Local RobotViewer Project Source: https://docs.duet3d.com/User_manual/Machine_configuration/RobotViewer_DWC_plugin Commands to set up a new Vue 2 project and install the required Babylon.js and Vuetify dependencies. ```bash npm init vue@2 cd into projectname folder npm install vue@2.6.14 npm install @babylonjs/core@4.2.2 npm install @babylonjs/gui@4.2.2 npm install @babylonjs/inspector@4.2.2 npm install vuetify@2.6.4 ``` -------------------------------- ### Enable and Configure MQTT Protocol (Standalone/SBC Mode) Source: https://docs.duet3d.com/User_manual/Reference/Gcodes/G18 Enable the MQTT protocol client with specific parameters like port, retain, and host. This example shows enabling with specific settings. ```gcode M586 P4 R1884 H192.168.10.244 S1 ; Enable MQTT protocol/client ``` -------------------------------- ### Configure Z-Probe Examples Source: https://docs.duet3d.com/User_manual/Reference/Gcodes/G30 Various configurations for different probe types and hardware setups. ```G-code M558 P5 C"e0stop" H5 F120 T3000 ; probe connected to Duet 2 E0 endstop input ``` ```G-code M574 Z0 P"nil" ; (RRF 3.0 on Duet 2 ONLY) no Z endstop switch, free up Z endstop input M558 P5 C"zstop" H5 F120 T3000 ; probe connected to Duet 2 Z endstop input ``` ```G-code ; BL Touch on Duet 3 Mini 5+ M950 S0 C"io3.out" ; servo/gpio 0 is io3.out pin M558 P9 C"io3.in" H5 F500:120 T3000 ; BLTouch connected to io3.in pin ... M280 P0 S10 ; send control signal to BLTouch through servo/gpio 0 ``` ```G-code ; BLTouch on Duet WiFi M950 S0 C"exp.heater3" ; create servo/gpio 0 on heater 3 pin on expansion connector M558 P9 C"^zprobe.in" H5 F120 T3000 ; BLTouch connected to Z probe IN pin ... M280 P0 S10 ; send control signal to BLTouch through servo/gpio 0 ``` ```G-code ; For the Duet Smart Effector on Duet 2 M558 P8 C"zprobe.in+zprobe.mod" R0.4 F1200 ; zprobe.mod is the programming pin for M672 ``` -------------------------------- ### M558 Example Configurations Source: https://docs.duet3d.com/User_manual/Reference/Gcodes/G30 Examples demonstrating the usage of the M558 command for different probe types and hardware. ```APIDOC ## M558 Example Configurations ### Description Provides practical examples of how to configure the M558 command for various scenarios, including different probe types and specific hardware setups. ### Examples * **Standard Probe on Duet 2 E0 endstop input:** ``` M558 P5 C"e0stop" H5 F120 T3000 ``` * **No Z endstop switch (RRF 3.0 on Duet 2 ONLY):** ``` M574 Z0 P"nil" M558 P5 C"zstop" H5 F120 T3000 ``` * **BL Touch on Duet 3 Mini 5+:** ``` M950 S0 C"io3.out" ; servo/gpio 0 is io3.out pin M558 P9 C"io3.in" H5 F500:120 T3000 ; BLTouch connected to io3.in pin M280 P0 S10 ; send control signal to BLTouch through servo/gpio 0 ``` * **BL Touch on Duet WiFi:** ``` M950 S0 C"exp.heater3" ; create servo/gpio 0 on heater 3 pin on expansion connector M558 P9 C"^zprobe.in" H5 F120 T3000 ; BLTouch connected to Z probe IN pin M280 P0 S10 ; send control signal to BLTouch through servo/gpio 0 ``` * **Duet Smart Effector on Duet 2:** ``` M558 P8 C"zprobe.in+zprobe.mod" R0.4 F1200 ; zprobe.mod is the programming pin for M672 ``` ### Response #### Success Response (200) No specific success response body is defined for these examples. Configuration is applied internally. #### Response Example None ``` -------------------------------- ### Configure Chamber Heater Source: https://docs.duet3d.com/User_manual/Machine_configuration/Configuration_cartesian Example setup for a chamber heater mapped to a thermistor sensor. ```G-code M308 S3 P"temp2" Y"thermistor" T100000 B4138 ; configure sensor 3 as thermistor on pin temp2 M950 H3 C"out2" T3 ; create chamber heater output on out2 and map it to sensor 3 M307 H3 B0 S1.00 ; disable bang-bang mode for the chamber heater and set PWM limit M141 H3 ; map chamber to heater 3 M143 H3 S100 ; set temperature limit for heater 3 to 100C ``` -------------------------------- ### Configure MQTT Client and Connection Source: https://docs.duet3d.com/User_manual/Reference/Gcodes/G1 Use these commands to set up the MQTT client ID, authentication credentials, and subscription topics. Ensure the broker supports anonymous login or provide credentials. ```gcode M586.4 C"duet" ; Set client ID M586.4 U"username" K"password" ; Set authentication credentials M586.4 S"subscription" O2 ; Subscribe to topic ``` ```gcode M586.4 C"duet" U"username" K"password" S"subscription" O2 ; configure MQTT parameters ``` -------------------------------- ### Configure Z Probe Parameters Source: https://docs.duet3d.com/User_manual/Reference/Gcodes/G1 Examples of M558 configurations for various probe types and hardware setups. ```G-code M558 P1 X1 Y0 Z1 F500 T5000 H3 ; probe is used for homing X and Z axes (RRF 1.19 and earlier) ``` ```G-code M558 P4 H5 F120 T3000 ; probe connected to E0 endstop input ``` ```G-code M558 P7 H5 F120 T3000 ; probe connected to Z endstop input ``` ```G-code M558 P9 H5 F120 T3000 ; BLTouch connected to Z probe IN pin ... M280 P64 S10 ; send control signal to BLTouch through Z probe MOD pin ``` ```G-code M558 P9 H5 F120 T3000 ; BLTouch connected to Z probe IN pin M307 H3 A-1 C-1 D-1 ; free up heater 3 to use as BLTouch servo pin ... M280 P3 S10 I1 ; send control signal to BLTouch through heater 3 pin ``` -------------------------------- ### Start Development Server Source: https://docs.duet3d.com/User_manual/Machine_configuration/RobotViewer_DWC_plugin Command to launch the local development server for the Vue.js application. ```bash npm run dev ``` -------------------------------- ### Tool Preheat Example Source: https://docs.duet3d.com/User_manual/Tuning/Tool_changing Arranges for both tools to start heating simultaneously. This can be placed in the sys/start.g file or generated by the slicer. ```gcode G10 P0 S200 R150 ; Set tool 0 active and standby temperatures G10 P1 S200 R150 ; Set tool 1 active and standby temperatures T1 P0 ; Select tool 1 to turn it on but don't execute tool change scripts T0 ; Select tool 0 M116 ; Wait for all temperatures to be reached ``` -------------------------------- ### Define main menu file structure Source: https://docs.duet3d.com/User_manual/Connecting_hardware/Display_12864_menu Example configuration for a main menu file, including text labels, images, heater values, and navigation buttons. ```text text R0 C0 F1 T"My Super 3D Printer " image L"reprapimg.bin" text R15 C0 F0 T"Bed temp " alter N180 W30 text T" actual " value N80 W30 button R27 C0 T"Preheat PLA" A"M98 P#0" L"/macros/Preheat PLA" button R39 C0 T"Preheat ABS" A"M98 P#0" L"/macros/Preheat ABS" button R51 C0 T"Select file to print" A"menu" L"listFiles" ``` -------------------------------- ### M950 - Create Fan Source: https://docs.duet3d.com/User_manual/Reference/Gcodes/G17 This section details the configuration of fans using the M950 command, including specific parameters and examples for fan setup. ```APIDOC ## M950 F ### Description Creates a fan using the M950 command. ### Method M950 ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body **Fnn** (integer) - Fan number. Required. **C"name"** (string) - Pin name(s) and optional inversion status. Pin name "nil" frees up the pin. A leading '!' character inverts the input or output. A leading '^' character enables the pullup resistor. The '^' and '!' characters may be placed in either order. **Qnn** (integer, optional) - PWM frequency in Hz. Valid range: 0-65535, default: 250 for fans. **Knn** (integer, optional, RRF 3.5 and later) - For fans, number of pulses output by the tacho per revolution of the fan, default: 2. Valid range: 0.5-20, 0.5-200 in RRF 3.6.0 and later. ### Request Example ```json M950 F3 C"heater2" Q100 M950 F2 C"!fan2+^exp.pb6" M950 F5 C"!out4+out4.tach" Q450 M950 F0 C"!1.out3+out3.tach" Q450 ``` ### Response #### Success Response (200) No specific response body is detailed for this command, typically it configures hardware. #### Response Example None ``` -------------------------------- ### Install DSF from Unstable/Beta Feed Source: https://docs.duet3d.com/User_manual/Machine_configuration/DSF_Other Commands to add the unstable package repository and install the Duet Software Framework. ```bash wget -q https://pkg.duet3d.com/duet3d.gpg wget -q https://pkg.duet3d.com/duet3d-unstable.list sudo mv duet3d.gpg /etc/apt/trusted.gpg.d/ sudo mv duet3d-unstable.list /etc/apt/sources.list.d/duet3d.list sudo chown root:root /etc/apt/trusted.gpg.d/duet3d.gpg sudo chown root:root /etc/apt/sources.list.d/duet3d.list ``` ```bash sudo apt-get install apt-transport-https sudo apt-get update sudo apt-get install duetsoftwareframework ``` -------------------------------- ### Initial PID Setup Source: https://docs.duet3d.com/User_manual/Tuning/Duet_3_1HCL_tuning Set all PID gains to zero and holding current to 100 before starting the tuning process. Replace ##.# with the driver's address and # with the axis being tuned. ```gcode M569.1 P##.# R0 I0 D0 ; Where P##.# is the address of the driver being tuned M917 #100 ; Where # is the axis being tuned (X, Y or Z) ```