; Default config.g template for DuetPi ; Replace this with a proper configuration file (e.g from https://configtool.reprapfirmware.org) ; Display initial welcome message ;M291 P"Please go to this page for further instructions on how to set it up." R"Welcome to your new Duet 3!" S1 T0 ; General preferences M453 ; Put the machine into CNC Modes ;M550 P"Andrew's CNC" G90 ; Set absolute coordinates ;M950 P0 C"io3.out" ;Assign P0 to control enable relay using "io3.out" ;M950 R0 C"io6.out" L10000 Q50 ;Create spindle index 0, with PWM pin on io6 and 10000 RPM achieved at full PWM with a 50Hz PWM ;M563 P1 S"Spindle 1" R0 ; Create tool 1 with spindle 0 and call it "Spindle 1" M950 P1 C"io6.out" Q50 ; Configure Drives M569 P0 S0 ; Drive 0 goes forwards M569 P1 S1 ; Drive 1 goes forwards M569 P2 S1 ; Drive 2 goes forwards M569 P3 S1 ; Drive 3 goes forward M584 X0 Y1 Z2 U3; Apply drive mapping to axes ; Configure Axes M92 X800 Y800 Z800 U800 ; Set steps per mm M350 X16 Y16 Z16 U16 I1 ; Configure microstepping M566 X500 Y500 Z500 U500 ; Set maximum instantaneous speed changes (mm/min) M203 X1500 Y1500 Z1500 U1500 ; Set maximum speeds (mm/min) M201 X100 Y100 Z100 U100; Set accelerations (mm/s^2) M906 X800 Y800 Z1400 U1600 I100 ; Set motor currents (mA) ; Configure Axis Limits M208 X0 Y0 Z0 U0 S1 ; Set axis minima M208 X200 Y150 Z50 U180 S0 ; Set axis maxima ; Configure Endstops M574 X1 S1 P"io0.in" ; Set active low endstops M574 Y1 S1 P"io1.in" ; Set active low endstops M574 Z2 S1 P"io2.in"; Set active low endstops ;M915 X Y Z S3 F1 R0; Motor stall detection ; Other Settings M140 H-1 ; Disable heated bed M564 S1 H0 ; Disable jog commands when not homed M911 S22.0 R23 P"G91 G1 Z3 F1000" ; Configure power loss resume ;M501 ; Load Stored Parameters G54