No sweat…
config.g:
; Configuration file for Duet WiFi (firmware version 3)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v3.2.3 on Tue Apr 20 2021 01:19:12 GMT-0600 (Mountain Daylight Time)
; Monkeyed with by SupraGuy because obviously I know better than the configuration tool, lol!
; General preferences
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"LowRider3" ; set printer name
; Network
M552 S1 ; enable network
M586 P0 S1 ; enable HTTP
M586 P1 S0 ; disable FTP
M586 P2 S0 ; disable Telnet
; Drives
M669 K0 ; set Cartesian kinematics
M569 P0 S0 ; physical drive 0 goes backwards
M569 P1 S0 ; physical drive 1 goes backwards
M569 P2 S0 ; physical drive 2 goes backwards
M569 P3 S0 ; physical drive 3 goes backwards
M569 P4 S0 ; physical drive 4 goes backwards
M584 X0 Y1:3 Z2:4 U3 V4 P3 ; set drive mapping: X on drive 0, Y on 1 and 3, Z on 2 and 4
M350 X16 Y16 Z16 U16 V16 I1 ; configure microstepping with interpolation
M92 X100.00 Y100.00 Z400.00 ; set steps per mm
M566 X60.00 Y60.00 Z60.00 ; set maximum instantaneous speed changes (mm/min)
M203 X12000.0 Y12000.0 Z3000.00 ; set maximum speeds (mm/min) 5 centimeters per second, lol
M201 X1500.0 Y1500.0 Z60.00 ; set accelerations (mm/s^2)
M906 X1200 Y1200 Z1200 U1200 V1200 I75 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout
; Axis Limits
M208 X0 Y0 Z-1.5 S1 ; set axis minima
M208 X1025 Y1525 Z126.5 S0 ; set axis maxima
; Endstops
M574 X1 S1 P"^xstop" ; configure active-high endstop for low end on X via pin ^xstop
M574 Y1 S1 P"^ystop+^e0stop" ; configure active-high endstop for low end on Y via pin ^ystop+^e0stop
M574 Z2 S1 P"^zstop+^e1stop" ; configure active-high endstop for high end on Z via pin ^zstop+^e1stop
; Z-Probe
M558 P5 C"!^zprobe.in" H5 F120 T6000 ; set Z probe type to switch and the dive height + speeds
G31 P850 X0 Y0 Z0.5 ; set Z probe trigger value, offset and trigger height
M557 X15:1015 Y115:1515 S100 ; define mesh grid
; Heaters
M140 H-1 ; disable heated bed (overrides default heater mapping)
M308 S2 Y"drivers" A"DRIVERS" ; configure sensor 2 as temperature warning and overheat flags on the TMC2660 on Duet
M308 S3 Y"mcu-temp" A"MCU" ; configure sensor 3 as thermistor on pin e1temp for left stepper
; Fans
M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency
M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency
M106 P1 S1 H T45 ; set fan 1 value. Thermostatic control is turned on
M950 F2 C"fan2" Q500 ; create fan 2 on pin fan2 and set its frequency
M106 P2 H2:3 L0.15 X1 B0.3 T25:60 ; set fan 2 value. Thermostatic control is turned on
; Tools
M950 R0 C"!exp.heater1" L10000 ; Create spindle index 0, with PWM pin on heater 1 and 10000 RPM achieved at full PWM
M563 P0 S"Makita RT0701C" ; Create tool 1 with spindle 0 and call it "Spindle 1"
M563 P1 S"NEJE A40640" ; Set tool 1 to be the laser
M453 ; Set CNC mode
; Custom settings are not defined
M671 X-75.0:1100.0 Y137.5:137.5 S12.5 ; Set the Z motor relative locations
M575 P1 S1 B57600 ; Enable PanelDUE
G54 ; Select Workspace Coordinate 1
So…
I have the touch plate set up to use the probe port.
I select workspace coordinate set #1 for use. My general macros make use of that fact. (As below) I have a fan set up based on the MCU temperature, and at 100% if the TMC drivers report overtemp. The fan stays on over the summer, low speed, only comes on under use in winter.
I didn’t look through this config, I think I have soft stops enabled, so the machine bed size is defined so that I don’t overrun the work area. I know that I have them enabled on the Primo, which also uses a Duet 2 Wifi, because overrunning the workspace is a problem.
homeall.g:
; homeall.g
; called to home the Z axis
;
; generated by RepRapFirmware Configuration Tool v3.2.3 on Tue Apr 20 2021 01:19:13 GMT-0600 (Mountain Daylight Time)
; mucked about with by SupraGuy because...
G91 ; relative positioning
;G1 H2 Z5 F6000 ; lift Z relative to current position
G1 H1 Z200 F1800 ; move quickly to Z axis endstop and stop there (first pass)
G1 H2 Z-5 F6000 ; go back a few mm
G1 H1 Z20 F360 ; move slowly to X axis endstop once more (second pass)
M584 X0 Y1:3 Z2 U3 V4 P3 ; set drive mapping: X on drive 0, Y on 1 and 3, Z on 2 and 4
G0 H2 V-1.6160 ; Offset for Z2 motor
M584 X0 Y1:3 Z2:4 U3 V4 P3 ; set drive mapping: X on drive 0, Y on 1 and 3, Z on 2 and 4
G1 H1 X-1100 Y-1500 F1800 ; Move X and Y to endstops quickly (?)
G1 H2 X10 Y10 F6000 ; Back off 10mm
G1 H1 X-20 Y-20 F360 ; And back to the endstops more slowly
;G1 H2 Z-5 F6000 ; lower Z again
G90 ; absolute positioning
So from this, homex.g, homey.g and homez.g can all be derived.
macros/probe_work.g
; Probe the work, and set the workspace Z coordinate
M291 P"Attach Z Probe" R"Probe Work" S3 Z1 ; Display message with Z jog buttons
G30 S-1 ; Probe the work, (report machine position)
G10 L20 Z0.5 ; Set workspace position to 0.5mm
M400 ; Wait for save to finish
G00 Z5 F450 ; Move 5mm above work piece
macros/zeroworkspace.g
; Set the workspace X and Y to the current machine coordinates
G10 L20 X0.0000 Y0.0000
The macros are fairly commonly used.
These config files assume that you already have the Duet2 on your home network, and responding, and that you are running RRF 3.3
This configuration works well for me. You may find that you want to switch the motor drive direction if you are using the supplied motor connectors which are directionally keyed.
Edit: There are some references to a U and V axis, which are there because I was doing some crazy stunts with separating out the Y and Z axes. This can be ignored. Leave it or remove it, it doesn’t really matter. Also, for the axis minimums and maxumums, note that I have longer Z rails, so this should really be changed for your build.