Issues setting up duet wifi with dual x axis motors and endstops
-
-
Still looking for some answers .... Thank you
-
You have
M264 H0 ; allows movement without being homed first
in your config. M264 is not a valid gcode. It should be M564. Perhaps that's why it's not moving when you expect it to? -
lol that was an error on my part and me being lazy... but even when i take that out nothing is moving... i may just start back over and do it the way i had it working with just one endstop since nobody on the actual duet forums has a clue to why its not working...
-
How's are you trying to move the motors? Are you trying to send a G1 command? The jogging controls? Homing macro?
We need some more info.
If it was working before what did you change to stop it working?
The dual endstop thing could explain it but we need some more detail. If you send m119 to get endstop status what does it say?
-
as i said , when i started tweaking the script as demonstrated in the video link i provided to do a dual motor setup properly is when things stopped working. more specifically the combine axis command x:4 and assigning the U4....
-
when doing M119 i get this:
Endstops - X: not stopped, Y: not stopped, Z: at min stop, U: not stopped, Z probe: at min stop
cause the vertical posts are near mid travel and just sitting
-
The only difference I can see between your config and the example config from @percar is that you have the U axis defined in config.g whereas he does not.
M584 X0:4 Y1 Z2 E3 U4 ; drivers 0&4 for x, drivers 1 for y, drivers 2 for z, drivers 3 for Extruder, P shows home for U
M584 X1:2 Y0 Z3:4 E5 ; Apply custom drive mapping
So perhaps you'll have better luck emulating his setup. It should still work to split the axis for homing as you do in homex.
-
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