Skip to content

Instantly share code, notes, and snippets.

@mveinot
Last active January 3, 2019 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mveinot/a566602d72820c585de1db2d69ffb6a5 to your computer and use it in GitHub Desktop.
Save mveinot/a566602d72820c585de1db2d69ffb6a5 to your computer and use it in GitHub Desktop.
; Configuration file for Duet WiFi (firmware version 1.20 or newer)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool on Thu May 10 2018 12:24:40 GMT-0300 (ADT)
; General preferences
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves
M667 S1 ; Select CoreXY mode
; Network
M550 PHyperCube_Duet3D ; Set machine name
; M551 Pxxxxxxxx ; Set password
M552 S1 ; Enable network
M587 S"xxxxxx" P"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ; Configure access point. You can delete this line once connected
M586 P0 S1 ; Enable HTTP
M586 P1 S1 ; Disable FTP
M586 P2 S0 ; Disable Telnet
; Drives
M569 P0 S1 ; Drive 0 goes forwards
M569 P1 S1 ; Drive 1 goes forwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwards
M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
M92 X80 Y80 Z400 E93.98 ; Set steps per mm
M566 X900 Y900 Z12 E120 ; Set maximum instantaneous speed changes (mm/min)
;M203 X6000 Y6000 Z180 E1200 ; Set maximum speeds (mm/min)
M203 X18000 Y18000 Z600 E3600 ; Set maximum speeds (mm/min)
;M201 X500 Y20 Z250 E250 ; Set accelerations (mm/s^2)
M201 X15000 Y15000 Z300 E4500 ; Set accelerations (mm/s^2)
;M906 X900 Y900 Z800 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
M906 X1000 Y1000 Z2000 E1000 I30 ; Set motor currents (mA) and motor idle factor in per cent
M84 S15 ; Set idle timeout
; Axis Limits
M208 X0 Y0 Z0 S1 ; Set axis minima
M208 X290 Y300 Z280 S0 ; Set axis maxima
; Allow movement before axis are homed
M564 H0
; Endstops
M574 Z1 S1 ; Set active high endstops
; Z-Probe
; BLTouch
M307 H7 A-1 C-1 D-1
M558 P9 H5 F100 T2000
G31 X26.4 Y12.9 Z3.5 P25 ; Z-value - smaller=further from build plate - testing indicates 3.5 is very good for first layer
; Heaters
M301 H0 S1.00 P10 I0.1 D200 T0.4 W180 B30 ; Use PID on bed heater (may require further tuning)
M305 P0 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 0
M143 H0 S120 ; Set temperature limit for heater 0 to 120C
M305 P1 T100000 B4725 C7.06e-8 R4700 ; Set thermistor + ADC parameters for heater 1
M143 H1 S280 ; Set temperature limit for heater 1 to 280C
; Fans
M106 P0 S0 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P1 S0 I0 F500 H1 T45:65 C"Hot End" ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
;M106 P2 S0 I0 F500 H1 T45:65 C"Hot End" ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on
; Tools
M563 P0 D0 H1 ; Define tool 0
G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C
M307 H2 A-1 C-1 D-1 ; Disable Heater 1 (H2)
M452 P2 R255 F200 ; Use Heater 1 output for laser control
; Automatic saving after power loss is not enabled
M501 ; Read PID autotune settings
; homex.g
; called to home the X axis
;
; generated by RepRapFirmware Configuration Tool on Thu May 10 2018 12:24:40 GMT-0300 (ADT)
G91 ; relative positioning
;G1 Z5 F6000 S2 ; lift Z relative to current position
;G1 S1 X-305 F1800 ; move quickly to X axis endstop and stop there (first pass)
;G1 X5 F6000 ; go back a few mm
;G1 S1 X-305 F360 ; move slowly to X axis endstop once more (second pass)
;G1 Z-5 F6000 S2 ; lower Z again
;G90 ; absolute positioning
M203 X6000 ; Set maximum speeds (mm/min)
M906 X900 ; Set motor currents (mA) and motor idle factor in percent
M201 X200 ; Set accelerations (mm/s^2)
M913 X70 ; drop motor currents to 50%
M915 X S4 R0 F0 ; set X and Y to sensitivity 2, do nothing when stall, unfiltered
M574 X1 S3 ; set endstops to use motor stall
; Initial homing for X/Y
;G1 Z10 F1200 S2 ; lift Z
;G4 P100
;G1 S1 X-325 Y-325 F3600 ; move right/back 325mm, stopping at the endstop
;G4 P100
;G1 X5 Y5 ; move away from home
;G4 P100
; X or Y is homed at this point, now home the other axis
G1 S1 X-325 F3600 ; move towards axis minimum
G4 P100 ; wait 100ms
G1 X5 ; move away from home
G4 P100 ; wait 100ms
M400 ; make sure everything has stopped before we reset the motor currents
M913 X100 Y100 ; motor currents back to 100%
M574 X1 S1 ; define active low microswitches
G90 ; Go back to relative positioning
G92 X0 ; Tell the printer this is the home position for X
M98 Pmotorsetup.g
; homey.g
; called to home the Y axis
;
; generated by RepRapFirmware Configuration Tool on Thu May 10 2018 12:24:40 GMT-0300 (ADT)
G91 ; relative positioning
;G1 Z5 F6000 S2 ; lift Z relative to current position
;G1 S1 Y-305 F1800 ; move quickly to Y axis endstop and stop there (first pass)
;G1 Y5 F6000 ; go back a few mm
;G1 S1 Y-305 F360 ; move slowly to Y axis endstop once more (second pass)
;G1 Z5 F6000 S2 ; lower Z again
;G90 ; absolute positioning
M203 Y8000 ; Set maximum speeds (mm/min)
M906 Y900 ; Set motor currents (mA) and motor idle factor in percent
M201 Y200 ; Set accelerations (mm/s^2)
M913 Y70 ; drop motor currents to 50%
M915 Y S4 R0 F0 ; set X and Y to sensitivity 2, do nothing when stall, unfiltered
M574 Y1 S3 ; set endstops to use motor stall
; Initial homing for X/Y
;G1 Z10 F1200 S2 ; lift Z
;G4 P100
;G1 S1 X-325 Y-325 F3600 ; move right/back 325mm, stopping at the endstop
;G4 P100
;G1 X5 Y5 ; move away from home
;G4 P100
; X or Y is homed at this point, now home the other axis
G1 S1 Y-325 F3600 ; move towards axis minimum
G4 P100
G1 Y10 ; move away from home
G4 P100
M400 ; make sure everything has stopped before we reset the motor currents
M913 X100 Y100 ; motor currents back to 100%
M574 Y1 S1 ; define active low microswitches
G90 ; Go back to relative positioning
;G92 X0 ; Tell the printer this is the home position for X
M98 Pmotorsetup.g
; homez.g
; called to home the Z axis
;
G92 Z100 ; tell printer to think z axis is at +100mm
M280 P7 S160 I1 ; Clear probe state
G91 ; Relative positioning
G1 Z10 F3600 ; Lift Z 10mm
G4 S1 ; Wait 1s
M98 P/sys/deployprobe.g ; Call deployprobe.g
G1 Z5 F200 ; Life Z 5mm more
G90 ; Absolute positioning
; Adjust the coordinates in the following line to place the head at a suitable position for Z homing
G1 X150 Y150 F3600 ; Go to first bed probe point
G30 ; Probe Z level
G1 Z10 F500 ; Lift Z 10mm
M98 P/sys/retractprobe.g ; Call retractprobe.g
M557 X50:250 Y50:250 S50 ; Define a mesh for detailed probe
M566 X900 Y900 Z12 E120 ; Set maximum instantaneous speed changes (mm/min)
M203 X18000 Y18000 Z1800 E3600 ; Set maximum speeds (mm/min)
M201 X15000 Y15000 Z600 E4500 ; Set accelerations (mm/s^2)
M906 X1000 Y1000 Z1000 E1000 I30 ; Set motor currents (mA) and motor idle factor in per cent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment