Issues setting up duet wifi with dual x axis motors and endstops
-
Actually, I think this is your problem. The weird formatting of your config.g.
; 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
The powerloss command has been split up onto multiple lines, so the command M913 X0 Y0 is now it's own command not conainted within the quotes of the M911 command. M913 X0 Y0 is setting your motor currents to nothing.
To verify, send M913 by itself in the console. It should reply with the motor current percentage. Then send M913 X100 Y100 to set it to 100 and try to move again.
-
that was mentioned above and i have since quoted those commands out as instructed. but when i get home from work this evening i will try removing the u axis as you suggest but doesnt that nullify that endstop as well?
-
ok i couldnt wait till after work and i tested this before leaving for work and its moving again!!!!! I didnt remove the U drives and just checked the motor currents as you suggested even though i had them quoted out and sure enough they were zero... unfortuneatly i smashed the x2 motor endstop again when i asked it to home x lol.... so i need to tweak the settings there..
im not sure why that power off setting command has x0 and y0 as ive never messed with it
-
I just ran your original config.g and get these errors in the console:
M98 P"/sys/TEST/config.g" HTTP is enabled on port 80 FTP is disabled TELNET is disabled Warning: M264 command is not supported Error: GCodes: Attempt to read a GCode unsigned array that is too long: M350 X16 Y16 Z16 U16 E16:16 I1 Error: M911: No power fail script provided Error: G0/G1: insufficient axes homed
As @Phaedrux has already pointed out, and I missed earlier, M264 is incorrect, and should be M564. And really shouldn't be in config.g anyway, as leaves the machine in a potentially vulnerable state at start up. Delete, or change to:
M564 H0
The M350 error is because you're setting the microstepping mode for two extruders, when only one is defined. The command is being ignored. However, x16 with interpolation is the default anyway. Change to:
M350 X16 Y16 Z16 U16 E16 I1
The problem with M911 has already been covered, and sorry for missing that, too. Make sure to edit it back to one line, or comment all the moves out. I expect it was the M913 command setting the motor currents to zero that really caused your problems. Make sure ALL those last 5 commands are commented out, or write it as:
M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
I've also just tested having a U axis defined as you had it. It doesn't cause any problems for me. If I send
M584 X0 Y1 Z2:3 E4 U3
(which suits my machine) I get an extra U axis in the console. After runningM564 H0
I can jog any axis. Jogging Z, both motors move, jogging U, one Z motor moves; as @fcwilt said, hiding/showing it doesn't stop the combined axis moving. I can't see why having the U axis in your config.g would cause the printer to stop. I would hide the axis as standard, though, and only unhide it for homing, so you don't accidentally move it and get your axis out of sync. You do need to have the U motor settings in your config.g, so you may as well define the axis there, too, just hide it. So try changing M584 to:
M584 X0:4 Y1 Z2 U4 E3 P3
Some other minor things:
In the network section, comment out or delete M587 (Add WiFi host network to remembered list). As it says in the Gcode dictionary: Important! Do not use M587 within config.g. As well as being a security hazard, writing the access point parameters to WiFi chip every time you start the Duet may eventually wear out the flash memory. Also, the wifi module does not get enabled until the end of running config.g. It is better to use a macro to send M587 (source: https://forum.duet3d.com/post/42798)You don't need the M111 S0 (Debug) or M555 P1 (Set compatibility) codes.
Thermistor settings: you are using the default values,
M305 P1 T100000 B4138 R4700
, which are probably incorrect.I'm not sure where all the extra spaces in your config.g came from. Did you edit it in a text editor that converted the line endings to two returns? Or just spaced it out for your visibility? It's not a problem, but just make sure when you do this that you are breaking the lines in the right place! All lines need to start with either a gcode, or a comment mark ";".
Hope that helps. It's been good for me to test some of these things out!
-
@droftarts
Thank you so much for your input. A few of those issues have already been addressed but I will post an updated config file later this evening. I will also certainly address some of the other issues you mentioned.
Most of the script was auto generated but I did insert/edit some changes from the video I linked earlier that showed their code for a dual x setup.The next issue is figuring out why the x2 motor endstop isn’t working. Which is technically u4 endstop
-
@wingtip said in Issues setting up duet wifi with dual x axis motors and endstops:
The next issue is figuring out why the x2 motor endstop isn’t working. Which is technically u4 endstop
The U endstop should be connected to the E1 endstop connection, like the U motor is connected to the E1 motor driver. If you have a known-working endstop, swap it over, and test by pressing each one and see if it's registering in DWC (Machine-Specific tab, Endstops).
I think the U axis has to be defined by M584 in config.g, and the U axis be visible in DWC, for the endstop to be seen, and it might even be that you need to split the axis (ie M584 X0 U4) for each X axis endstop to register. Otherwise it will only be seen in the homing script, where again, you have to split out the axes. I haven't tested this as I don't have a machine set up with an axis made up of two motors with endstops for each; I have a IR probe on the Z axis of my Cartesian machine.
Ian
-
Thank you all for the help so far... currently the motors are moving again. here is my current config file. the current issue is with an endstop. I temporarily have everything unhidden so i can check the endstop status in machine properties and make movements to the x or U (my x2 motor).
If i do an x move say +10, BOTH POSTS MOVE. Ok no biggie at least they're in sync...but if i do a U movement only the x2 moves. Ok no biggie that one will be hid later.
if i hit home x, both motors start moving together and heading towards home as they should. However, if i manually hit the x1 endstop with my finger the x1 motor stops and the U/x2 motor keeps coming as it should.. but when i trigger the endstop for that one the motor keeps coming until i have to E stop or power off before it tries to smash another endstop.
Ive confirmed in the machine status window the endstop works and will trigger but no matter which way i configure the endstop high or low etc it just ignores it so it has to be something elsewhere in the config...
So for reference:
x1 motor plugged into the x channel aka drive 0, this endstop plugged into the x slotx2 motor plugged into the E1 channel aka drive 4, which is remapped as U4, this endstop is plugged into the E1 endstop channel.
config.g -
I can’t open your config.g to check (typing on iPhone), but It’s probably not the endstop, it’s your homing script that’s the problem. The whole point of making the U axis is so that when you home the X axis, you home X and U at the same time, but independently.
First, check that the U endstop is triggering. Press the endstop switch and check it’s state changes in DWC, Machine Specifics tab, Endstops.
Then, edit Homex.g with something like:
G91 ; relative moves M584 X0 U4 P4; splits X axis into individual motors, visible U G1 H1 X-500 U-500 F6000 ; home fast G1 X5 U5 F5000 ; move off Endstops G1 H1 X-10 U-10 F600 ; home slow M584 X0:4 P3 ; combine X motors G92 X0 ; tell firmware where we are G90 ; absolute moves
You’ll have to copy this into homeall.g too. Hope that makes it clear.
Ian
-
@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