Duet 2 WiFi Voron 2.4 - Multiple Z endstops query
-
@Chaos3d I think your issue is due to a limit on the number of characters allowed in the P parameter. "!duex.e2stop+!duex.e3stop+!duex.e4stop+!duex.e5stop" is 51 character between the quotes, and the limit is 50. That's why removing one endstop works. The only option, unless you want edit and recompile the firmware, is to reduce the length of the parameter.
As you're using endstop boards, you can't change the wiring to make them Normally Closed rather than Normally Open, which would allow you to shorten the parameter length by removing the
!
. So, the easiest thing to do is to change the name of the pin; pins often have more than one name, and others are shorter, and should get you under the 50-character limit:E2_STOP: duex.e2stop, exp.e2stop, exp.4
E3_STOP: duex.e3stop, duex.cs6, exp.e3stop, exp.9
E4_STOP: duex.e4stop, duex.cs7, exp.e4stop, exp.14
E5_STOP: duex.e5stop, duex.cs8, exp.e5stop, exp.19
(See https://docs.duet3d.com/Duet3D_hardware/Duet_2_family/DueX2_and_DueX5#pin-names)So try:
M574 Z2 S1 P"!exp.4+!exp.9+!exp.14+!exp.19" ; Z max active high endstop switch
Which would make it 29 characters long.
The reason it stops all motors with one of the endstops removed is because it realises there would be nothing to stop the fourth axis (because 4 axes are defined), so it stops all of them, in the same way that if you only had one endstop, it would stop all axes.
You can check the endstop assignment is being configured correctly by sending M574 on its own in the console, eg (this is mine):
M574 Endstop configuration: X: high end switch connected to pin io1.in Y: low end switch connected to pin io2.in Z: none
This sort of error should also be picked up if you send
M98 P"config.g"
from the console, or if you sent the M574 command manually. eg:M574 Z2 S1 P"!duex.e2stop+!duex.e3stop+!duex.e4stop+!duex.e5stop" Error: M574: string too long
It just doesn't tell you how long it should be!
Ian
-
Hi Ian,
Many thanks for the help! - That makes a lot of sense I was wondering if it was a string too long error.
So I've changed the config file and run the M574 command directly in the console and I now get this:
M574 Endstop configuration: X: high end switch connected to pin !xstop Y: high end switch connected to pin !ystop Z: high end switches connected to pins !(exp.e2stop,exp.4) !(exp.e3stop,exp.9,spi.cs6,duex.cs6) !(exp.e4stop,exp.14,spi.cs7,duex.cs7) !(exp.e5stop,exp.19,spi.cs8,duex.cs8)
However something is really weird now as if I check the endstop state i see this:
So the zstop state is now triggered and manually triggering all endstops does not clear that setting nor does removing the ! from each pin name
executing the M574 Z2 S1 P"!exp.4+!exp.9+!exp.14+!exp.19" command at the console does not throw any errors either
So the plot thickens!!!
Richard
-
@Chaos3d Try configuring each endstop individually and testing them. It may be one is wired incorrectly. eg send
M574 Z2 S1 P"!exp.4"
And test that one endstop, then do the same for !exp.9, !exp.14 and !exp.19. I don't think the endstop logic is switched (ie remove the !), but it might be.
Ian
-
So I've now tried every combination of all the pin names and the only pin names that have any response are the Duex.eXstop versions the exp.4 /9 /14/19 have no response, duex.cs6/7/8 or exp.eXstop variations have no response in the interface at all on the endstop screen, all have been tested individually with and without the ! and none work
i dont understand why the pin names just dont work, it makes no sense
Richard
-
if I run the M571 command from the console whilst the endstop is configured as exp.4/9 etc i get:
m571 Extrusion ancillary PWM has no pin
-
@Chaos3d unfortunately the pin name aliases listed by @droftarts are not correct. In particular the duex.estop pins are routed through the I2C expander on the DueX and the expansion pins that are labelled as exp.estop become the CS pins on the DueX daughterboard connector.
So one option is for you to connect the endstop switches to the CS pins on the daughter board connector. But there is no protection on these pins, in particular the maximum input voltage is 3.3V.
@chrishamm could you please do a build of RRF 3.4.6rc1 for Duet 2 with the max pin name length increased to about 55?
-
-
@dc42 said in Duet 2 WiFi Voron 2.4 - Multiple Z endstops query:
@chrishamm could you please do a build of RRF 3.4.6rc1 for Duet 2 with the max pin name length increased to about 55?
Wow thank you, that would solve all my issues, you are all stars!!
-
@Chaos3d Ah! Sorry, my mistake about the pin names. I suppose, when it didn't say 'duex.e2stop' in the response to M574, I should have realised the mapping wasn't correct:
Z: high end switches connected to pins !(exp.e2stop,exp.4) !(exp.e3stop,exp.9,spi.cs6,duex.cs6) !(exp.e4stop,exp.14,spi.cs7,duex.cs7)
@dc42 is this table wrong, then? https://docs.duet3d.com/Duet3D_hardware/Duet_2_family/DueX2_and_DueX5#pin-names
Ian
-
@droftarts yes, the duex.e#stop pins are not aliases for or shared with anything else. Whereas the cs5..cs8 pins are indeed shared with expansion connector pins.
-
@droftarts said in Duet 2 WiFi Voron 2.4 - Multiple Z endstops query:
@Chaos3d Ah! Sorry, my mistake about the pin names. I suppose, when it didn't say 'duex.e2stop' in the response to M574, I should have realised the mapping wasn't correct:
Hey no worries you helped identify the issue so we are good - I'm still learning all this so everything is useful!!
-
@dc42 said in Duet 2 WiFi Voron 2.4 - Multiple Z endstops query:
@droftarts yes, the duex.e#stop pins are not aliases for or shared with anything else. Whereas the cs5..cs8 pins are indeed shared with expansion connector pins.
Okay, I'll update the table.
Ian
-
@chrishamm Sorry to pester but did the change go into 3.4.6.rc1? only im seeing the date as last week - or am I looking at the wrong thing?
-
@Chaos3d For a quick workaround, move one of the endstops to the Duet board if there are any available, eg e0stop, which is a shorter name and should get you under the 50 character limit.
Ian
-
@Chaos3d Please try out this v3.4 firmware build for the Duet 2: https://drive.google.com/file/d/1LH90R3sbF8BGaFa6T-F-cP40oIsBkET1/view?usp=sharing It has a maximum port length of 60 instead of 50, but be aware I have not tested it yet.
-
@chrishamm - That worked like a charm!! - all endstops triggered as expected and gantry is leveled out which was exactly what i was looking for - I will go through the stuff I had working to make sure its still ok but so far all looking good!! many many thanks!
Rich
-
@droftarts ha ha I was just about to try that when I saw @chrishamm has posted an update cheers @droftarts
-
-
-