Duet 2 wifi config files for a Lowrider 3

I have built a lowrider 3 and had an extra Duet 2 Wifi board that I decided to use. I have worked with the duets before with 3d printers and think they are great but I have been banging my head against the wall trying to figure out the config files for a Lowrider3.

Does anyone have cofig files for a lowrider 3 they would be willing to share?

@SupraGuy ? WDYT?

I use duet 2 WiFi on another cnc. I’ll share files on Monday if it helps.

That would be great. Thanks.

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.

2 Likes

Yeah. There is no point in me uploading my config files unless you need help with sensorless homing. I am about to give up on it because it sucks on a CNC machine. Too much weight causes it to be too sensitive when the machine is room temp. And then not sensitive enough when it is warmed up.

But I have found a way to use a Macro to probe the X,Y,Z Origin. I’ll be posting that next week some time.

My next project on my CNC is to make some simple jog controls using push bottons and macros. It’s gonna be awesome!

Thanks. I started tex5ting it out tonight and seem to have it tweaked to work with machine. I was wondering if you would also share your homex, homey and homeg files?

After I home all and try to move any axis an error stating the request is outside the machine limits. I have adjusted the axis maimums to match my setup so I’m a little confused but did a lot of time to look into it.

homex.g

; homex.g
; called to home the X axis
;
; generated by RepRapFirmware Configuration Tool v3.2.3 on Tue Apr 20 2021 01:19:13 GMT-0600 (Mountain Daylight Time)
G91                ; relative positioning
;G1 H2 Z5 F6000     ; lift Z relative to current position
G1 H1 X-1143 F1800 ; move quickly to X axis endstop and stop there (first pass)
G1 H2 X10 F6000    ; go back a few mm
G1 H1 X-20 F360    ; move slowly to X axis endstop once more (second pass)
;G1 H2 Z-5 F6000    ; lower Z again
G90                ; absolute positioning

homey.g:

; homey.g
; called to home the Y axis
;
; generated by RepRapFirmware Configuration Tool v3.2.3 on Tue Apr 20 2021 01:19:13 GMT-0600 (Mountain Daylight Time)
G91                ; relative positioning
;G1 H2 Z5 F6000     ; lift Z relative to current position
G1 H1 Y-1524 F1800 ; move quickly to Y axis endstop and stop there (first pass)
G1 H2 Y10 F6000    ; go back a few mm
G1 H1 Y-20 F360    ; move slowly to Y axis endstop once more (second pass)
;G1 H2 Z-5 F6000    ; lower Z again
G90                ; absolute positioning

homez.g:

; homez.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)
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 H2 Z-5 F6000    ; lower Z again
G90                ; absolute positioning

I don’t think that the offset works for homez.g correctly, but it’s one of the reasons that I had the U and V axes defined in the config.g. I had this working at one point, but for the jobs that I’ve been doing, I have the work surface levelled to the Z stops, so it hasn’t been an issue.

Thanks. This helps get me a good base to work from. I have also had a hard time finding the best cam software and setup for a reprap machine. What software are you using?

I’m using Estlcam, and have it configured to output Gcode in Marlin flavour.

This has one issue, which is that Estlcam puts the spindle speed in as the “S” parameter in the G1 commands, which RRF complains about because it things that this is being done for homing the machine, based on the old usage of the “S” parameter to allow movement of a non-homed machine in order to activate homing. This is now done with the “H” parameter, as in my homing files. This does not cause a problem, but it does flash a warning on my PanelDue screen, or in the DWC when I start the GCode. If I remember, I edit out the parameter from the GCode. Nothing else that Estlcam puts out in marlin flavour gcode causes any issues that I’ve seen.

For creating the .DXF files, I’ve used FreeCAD quite a bit, and am now using Fusion360 more often.

Perfect. I will see if I can actually get something going. Thanks for all your help.

What did you use select for controller hardware under cnc controller setting in Estlcam?

Nothing. We don’t use that feature. It doesn’t work with Marlin or RRF anyway. That is the feature that allows you to plug your computer into your machine and have Estlcam control your CNC in real time. Instead we click file Save CNC Program and save the gcode that is then copied/uploaded to our machine to be run.

It won’t allow me to save it as .gcode only .nc What am I missing?

I’m not near the machine or the pc to share screenshots.
But you need to change the file flavor from .nc to .gcode I’m Estlcam setup.

Take a look at Estlcam basics

Perfect. Thanks

1 Like

When I try to run the job I’m getting an error. " Error: No P parameter and no active tool with spindle"

It ought to tell you what command it’s barfing on. Something weird. I do get a compaint about the “S” parameter on the first movement command, but it doesn’t stop the processing, and everything works after that.

The error message should tell what command it’s getting stuck on. But even if you are not sure you could upload a small section of the Gcode that includes the failing command.

But my gut tells me that the gcode generated is not “Marlin” flavored. I suspect there is a bug in Estlcam that resets some of the settings. Not sure what triggers it. I have just noticed that occasionally it defaults back to install defaults in the basic settings. So I keep a backup of my custom settings by clicking Save Settings in the Setup - CNC Programs window.

I fixed the offset for the Z stops…

homez.g:

; homez.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)
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 U4                              ; set drive mapping: X on drive 0, Y on 1 and 3, Z on 2 and 4
G0 H2 Z-1.6160                                  ; Offset for Z1 motor
M584 X0 Y1:3 Z2:4                               ; set drive mapping: X on drive 0, Y on 1 and 3, Z on 2 and 4

;G1 H2 Z-5 F6000    ; lower Z again
G90                ; absolute positioning

Without a lot more setup, moving U independently doesn’t work well, though the H2 is supposed to do it. It doesn’t like it because I don’t home it independently. I suppose that I could jiggle the homing a bit and define the endstips for U and V axes, and use them during homing… but I can just define the Z (Or Y) axis to be the one that I want to move, and remap the drives to move that one. I can.still use the RRF provision for bed levelling to get really fine precision, but it’s less than 0.1mm over a span of more than a meter now, close enough for me.