;---------------------------------------------------------------------------------------------------------------------------------------------- ; Network & Machine Identity ;---------------------------------------------------------------------------------------------------------------------------------------------- M550 P"DBot V38" ; Set machine name M551 P"xxxxxxxxx" ; Set password M552 S1 ; Enable network M586 P0 S1 ; Enable HTTP M586 P1 S1 ; Enable FTP (V28) M586 P2 S0 ; Disable Telnet ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------------------------------------------------------- ; General preferences ;---------------------------------------------------------------------------------------------------------------------------------------------- M912 P0 S-10.8 ; Calibrate MCU Temperature M111 S0 ; Debugging off G21 ; Work in millimetres G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves M555 P2 ; Set firmware compatibility to look like Marlin (on USB connection) ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Automatic saving after power loss is not enabled ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Kinematics & Axes ;---------------------------------------------------------------------------------------------------------------------------------------------- M584 X0 Y1 Z2:5:6 E3 E4 ; Drive Mappings: setup X,Y, 3 Z motors on 2, 5 and 6, Extruders on E3, E4 (V35) M669 K1 ; Select CoreXY kinematics (V35) M208 X0:300 Y0:300 Z0:275 ; Set axis minima and maxima using new syntax (V37) ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Endstops ;---------------------------------------------------------------------------------------------------------------------------------------------- M574 X1 S1 P"xstop" ; configure active-high endstop for low end on X via pin xstop (V35) M574 Y2 S1 P"ystop" ; configure active-high endstop for high end on Y via pin ystop (V35) M574 Z1 S2 ; configure Z-probe endstop for low end on Z (config via M558) (V35) ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Z Probe & Mesh Grid ;---------------------------------------------------------------------------------------------------------------------------------------------- ; M558 Parameters ; Pn = Mode (P1 = Analogue, P8 = Unfiltered Digital) ; C"^!zprobe.in" = use zprobe.in pin, inverted for active low, pullup enabled ; R0.5 = 500mS delay before probing ; H3 = Dive Height 3mm ; F360 = 360mm/min probe speed (6mm/sec) ; T9000 = Travel between probe points at 9000mm/min (150mm/sec) ; A5 = Max No of touches ; S0.03 = Tolerance for multi-touch (mm) ; Analogue Mode ;M558 P1 C"^!zprobe.in" R0.5 H3 F360 T9000 A5 S0.03 ; P1 = Analogue mode (V36) ;G31 X0 Y0 Z-0.1 P530 ; X, Y, Z offsets, P530 = trigger threshold (V37) ; Digital Mode M558 P8 C"^!zprobe.in" R0.5 H3 F240 T9000 A5 S0.03 ; P8 = Digital mode (unfiltered) (V35) G31 X0 Y0 Z-0.1 P100 ; X, Y, Z offsets, P100 = debounce interval (V32) M557 X25:275 Y25:275 S83:83 ; Define mesh grid (4x4) - overidden in Calibration Macros (V29) ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Motors, Leadscrews & Mechanical Limits ;---------------------------------------------------------------------------------------------------------------------------------------------- M569 P0 S0 ; Drive 0 goes backwards - X axis M569 P1 S0 ; Drive 1 goes backwards - Y axis M569 P2 S0 ; Drive 2 goes backwards - Z axis Front-Left (U) M569 P3 S1 ; Drive 3 goes forwards - E0 (V8) M569 P5 S0 ; Drive 5 goes backwards - Z axis Front-Right (V) (V20) M569 P6 S0 ; Drive 6 goes backwards - Z axis Rear-Centre (W) (V20) M671 X-35:335:150 Y63:63:365 S3.0 ; leadscrews at front-left, front-right and rear-centre (V34) M350 X16 Y16 Z16 E16 I1 ; Configure X16 microstepping with interpolation (V33) M92 X100 Y100 Z3200 E401 ; Set steps per mm (V33) M566 X960 Y960 Z24 E300 ; Set maximum instantaneous speed changes (mm/min) (V36) M203 X9000 Y9000 Z360 E3600 ; Set maximum speeds (mm/min) (V36) M201 X900 Y900 Z50 E2000 ; Set accelerations (mm/s^2) (V36) M906 X1000 Y1000 Z1000 E1000 I60 ; Set motor currents (mA) and motor idle factor in per cent (V37) M84 S30 ; Set idle timeout ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Sensors & Heaters ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---- Bed ----------------------------------------------------- M308 S0 P"bedtemp" Y"thermistor" T100000 B3950 C7.06e-8 ; configure sensor 0 as thermistor on pin bedtemp (V35) M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0 (V35) M143 H0 S120 ; set temperature limit for heater 0 to 120C (V35) M307 H0 B0 S1.0 A195.6 C208.3 D1.1 V23.9 ; disable bang-bang mode for the nozzle heater and set PWM limit (V35) ; PID parameters from Running M303 H0 P1 S70 ;---- Extruder E0 --------------------------------------------- M308 S1 P"e0temp" Y"thermistor" T100000 B4725 C7.06e-8 ; configure sensor 1 as thermistor on pin e0temp (V35) M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 (V35) M143 H1 S285 ; set temperature limit for heater 1 to 285C (V35) M307 H1 B0 S1.0 A570.2 C208.5 D4.9 V23.7 ; disable bang-bang mode for the nozzle heater and set PWM limit (V35) ; PID parameters from from Running M303 H1 P1 S220 ;---- Sensors for enclosure Fans ----------------------------- M308 S2 Y"mcu-temp" ; configure sensor 2 as mcu-temp type (V35) M308 S3 Y"drivers" ; configure sensor 3 as drivers type (V35) ;---- Heaters 6 & 7 on Duex2 - for use with PiCam Servos ------ M950 S0 C"!exp.heater6" ; configure GPIO port 0 to heater 6 on duex, servo mode, inverted (V35) M950 S1 C"!exp.heater7" ; configure GPIO port 1 to heater 7 on duex, servo mode, inverted (V35) ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Fans ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---- 24V Fans on Duet WiFi ------------------- ;---- 12V Fans on Duex2 ----------------------- M950 F3 C"duex.fan3" Q500 ; create fan 3 on pin duex.fan3 and set its frequency (V35) M106 P3 S0.1 H-1 B0 C"Lights" ; set fan 3 value. LED Lights (V35) M950 F4 C"duex.fan4" Q500 ; create fan 4 on pin duex.fan4 and set its frequency (V35) M106 P4 S1.0 H2:3 T26:65 L0.4 C"Enclosure Fans" ; set fan 4 value. Thermostatic control on. Linked to MCU & Stepper Drivers (V35) M950 F5 C"duex.fan5" Q500 ; create fan 5 on pin duex.fan5 and set its frequency (V37) M106 P5 S1.0 H1 T50 C"Hotend Fan" ; set fan 5 value. Thermostatic control is turned on. Linked to Hotend (H1) (V37) ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Tools ;---------------------------------------------------------------------------------------------------------------------------------------------- M563 P0 D0 H1 S"Extruder" ; Define tool 0 - uses Drive 0 (E0), Heater 1. Tool Fan is Fan0 by default (part-cooling fan) (V17) G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Custom settings are not configured ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Miscellaneous ;---------------------------------------------------------------------------------------------------------------------------------------------- T0 ; Select first tool ;M98 P"/macros/Picam/Home" ; Home PiCam (V27) ;----------------------------------------------------------------------------------------------------------------------------------------------