@tekstyle
config.g
; Configuration file for Duet WiFi (firmware version 3)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v2.1.8 on Mon Feb 24 2020 22:39:52 GMT-0800 (Pacific Standard Time)
; General preferences
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"CXY" ; set printer name
;Paneldue settings
M575 P1 B57600 S1 ; paneldue connected through serialport baudrate 57600 checksum enabled
M667 S1 ; select CoreXY mode
; Network
M552 S1 ; enable network
M586 P0 S1 ; enable HTTP
M586 P1 S0 ; disable FTP
M586 P2 S0 ; disable Telnet
; Drives
M569 P0 S0 ; physical drive 0 goes backwards X connector
M569 P1 S0 ; physical drive 1 goes backwards Y connector
M569 P2 S0 ; physical drive 2 goes backwards Z connector Z0
M569 P3 S0 ; physical drive 3 goes backwards E0 connector Z1
M569 P4 S0 ; physical drive 4 goes backwards E1 connector Z2
M569 P5 s0 D2 ; physical drive 5 goes backwards expE2 connector. spread cycle mode
M569 P6 S0 D2 ; physical drive 6 goes backwards expE3 connector. spread cycle mode
M569 P7 S0 D2 ; physical drive 7 goes backwards expE4 connector. spread cycle mode
M569 P8 S0 D2 ; physical drive 8 goes backwards expE5 connector. spread cycle mode
;M569 P9 S0 D2 ;extruder 5 on duex5 not used. disabled for PWM CPAP blower ; physical drive 9 goes backwards expE6 connector. spread cycle mode
M569 P10 S1 ; physical drive 10 goes forward CONN LCD #10 (tool changer)
M584 X0 Y1 Z2:3:4 E5:6:7:8:9 U10 ; set drive mapping.
; P0-P4 as movement drives.
; P5-9 as extruders.
; M563 will reference D0 as the first extruder in the series which is the motor connected to P5.
; set drive mapping U axis as CONN LCD #10 tool changer. uses E0 endstop by default
M350 X16 Y16 Z16 E16:16:16:16 I1 ; configure microstepping with interpolation
;M350 U4 I1 ; configure U 4x microstepping with interpolation. uncommented due to external stepper driver
M92 X80 Y80 Z1600 E415:655:415:415 U30.578 ; set steps per mm
M566 X2000 Y2000 Z500 U50 E3000:300:3000:3000 ; set maximum instantaneous speed changes (mm/min) jerk
M203 X30000 Y30000 Z800 U8000 E8000:3600:8000:8000 ; set maximum speeds (mm/min)
M201 X900 Y900 Z100 U800 E1250:600:1250:1250 ; set accelerations (mm/s^2)
M906 X1000 Y1000 Z1700 E680:500:680:680 I30 ; set motor currents (mA) and motor idle factor in percent
; does not include toolchanger motor because it is set via external stepper driver
M84 S30 ; Set idle timeout
;lead screw position
M671 X271.7:0:-246 Y-269:232:-269 s20 p4:4 ; Z leadscrews are at (11,20), (411,141.7), (11,400). max correction 20mm
; Axis Limits
M208 X-198.7:214 Y-244:196 Z0:365 u0:141 ; set axis minima
;bed mesh grid
M557 X-190:190 Y-180:196 s30 ; define mesh grid
; Endstops
M574 X1 S1 P"duex.e3stop" ; configure active-high endstop for low end on X via pin xstop
M574 Y1 S1 P"duex.e4stop" ; configure active-high endstop for low end on Y via pin ystop
;M574 Z1 S1 P"duex.e2stop" ; Z min active high endstop switch
M574 U1 S1 P"^duex.e5stop" ; configure active-high endstop for low/high end on U via pin e0stop
; Z-Probe ;https://forum.duet3d.com/topic/2671/precision-piezo-z-probes-guide-for-duet-users-reference
;M574 Z0 P"nil" ; no Z endstop switch, free up Z endstop input
M558 P5 C"duex.e2stop" H5 F50 A1 T3000 S0.02 ; NC switch Z probe connected to Z endstop input
; P(effector type)
; R(delay in second)
; C(invert,pin name)
; H(dive height mm)
; F(probe speed)
; T(travel speed)
; A(max #tap)
; S(tolerance)
;M558 K0 P9 C"nil" ;This is automatically applied to reassign probe to a
;M558 K0 P5 C"!^zprobe.in" F200 H50 ;P5 zprobe.in and zprobe.gnd for ZTATP.py
;G31 K0 X0 Y0 Z0 ; Set the limit switch position as the "Control Point."
; Note: the switch free (unclicked) position is 7.2mm,
; but the operating position (clicked) is 6.4 +/- 0.2mm.
; A 1mm offset (i.e: 7.2-6.2 = 1mm) would be the
; Z to worst-case free position, but we add an extra 1mm
; such that XY travel moves across the bed when z=0
; do *not* scrape or shear the limit switch.
;Heater BED********************************************************
;M950 H7 C"nil" ; disable heater 7 on duetx5 and free up the associated pin for PWN (used with CPAP)
; Bed0 (H0), Bed1 (H5), Bed2 (H6), Bed3 (H7)
;BED0
M308 S0 P"bedtemp" Y"thermistor" A"Bed0 M190 P0" T100000 B3950 ; configure sensor 0 as thermistor on pin bedtemp
M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0
M143 H0 S120 ; set temperature limit for heater 0 to 120C
M140 P0 H0 ; map heatedbed1-RL to heater 0
;BED1
M308 S1 P"e0temp" Y"thermistor" A"Bed1 M190 P1" T100000 B3950 ; configure sensor 1 as thermistor on pin e1temp
M950 H5 C"fan1" T1 ; create heater output on fan1 and map it to sensor 1
M143 H5 S120 ; set temperature limit for heater 1 to 120C
M140 P1 H5 ; map heatedbed2-RR to heater 1
;BED2
M308 S2 P"e1temp" Y"thermistor" A"Bed2 M190 P2" T100000 B3950 ; configure sensor 2 as thermistor on pin e0temp
M950 H6 C"fan2" T2 ;create heater output on fan2 and map it to sensor 2
M143 H6 S120 ; set temperature limit for heater 2 to 120C
M140 P2 H6 ; map heatedbed3-FL to heater 2
;BED3 ;https://duet3d.dozuki.com/Wiki/Connecting_PT100_temperature_sensors
M308 s3 P"spi.cs1" Y"rtd-max31865" A"Bed3 M190 P3" ;create sensor 3 as PT100 temperature sensor on RTD1 of daughtboard
M950 H7 C"e0heat" T3 ; create heater output on e0heat and map it to sensor 3
M143 H7 S120 ;set temperature limit for heater 3 to 120C
M140 P3 H7 ;map heatedbed4-FR to heater 3
;HEATER EXTRUDER*******************************************************************************************************************************************
;EXTRUDERS TOOL 0 TO 4
;T0
;T1
M308 S4 P"duex.e2temp" Y"thermistor" T100000 B3950 ; configure sensor 4 as thermistor on pin duex.e3temp
M950 H1 C"duex.e2heat" T4 ; create nozzle heater output on duex.e3heat and map it to sensor 4
M143 H1 S280 ; set temperature limit for heater 4 to 280C
M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
;T2
M308 S5 P"duex.e3temp" Y"thermistor" T100000 B3950 ; configure sensor 5 as thermistor on pin duex.e4temp
M950 H2 C"duex.e3heat" T5 ; create nozzle heater output on duex.e4heat and map it to sensor 5
M143 H2 S280 ; set temperature limit for heater 5 to 280C
M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
;T3
M308 S6 P"duex.e4temp" Y"thermistor" T100000 B3950 ; configure sensor 6 as thermistor on pin duex.e5temp
M950 H3 C"duex.e4heat" T6 ; create nozzle heater output on duex.e5heat and map it to sensor 6
M143 H3 S280 ; set temperature limit for heater 6 to 280C
M307 H3 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
;T4
M308 S7 P"duex.e5temp" Y"thermistor" T100000 B3950 ; configure sensor 7 as thermistor on pin duex.e5temp
M950 H4 C"duex.e5heat" T7 ; create nozzle heater output on duex.e5heat and map it to sensor 7
M143 H4 S280 ; set temperature limit for heater 7 to 280C
M307 H4 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
; Fans**************** M950 F(fan#) C(pin name on board). M106 P(#corresponse to Fan#) S(speed) H(thermostatic control on/off. H-1 disable. H1 or above is the heater# it controls)
;Cpap vacuum fan
;M950 F9 C"!exp.heater7" Q6000 ; 24V create fan 9 on pin expheater7 PWM pin and set its frequency to 6000hz
M950 F9 C"!duex.pwm5" Q6000 ; 24V create fan 9 on pin expheater7 PWM pin and set its frequency to 6000hz
M106 P9 S0 H-1 c"CPAP Vac" ; S0 set fan9 0% . H-1 Thermostatic control is turned off
;LED
M950 F0 C"fan0" Q1000
M106 P0 S0 H-1 c"LED"
;Parts cool Fan
M950 F8 C"duex.fan8" Q500 ; create fan 8 on pin duex.fan3 and set its frequency
M106 P8 S0 H-1 B0.1 C"Parts Cool" ; set fan 8 value. Thermostatic control is turned off
;T0
;T1 ;thermostatic fan(F) tool#(P) thermostatic mode(s1) heater(H#) temp threshold Celcius(T45)
M950 F3 C"duex.fan3" Q500 ; create fan 3 on pin duex.fan4 and set its frequency
M106 P3 S1 H4 T45 ; set fan 3 value. Thermostatic control is turned on
;T2
M950 F4 C"duex.fan4" Q500 ; create fan 4 on pin duex.fan4 and set its frequency
M106 P4 S1 H5 T45 ; set fan 4 value. Thermostatic control is turned on
;T3
M950 F5 C"duex.fan5" Q500 ; create fan 5 on pin duex.fan5 and set its frequency
M106 P5 S1 H6 T45 ; set fan 5 value. Thermostatic control is turned on
;T4
M950 F6 C"duex.fan6" Q500 ; create fan 6 on pin duex.fan6 and set its frequency
M106 P6 S1 H7 T45 ; set fan 6 value. Thermostatic control is turned on
; Tools**********************************************************************************************************************************************
;EXTRUDER TOOLS M563 P(tool) D(extruder) H(heater) F(fan)
;T0
M563 P0 s"blank"
;T1
M563 P1 D0 H1 F3 s"Yellow" ; tool1 (P1), extruder0 (D0) heater4(h4) cooling Fan9(F3)
G10 P1 R0 S0 ; set initial tool 0 active and standby temperatures to 0C
;T2
M563 P2 D1 H2 F3 s"Green" ; define tool 1
G10 P2 R0 S0 ; set initial tool 1 active and standby temperatures to 0C
;T3
M563 P3 D2 H3 F3 s"Red" ; define tool 2
G10 P3 R0 S0 ; set initial tool 2 active and standby temperatures to 0C
;T4
M563 P4 D3 H4 F3 s"Blue" ; define tool 3
G10 P4 R0 S0 ; set initial tool 0 active and standby temperatures to 0C
;ACCELERATOR SENSOR
M955 P0 C"spi.cs4+spi.cs3" I20 ; connected to daughterboard
M593 P1 F27 ; ZVD input shaper at 27Hz (RRF 3.3+)
;FILAMENT SENSOR
M591 D3 P7 C"e1stop" S0 R1:1000 L3 E20 A0 ; extruder drive (D)= refer to M563 Dnnn under extruder tools of this config.g
; pulse-generating (P)=7
; Mode (S)=1=enable for all prints
; R=min and max percentage limit
; L= length in mm per pulse
; E= length in mm before measured comparison is done
; A0=check extrusion motion of print moves only
;Power Failure protocol
;M911 S10.0 R11.0 P"M906 X0 Y0 G91 M83 G1 Z3 E-5 F1000"
m570 H0 T10 P300 S1440 ; cancel print after 24 hours from heater fault
m570 H1 T10 P300 S1440 ; cancel print after 24 hours from heater fault
m570 H2 T10 P300 S1440 ; cancel print after 24 hours from heater fault
m570 H3 T10 P300 S1440 ; cancel print after 24 hours from heater fault
m570 H4 P60 T20 S1440 ; cancel print after 24 hours from heater fault
m570 H5 P60 T20 S1440 ; cancel print after 24 hours from heater fault
m570 H6 P60 T20 S1440 ; cancel print after 24 hours from heater fault
m570 H7 P60 T20 S1440 ; cancel print after 24 hours from heater fault
;M911 S10.5 R11.0 P"G91 M83 G1 Z3 E-5 F1000" ;trigger powerfailure resurrect if VIN below 10.5V. resume at 11V. relative mode g91. relative extrusion m83. move Z up 3mm. retractt 3mm
;M916 ; save to resurrect.g after a pause due to power failure or any pause
;PID BED SETTINGS: https://duet3d.dozuki.com/Wiki/Tuning_the_heater_temperature_control
M307 H0 B0 R0.076 C766.9 D5.73 S1.00 V24.0
M307 H5 B0 R0.108 C953.2 D5.14 S1.00 V24.0
M307 H6 B0 R0.143 C815.6 D5.40 S1.00 V24
M307 H7 B0 R0.139 C901.0 D45.54 S0.70 V24.1
;PID TOOL SETTINGS: https://duet3d.dozuki.com/Wiki/Tuning_the_heater_temperature_control#Section_Firmware_3_2_and_later
M307 H1 B0 R3.084 C201.7 D6.18 S1.00 V24.0 ;T0 disable bang-bang mode and set PWM limit
M307 H4 B0 R1.959 C222.2:219.6 D4.36 S1.00 V24.1 ;T3 disable bang-bang mode and set PWM limit
;Pressure advance
M572 D0:2:3 S0.05 ;tool 0,2,3 to 0.05 sec
M572 D1 S0.02 ;tool 1 to 0.02 sec
M376 H5 ;bed comp
M98 P"/sys/PRINTCODE/GLOBAL.g"
M98 P"/sys/PRINTCODE/TOOLOFFSET.g"
M929 P"eventlog1.txt" S1 ; start logging to file eventlog.txt