Duex5 drive and endstop mapping
-
Disaster continues with this thing. I have two Y steppers connected to E2 and E3 of duex5. The respective endstops are connected to E0 stop and Y stop of duet 2 wifi. I want them to "auto level" like my Z does with the bltouch. How on earth is this mapped? I appreciate the help.
Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Fri Feb 26 2021 10:46:02 GMT-0500 (Eastern Standard Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"My Printer" ; set printer name ; Network M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0 S1 ; physical drive 0 goes forwards s1 is forward s0 backwards ; physical drive 1 goes forwards M569 P2 S0 ; physical drive 2 goes forwards M569 P3 S1 M569 P4 S0 ; physical drive 3 goes forwards M584 X0 Y1 Z2:4 E2 E3 ; set drive mapping M671 X-20:290 Y0:0 S5 ;leadscrews at left (connected to Z) and right (connected to E1) of X axis M208 X10:300 Y0:180 ;X carriage moves from -5 to 270, Y bed goes from 0 to 130 M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z400.00 E420.00 ; set steps per mm M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z20.00 E250.00 ; set accelerations (mm/s^2) M906 X800 Y800 Z800 E800 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X310 Y310 Z180 S0 ; set axis maxima ; Endstops M574 X2 S1 P"!xstop" ; configure active-high endstop for high end on X via pin !xstop M574 Y2 S1 P"!ystop" ; configure active-high endstop for high end on Y via pin !ystop M574 Z2 S2 ; configure Z-probe endstop for high end on Z ; Z-Probe ; create servo pin 0 for BLTouch M558 P9 C"^zprobe.in" H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds M950 S0 C"duex.pwm1" G31 P500 X27 Y0 Z1.28 ; set Z probe trigger value, offset and trigger height M557 X15:215 Y15:195 S20 ; define mesh grid
-
See the example here for Z endstops.
It's the same for Y. Put both the endstop pins in the M574 command for Y, and then home Y as normal.
-
@phaedrux I follow some of that. I think the Y endstops are setup correctly but how does M584 know to look at the duex5? There's already a Z2:4 so just putting Y2:3 seems incorrect. Also, how do you map M569 for the Y via duex5.
; Drives M569 P0 S1 ; physical drive 0 goes forwards s1 is forward s0 backwards ; physical drive 1 goes forwards M569 P2 S0 ; physical drive 2 goes forwards M569 P3 S1 M569 P4 S0 ; physical drive 3 goes forwards M584 X0 Y2:3 Z2:4 ; set drive mapping M671 X-20:290 Y0:0 S5 ;leadscrews at left (connected to Z) and right (connected to E1) of X axis M208 X10:300 Y0:180 ;X carriage moves from -5 to 270, Y bed goes from 0 to 130 M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z400.00 E420.00 ; set steps per mm M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z20.00 E250.00 ; set accelerations (mm/s^2) M906 X800 Y800 Z800 E800 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X310 Y310 Z180 S0 ; set axis maxima ; Endstops M574 X2 S1 P"!xstop" ; configure active-high endstop for high end on X via pin !xstop M574 Y1 S0 P"!ystop" ; configure active-high endstop for high end on Y via pin !ystop M574 Z2 S2 ; configure Z-probe endstop for high end on Z
-
The Duex drivers take the next range of numbers. 0 1 2 3 4 are on the Duet. 5 6 7 8 9 are on the Duex.
Which drivers are the Y motors plugged into?
Which endstops are the Y endstops plugged into?
-
Drivers for Y are E2, E3 of duex.
Endstops for Y are E0 and Y stop of the duet 2 wifiSo endstops for Y would be 'M574 Y1 SO' ?
Mapping for Y - 'M584 X0 Y5:6 Z2:4' ?And M569 would just continue with P5 and P6?
-
M574 Y1 S0 P"!ystop+!e0stop"
M584 X0 Y5:6 Z2:4
This assumes that Ystop is paired with driver 5 motor, and e0stop is paired with driver 6 motor.
-
@phaedrux Thanks for the help. I think I'm heading in the right direction. Do I need to change anything in the homeall.g, homeX.g, Y folders?
When I home all it'll home X then I get a "Homing failed" on the paneldue.
-
Please send M122 and M98 P"config.g" in the gcode console and report the results.
Also test your endstops with M119 to get their status. Check it again with the endstop switch depressed.
Also please share your homeall, homex, homey, homez macros.
-
With M119 it says no endstop for Y.
M119
Endstops - X: not stopped, Y: no endstop, Z: not stopped, Z probe: not stoppedM122
=== Diagnostics ===
RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3RC3 (2021-05-26 13:47:14) running on Duet WiFi 1.02 or later + DueX5
Board ID: 08DGM-956GU-DGMSN-6JTD4-3SD6Q-1VRMH
Used output buffers: 3 of 24 (24 max)
=== RTOS ===
Static ram: 23876
Dynamic ram: 75228 of which 40 recycled
Never used RAM 12416, free system stack 134 words
Tasks: NETWORK(ready,13.8%,252) HEAT(delaying,0.0%,330) Move(notifyWait,0.1%,313) DUEX(notifyWait,0.0%,24) MAIN(running,85.8%,503) IDLE(ready,0.4%,29), total 100.0%
Owned mutexes: WiFi(NETWORK)
=== Platform ===
Last reset 00:03:53 ago, cause: power up
Last software reset at 2021-06-22 16:13, reason: User, GCodes spinning, available RAM 11916, slot 1
Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a
Error status: 0x0c
Aux0 errors 0,0,0
Step timer max interval 0
MCU temperature: min 21.8, current 29.2, max 29.4
Supply voltage: min 23.8, current 24.0, max 24.3, under voltage events: 0, over voltage events: 0, power good: yes
Heap OK, handles allocated/used 99/0, heap memory allocated/used/recyclable 2048/8/8, gc cycles 0
Driver 0: position 15040, standstill, SG min/max 63/173
Driver 1: position 0, standstill, SG min/max not available
Driver 2: position 2000, standstill, SG min/max not available
Driver 3: position 0, standstill, SG min/max not available
Driver 4: position 0, standstill, SG min/max not available
Driver 5: position 0, standstill, SG min/max not available
Driver 6: position 0, standstill, SG min/max not available
Driver 7: position 0, standstill, SG min/max not available
Driver 8: position 0, standstill, SG min/max not available
Driver 9: position 0, standstill, SG min/max not available
Driver 10: position 0
Driver 11: position 0
Date/time: 2021-06-22 18:40:28
Cache data hit count 4294967295
Slowest loop: 7.96ms; fastest: 0.17ms
I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
=== Storage ===
Free file entries: 10
SD card 0 detected, interface speed: 20.0MBytes/sec
SD card longest read time 4.0ms, write time 0.0ms, max retries 0
=== Move ===
DMs created 83, maxWait 87956ms, bed compensation in use: none, comp offset 0.000
=== MainDDARing ===
Scheduled moves 20, completed moves 20, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 7], CDDA state -1
=== AuxDDARing ===
Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== Heat ===
Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
=== GCodes ===
Segments left: 0
Movement lock held by null
HTTP is idle in state(s) 0
Telnet is idle in state(s) 0
File is idle in state(s) 0
USB is idle in state(s) 0
Aux is idle in state(s) 0
Trigger is idle in state(s) 0
Queue is idle in state(s) 0
LCD is idle in state(s) 0
Daemon is idle in state(s) 0
Autopause is idle in state(s) 0
Code queue is empty.
=== DueX ===
Read count 1, 0.26 reads/min
=== Network ===
Slowest loop: 15.54ms; fastest: 0.00ms
Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions
HTTP sessions: 1 of 8- WiFi -
Network state is active
WiFi module is connected to access point
Failed messages: pending 0, notready 0, noresp 0
WiFi firmware version 1.26
WiFi MAC address 84:0d:8e:b2:7c:16
WiFi Vcc 3.36, reset reason Turned on by main processor
WiFi flash size 4194304, free heap 23432
WiFi IP address 192.168.1.233
WiFi signal strength -26dBm, mode 802.11n, reconnections 0, sleep mode modem
Clock register 00002002
Socket states: 0 0 0 0 0 0 0 0
; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Fri Feb 26 2021 10:46:02 GMT-0500 (Eastern Standard Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X315 Y315 F1800 ; move quickly to X and Y axis endstops and stop there (first pass) G1 H2 X-5 Y-5 F6000 ; go back a few mm G1 H1 X315 Y315 F360 ; move slowly to X and Y axis endstops once more (second pass) G90 ; absolute positioning G1 X155 Y155 F6000 ; go to first bed probe point and home Z G30 ; home Z by probing the bed ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
; called to home the X axis ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Fri Feb 26 2021 10:46:02 GMT-0500 (Eastern Standard Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X315 F1800 ; move quickly to X axis endstop and stop there (first pass) G1 H2 X-5 F6000 ; go back a few mm G1 H1 X315 F360 ; move slowly to X axis endstop once more (second pass) G1 H2 Z-5 F6000 ; lower Z again G90 ; absolute positioning
; called to home the Y axis ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Fri Feb 26 2021 10:46:02 GMT-0500 (Eastern Standard Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 Y315 F1800 ; move quickly to Y axis endstop and stop there (first pass) G1 H2 Y-5 F6000 ; go back a few mm G1 H1 Y315 F360 ; move slowly to Y axis endstop once more (second pass) G1 H2 Z-5 F6000 ; lower Z again G90 ; absolute positioning
; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Fri Feb 26 2021 10:46:02 GMT-0500 (Eastern Standard Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G90 ; absolute positioning G1 X155 Y155 F6000 ; go to first probe point G30 ; home Z by probing the bed ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
- WiFi -
-
How bout this one?
M98 P"config.g"
That might give us some syntax errors from your config.g.3.3RC3
Firmware 3.3 final is available now, so good idea to update.
Upload this zip file to the system tab in DWC.
https://github.com/Duet3D/RepRapFirmware/releases/download/3.3/Duet2and3Firmware-3.3.zip
Y: no endstop
Can you repost your current config.g after any changes you've made? Looks like the Y endstop config isn't correct.
-
@phaedrux How do I get the M98 P"config.g" information?
-
@phaedrux Ok I've got it homing now after the update but I've got a new problem. When I press HomeY on the panel due the gantry moves away from endstops. I thought I could just switch the S0 in the mapping of P5,P6 but it's not switching. Do I have to wire it backwards? The steppers don't seem to be fighting each other.
-
The Y steppers are facing away from each other. I switched P5 S0 to be opposite P6 S1 and they fight when I press homeY.
; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Fri Feb 26 2021 10:46:02 GMT-0500 (Eastern Standard Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"My Printer" ; set printer name ; Network M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0 S1 ; physical drive 0 goes forwards s1 is forward s0 backwards M569 P5 S0 M569 P6 S1 ; physical drive 1 goes forwards M569 P2 S1 ; physical drive 2 goes forwards M569 P3 S1 M569 P4 S1 ; physical drive 3 goes forwards M584 X0 Y5:6 Z2:4 ; set drive mapping M671 X-20:290 Y0:0 S5 ;leadscrews at left (connected to Z) and right (connected to E1) of X axis M208 X10:300 Y0:180 ;X carriage moves from -5 to 270, Y bed goes from 0 to 130 M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z400.00 E420.00 ; set steps per mm M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z20.00 E250.00 ; set accelerations (mm/s^2) M906 X800 Y800 Z800 E800 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X310 Y310 Z180 S0 ; set axis maxima ; Endstops M574 X2 S1 P"!xstop" ; configure active-high endstop for high end on X via pin !xstop M574 Y1 S1 P"!ystop+!e0stop" ; configure active-high endstop for high end on Y via pin !ystop M574 Z2 S2 ; configure Z-probe endstop for high end on Z ; Z-Probe ; create servo pin 0 for BLTouch M558 P9 C"^zprobe.in" H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds M950 S0 C"duex.pwm1" G31 P500 X27 Y0 Z1.28 ; set Z probe trigger value, offset and trigger height M557 X15:215 Y15:195 S20 ; define mesh grid ; Heaters M308 S0 P"bedtemp" Y"thermistor" 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 M307 H0 R0.135 C738.7 D1.34 S1.00 V23.5 ; enable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"e0temp" Y"thermistor" T100000 B4725 C7.060000e-8 ; configure sensor 1 as thermistor on pin e0temp M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M307 H1 B0 R2.039 C177.8 D6.23 S1.00 V24.0 ; disable bang-bang mode for heater and set PWM limit M143 H1 S285 ; set temperature limit for heater 1 to 280C ; 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 H1 T45 ; set fan 1 value. Thermostatic control is turned on ; Tools M563 P0 D0 H1 F0 ; define tool 0 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 defined ; Miscellaneous M575 P1 S1 B57600 ;enable support for PanelDue T0 ; Select first tool
; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Fri Feb 26 2021 10:46:02 GMT-0500 (Eastern Standard Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X315 Y315 F1800 ; move quickly to X and Y axis endstops and stop there (first pass) G1 H2 X-5 Y-5 F6000 ; go back a few mm G1 H1 X315 Y315 F360 ; move slowly to X and Y axis endstops once more (second pass) G90 ; absolute positioning G1 X155 Y155 F6000 ; go to first bed probe point and home Z G30 ; home Z by probing the bed ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
; homey.g ; called to home the Y axis ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Fri Feb 26 2021 10:46:02 GMT-0500 (Eastern Standard Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 Y315 F1800 ; move quickly to Y axis endstop and stop there (first pass) G1 H2 Y-5 F6000 ; go back a few mm G1 H1 Y315 F360 ; move slowly to Y axis endstop once more (second pass) G1 H2 Z-5 F6000 ; lower Z again G90 ; absolute positioning
-
Update:
When I send M564 S0 H0
X moves correctly
Y moves correctly
Z moves correctly (a negative number should move bed downwards?)I can home X and Y individually via paneldue with no problems.I can home X individually and move it afterwords via paneldue. Homeing Y individually works but after it's homed I can't move it individually.When I press home all or try and home Z individually all hell breaks loose. It sounds like all the steppers are fighting each other but individually they seem correct. I'm making headway, thanks for all the help.
EDIT: When I home Z the Y axis goes all the way to the back, hits the endstops and tries to continue moving backwards (crashing). It seems like it doesn't recognize endstops when Z is homed.
-
@resh said in Duex5 drive and endstop mapping:
@phaedrux How do I get the M98 P"config.g" information?
You send
M98 P"config.g"
as a command in the gcode console and it will execute your config.g as a macro. Any syntax errors will get reported to the console. -
@resh said in Duex5 drive and endstop mapping:
Z moves correctly (a negative number should move bed downwards?)
Negative Z should bring the nozzle and bed closer together. Positive moves them farther apart.
Let's take a step back for a second and get some things sorted out.
First you need to set your mind to the correct coordinate system and everything else will flow from there.
When looking at the printer from the front:
-X moves to the left, +X moves to the right
-Y moves to the front, +Y moves to the backThat's just the way it is.
The endstop location defined in M574 will follow this. If the endstop is at the low end of travel or high end of travel. If it's at the low end it will be X1 or Y1, if it's at the high end of travel, it's X2 or Y2.
That's just the way it is.
The homing direction is set in the homing macros. If the endstop is at the low end of travel, the homing move needs to be negative. If it's at the high end, the homing move needs to be positive.
That's just the way it is.
Now with all those things set in stone, the motor direction of rotation will need to be changed to allow the rest to be true. So if a -X move actually makes it move to the right, then you need to change the direction of rotation on X. Same for Y and Z axis.
Once that rotation direction is correct everything should fall into place provided the other details of endstop position and homing move direction are correct from the start.
-
M574 X2 S1 P"!xstop" ; configure active-high endstop for high end on X via pin !xstop M574 Y1 S1 P"!ystop+!e0stop" ; configure active-high endstop for high end on Y via pin !ystop M574 Z2 S2 ; configure Z-probe endstop for high end on Z
So your endstop definition says that X is at the high end of travel, so the homing move should be positive.
It says Y is at the low end so the Y homing direction should be negative, but your homeall has a positive Y move.
It says your Z axis is at the high end of travel, so when the bed and nozzle are farthest away.
So where are the endstops actually located? That's the first question.
-
@phaedrux Thank you for all the thought out responses. My Y endstop is at the high end. I changed to M574 Y2 S1 and everything is working properly now. I also changed the Z direction. Thanks again
-
Glad you got it sorted out.