Issues setting up duet wifi with dual x axis motors and endstops
-
@droftarts
when i edited to what you suggested with the H1 variable neither endstop worked..so i switched back to my original S1 and the x endstop works again but the x2 is still not recognising the x2 endstop (plugged into the E1, aka drive 4 slot) , and yes the endstop triggers in the machine properties as i said before...im going to bed now but im going to post my gcode again as text since you were unable to open the text file. My current files are as follows:
CONFIG G
; Configuration file for Duet WiFi (firmware version 2.03); executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v2.1.1 on Sun Nov 03 2019 09:32:23 GMT-0500(Eastern Standard Time)
M550 P"The Big One" ; set printer name
; Network
M587 S"davet" P"helicopter"
M552 S1 ; enable network
M586 P0 S1 ; enable HTTP
M586 P1 S0 ; disable FTP
M586 P2 S0 ; disable Telnet
; Motor remapping for dual x, hidden?
M584 X0:4 Y1 Z2 E3 U4 ; drivers 0&4 for x, drivers 1 for y, drivers 2 for z, drivers 3 for Extruder,
G21 ; work in millimeters
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
; Axis Limits
M208 X0 Y0 Z0 U0 S1 ; set axis minimum
M208 X800 Y500 Z400 U800 S0 ; set axis maximum
; Endstops
M574 X1 S0 ; position low, active low
M574 E1 S0 ; position low, active low
M574 Y1 S0 ; set active high endstops
M574 U1 S0 ; set active blah blah
M574 Z1 S2 ; set endstops controlled by probe; Drives
M569 P0 S0 ; physical x drive 0 goes reversed
M569 P1 S1 ; physical y drive 1 goes forwards
M569 P2 S1 ; physical z drive 2 goes forwards
M569 P3 S1 ; physical extruder drive 3 goes forwards
M569 P4 S0 ; physical X2 drive 4 goes reversed
M350 X16 Y16 Z16 U16 E16 I1 ; configure microstepping with interpolation
M92 X400.00 Y80.00 Z400.00 U400.00 E415.00 ; set steps per mm
M566 X600.00 Y600.00 Z12.00 U600.00 E120.00 ; set maximum instantaneous speed changes aka jerk speed(mm/min)
M203 X7200.00 Y7200.00 Z180.00 U7200.00 E1500.00 ; set maximum speeds (mm/min)
M201 X500.00 Y500.00 Z20.00 U500.00 E10000.00 ; set accelerations (mm/s^2)
M906 X1000.00 Y1000.00 Z1400.00 U1000.00 E1200.00 I30 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout
; Z-Probe
M307 H3 A-1 C-1 D-1 ; disable heater on PWM channel for BLTouch
M558 P9 H5 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds
G31 P500 X0 Y0 Z2.5 ; set Z probe trigger value, offset and trigger height
M557 X15:215 Y15:195 S20 ; define mesh grid
; Heaters
M305 P0 T100000 B4138 R4700 ; set thermistor + ADC parameters for heater 0
M143 H0 S120 ; set temperature limit for heater 0 to 120C
M305 P1 T100000 B4138 R4700 ; set thermistor + ADC parameters for heater 1
M143 H1 S280 ; set temperature limit for heater 1 to 280C
; Fans
M106 P0 S0 I0 F500 H-1 ; set fan 0 value, PWM signal inversion and frequency. Thermostatic control is
turned off
M106 P1 S1 I0 F500 H1 T45 ; set fan 1 value, PWM signal inversion and frequency. Thermostatic control is
turned on
; Tools
M563 P0 D0 H1 F0 ; define tool 0
G10 P0 X0 Y0 Z0 U0 ; 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
M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
HOME X
; homex.g; called to home the X axis
;
; generated by RepRapFirmware Configuration Tool v2.1.1 on Sun Nov 03 2019 09:32:23 GMT-0500 (Eastern Standard Time)
G91 ; relative positioning
G1 S2 Z5 F6000 ; lift Z relative to current position
M584 X0 U4 P4 ; Split x into 2
G1 S1 X-805 U-805 F900 ; move quickly to X axis endstop and stop there (first pass) S1 checks for endstop hit
; go back a few mm
G91
G1 S2 X5 U5 F1800 ; go back a few mm
G1 S1 X-10 U-10 F360 ; move slowly to X axis endstop once more (second pass) S1 checks for endstop hit
M584 X0:4 P3 ; Join U to X again
G90
G92 X0
G1 S2 Z-5 F2000 ; lower Z againG90 ; absolute positioning
HOMEALL
; homeall.g; called to home all axes
;
; generated by RepRapFirmware Configuration Tool v2.1.1 on Sun Nov 03 2019 09:32:23 GMT-0500 (Eastern Standard Time)
G91 ; relative positioning
G1 S2 Z5 F6000 ; lift Z relative to current position
M584 X0 U4 P4 ; Split x into 2
G1 S1 X-805 Y-505 U-805 F900 ; move quickly to X and Y axis endstops and stop there (first pass)G1 S2 X5 Y5 U5 F1800 ; go back a few mm
G1 S1 X-10 Y-10 U-10 F360 ; move slowly to X and Y axis endstops once more (second pass)
M584 X0:4 P3 ; Join U to X again
G90 ; absolute positioning
G1 S2 X15 Y15 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 S2 Z5 F100 ; lift Z relative to current position
G90 ; absolute positioning
-
@wingtip What firmware version are you on? Send M115 and post the reply. The only reason H1 doesn't work and S1 does would be if you are using firmware version 2.01 or earlier; from 2.02 they have the same function. See HERE. Which may also explain why the splitting of the axes and homing the two motors at the same time isn't working (though I thought this has been supported for a long time).
I also notice in Endstops section
M574 E1 S0 ; position low, active low
. Remove or comment this out. 'E' in M574 was only support in firmware 1.16 and earlier. See HERE. I'm not sure of the effect of this line, but may be being applied to the Extruder endstops and causing issues with U.Apart from the above, I can't see any reason why the homing isn't working. Though you do need an
G92 X0
after you re-join the axes in your homeall.g.Also, as I said before, in Network section, remove
M587 S"davet" P"helicopter"
from your config.g. It will slowly kill the flash memory on the WiFi module.Ian
-
@droftarts
I do believe it’s 2.01 but will let you know when I get home.
As for the network setting I’ll worry about that after I at least get the x axis working. Once it’s working as it should I’ll mount the cross beams and start engineering the carriage (y axis).Thank you all for your patience in this.
-
@wingtip said in Issues setting up duet wifi with dual x axis motors and endstops:
I do believe it’s 2.01 but will let you know when I get home.
Please update to the latest stable release.
https://duet3d.dozuki.com/Wiki/Installing_and_Updating_FirmwareIan
-
left work early due to the christmas party
confirmed:
Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
Firmware Electronics: Duet WiFi 1.02 or later
Firmware Version: 2.01(RTOS) (2018-07-26b2)
WiFi Server Version: 1.21
Web Interface Version: 1.21.2-dc42will try to update now and get back with you.
-
Ok... im getting frustrated here but i think we're close. So right now here are my versions now.
Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
Firmware Electronics: Duet WiFi 1.02 or later
Firmware Version: 2.04 (2019-11-01b1)
WiFi Server Version: 1.23
Web Interface Version: 1.21.2-dc42I also removed the Endstop line for E as mentioned. I verified the x2 endstop is in fact working and triggering when viewing the machine properties window. but im still not able to stop the x2 motor/aka U drive thats plugged into the E1 port with the enstop thats plugged into the E1 enstop port.
Looking at this image
the green circle shows the x1 motor/vertical post. the motor is currently at mid travel OFF the endstop and is displaying the correct status. This motor also stops correctly when it does get to the endstop
the red circle shows the x2 motor/vertical post that is plugged into the E1 motor port which is remapped to U4. The endstop is plugged into the E1 port. the motor is currently at mid travel OFF the endstop and is displaying the wrong status but does trigger when manually activated. the problem is it still does not STOP the x2 motor/vertical post aka U4. the motor still just ignores this endstop
the blue circle has me really confused... why is my E0, aka extruder showing a min of 0 and a max of 800 while the E1, aka the x2 motor only shows n/a despite clearly being defined in the config to be min 0 and max 800???????? uggggg im brain fried
-
Update your DWC version, you’re using a very old one, may not be compatible, and give wrong info. It may assume an order for the motors that is incorrect. Use the latest version (2.04 or 1.22.6) from the firmware release DuetWebControl-SD-2.04.zip file or https://github.com/chrishamm/DuetWebControl/releases
This won’t affect the homing behaviour, but should give you the correct info!
It shouldn’t make any difference, but can you try changing the order of your M584 command? To
M584 X0:4 Y1 Z2 U4 E3
Have you tried homing the U axis on its own? Try typing into console:
M584 X0 U4 P4
G91
G1 H1 U-800 F3000
G90Ian
-
well according the link you first gave me it said the zip file i downloaded should update everything but i will go looking for the webcontrol update real quick. However when i was testing the movements and endstops that was using the paneldue.
-
i just tried the commands you suggested and still the same thing, the u starts to head to home and endstop is ignored the state says its triggered when its not suppose to be, then when i manually trigger it , it says triggered=no So you can see it working its just backwards . but its setup just the same as the x1 as both motors rotate in the same direction etc so the direction is correct and endstop settings should be the same since the x1 works perfect. Right?
the updated webcontrol is certainly different.. i dont like how it lessened the travel buttons from the +100 to now max travel button is +50.
-
@wingtip said in Issues setting up duet wifi with dual x axis motors and endstops:
i dont like how it lessened the travel buttons from the +100 to now max travel button is +50.
You can right click on the buttons and redefine them.
-
@Phaedrux Nice! told you guys im new to reprap and duets but im loving it so far despite the issues im having lol
-
Is your PanelDue firmware up to date too? https://duet3d.dozuki.com/Wiki/PanelDue_Firmware_update
Is the wiring, or the endstop, different on the U axis to the X axis? Because that sounds like it’s inverted, which it isn’t in config.g
In the Fans section of your config.g, the comments of the two M106 commands seemed to had a return put in, so the words “turned off” and “turned on” appear to be on new lines. Lines must start with a Gcode or a comment mark (semi colon). I doubt this will change anything, but good to tidy it up!
I am running out of ideas as to why this isn’t working. My only other suggestion would be to swap the U axis with the extruder, so move the U motor to E0, and the U endstop to E0 Endstop pins, and test if it works there.
Ian
-
@droftarts
the paneldue is 1.21.4 -
well im done... trying to update this panel due as suggested and its been a headache and now im to mad to continue for tonight... first off the enclosure i printed from thingiverse wasnt designed with updating firmware in mind and would be to much work to disassemble.... the designer left plenty of room for the other connectors but no way to get a micro usb plug to the board.. i had to sand down my plug to skin and bones to fit in the tiny slot he left for access... then when i followed the instructions on the web link provided after downloading bossa, my panel due now only displays a black screen and its not recognising it in windows so i cant get the port to use bossa to re upload the firmware....
ill see you guys in the morning
-
@wingtip said in Issues setting up duet wifi with dual x axis motors and endstops:
Ok... im getting frustrated here but i think we're close. So right now here are my versions now.
Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
Firmware Electronics: Duet WiFi 1.02 or later
Firmware Version: 2.04 (2019-11-01b1)
WiFi Server Version: 1.23
Web Interface Version: 1.21.2-dc42I also removed the Endstop line for E as mentioned. I verified the x2 endstop is in fact working and triggering when viewing the machine properties window. but im still not able to stop the x2 motor/aka U drive thats plugged into the E1 port with the enstop thats plugged into the E1 enstop port.
Looking at this image
the green circle shows the x1 motor/vertical post. the motor is currently at mid travel OFF the endstop and is displaying the correct status. This motor also stops correctly when it does get to the endstop
the red circle shows the x2 motor/vertical post that is plugged into the E1 motor port which is remapped to U4. The endstop is plugged into the E1 port. the motor is currently at mid travel OFF the endstop and is displaying the wrong status but does trigger when manually activated. the problem is it still does not STOP the x2 motor/vertical post aka U4. the motor still just ignores this endstop
the blue circle has me really confused... why is my E0, aka extruder showing a min of 0 and a max of 800 while the E1, aka the x2 motor only shows n/a despite clearly being defined in the config to be min 0 and max 800???????? uggggg im brain fried
To see the U axis endstop properly, you need to make the U axis visible temporarily, by sending M584 P4.
-
good morning gents..... so after a nights rest and calming down i found another cable this morning and tried it and bam, it recognised it and gave me the port i needed and now have my panel due working again and updated to now 1.23.2.
so i went to try to home again and same issues... so in the new web control when editing it has a g code reference where before i was using some random web page... when using the reference from the webcontrol it seems to have some more updated info and i noticed this section and thought id give it a try
M574 - RepRapFirmware 3
ParametersXnnn Position of X endstop: 0 = none, 1 = low end, 2 = high end.
Ynnn Position of Y endstop: 0 = none, 1 = low end, 2 = high end.
Znnn Position of Z endstop: 0 = none, 1 = low end, 2 = high end.
P"pin_name" Defines the pin name(s) that the endstop(s) for the specified axis are connected to. Needed when S=0 or S=1.
Snnn Endstop type: 0 = active low endstop input, 1 = active high endstop input, 2 = Z probe (when used to home an axis other than Z), 3 = single motor load detection, 4 = multiple motor load detection (see Notes).
Order dependencyThis command must be later in config.g than the M584 command that creates additional axes, or axes that have multiple motors and endstops.
Usage
The M574 command has been updated to allow for more flexibility. This includes supporting axes defined with multiple motors and multiple endstops (one per motor), use of non-default endstop inputs, and re-assigning endstop inputs.
Notes
Use a separate M574 command for each axis.
New parameter P gives the pin name(s) for the endstop(s) for the specified axis. If the number of pins matches the number of motors assigned to that axis, motors will be stopped individually when their endstop switches trigger.
New endstop type S4 means use motor stall detection (like S3) but if there are multiple motors, stop each one individually as it stalls. S3 means use motor stall detection but as in RRF 2: stop all relevant motors when the first one stalls.
ExampleOld RRF_2.x code:
M574 X1 Y1 Z1 U2 S1 ; active high endstop switches, XYZ at min, U at max
New RRF_3 code:M574 X1 S1 P"xstop" ; X min active high endstop switch
M574 Y1 S1 P"ystop" ; Y min active high endstop switch
M574 Z1 S1 P"zstop" ; Z min active high endstop switch
M574 U2 S1 P"e0stop" ; U max active high endstop switch
To use two Z motors using independent homing switches, declare two Z motors in M584, then declare two pins for Z endstops in a single M574 command. ExampleM584 X0 Y1 Z2:3 E4
M574 Z1 S1 P"io2.in+io3.in" ; Z axis with two motors, individual min endstops, active high
The order of endstop switch pin names in M574 must match the order of Z motor driver numbers in M584. When homing Z, RRF_3 homes the motors of the axis at the same time, independently to their defined endstops.so i briefly experimented with this in hopes this would solve my issues but still nothing. And im still noticing the 2nd endstop is still triggered on the wrong end no matter which way you configure it... i think i need to follow the advice to swap to a different port instead of E1/drive 4 but im off to work now and i will do some more suffering after work lol....
-
@wingtip said in Issues setting up duet wifi with dual x axis motors and endstops:
i had to sand down my plug to skin and bones to fit in the tiny slot he left for access
Sorry you're having difficulty.
Probably would have been better to modify the enclosure rather than the PanelDue, though. It sounds like you have already deleted the firmware, and the USB is not making enough of a connection on whatever remains of the USB connector. You could solder a cut off USB cable's wires direct to the PCB, on the back where the pins are accessible. I'm checking to see if there's any other way to program the PanelDue apart from via USB(edit: fixed!). Have you got a Thingiverse link to the enclosure? Worth mentioning the problem in the comments.I'm going to try and recreate your issue with the X homing today with a really simple set up (2 motors, 2 endstops and your config and homing files). I'll let you know how I get on.
Ian
-
@wingtip said in Issues setting up duet wifi with dual x axis motors and endstops:
good morning gents..... so after a nights rest and calming down i found another cable this morning and tried it and bam, it recognised it and gave me the port i needed and now have my panel due working again and updated to now 1.23.2.
Great!
so i went to try to home again and same issues... so in the new web control when editing it has a g code reference where before i was using some random web page... when using the reference from the webcontrol it seems to have some more updated info and i noticed this section and thought id give it a try
You've probably been looking at the general reprap Gcode page https://reprap.org/wiki/G-code, which may not have the latest info on it, and has multiple versions of gcodes for how each different firmware interprets the commands! Best to use the Duet-specific one we curate: https://duet3d.dozuki.com/Wiki/Gcode. There are plenty of links in the documentation to our one, and in my posts where I've referenced gcodes!
M574 - RepRapFirmware 3
Unless you've updated your Duet firmware again, you are NOT using RRF3, you're using RRF2 v2.04. Make sure you use the correct section! https://duet3d.dozuki.com/Wiki/Gcode#Section_M574_RepRapFirmware_2_x_and_earlier
so i briefly experimented with this in hopes this would solve my issues but still nothing. And im still noticing the 2nd endstop is still triggered on the wrong end no matter which way you configure it... i think i need to follow the advice to swap to a different port instead of E1/drive 4 but im off to work now and i will do some more suffering after work lol....
Okay! I'll test your setup and see what I get.
Ian
-
@droftarts
Ya I realized it was a different version but I was desperate and can easily change back the few lines I edited.
I look forward to your results if you use the same ports/drives and my config. -
I've had some problems with this, but the outcome seems to be to plug the U endstop into E0! This works for me, even though the motor is plugged into motor drive E1. I'll check with @dc42 why this might be! On the whole, I'd just move the whole U axis to motor driver 3 (E0).
Edit: Tested, set U to driver 3 (E0) U endstop connected to E0_ENDSTOP works. In config.g change to:
M584 X0:3 Y1 Z2 U3 E4 P3
M569 P3 S0
M569 P4 S1
Also change U4 to U3 in homing files.I think your endstops may be wired Normally Open (NO) rather than Normally Closed (NC). It says HERE that you should use the Normally Closed pins (the outer two, the three pins usually being G (Ground), NO (Normally Open) and NC (Normally Closed)) of your microswitch. It goes on to say:
... set the signal polarity to active high (S1) in the M574 command
eg yours should be:
; Endstops M574 X1 Y1 U1 S1 ; position low, active low M574 Z1 S2 ; set endstops controlled by probe
This should mean that:
- If an endstop is not connected, the LED next to the axis motor connector will be off, and 'Triggered' will be 'Yes'
- If an endstop is connected and not triggered, the LED next to the axis motor connector will be lit, and 'Triggered' will be 'No'
- If an endstop is connected and triggered, the LED next to the axis motor connector will be off, and 'Triggered' will be 'Yes'
However, your config.g has the endstops triggering active low (M574 S0), and this seems to be shown in the endstop response. I have to invert mine with S1 to get the right response. The main thing is that all used endstops should report 'No' when not triggered, and 'Yes' when triggered!
Ian