I could use some help
-
@mac said in I could use some help:
@fcwilt you know, I'm reading this code, and I'm thinking, that looks fine to me; there's nothing wrong with this code. And yet, the printer isn't doing any of this?
Mac
Well, the homing code for X does look correct but the video did not appear to show any motion along the X axis.
The two Z moves were clear.
Perhaps there was just the X5 move and I missed it.
That would happen if the endstop sensor was indicating active all the time, so the G1 H1 moves would never happen, just the little 5mm move.
Did you notice if that 5mm move happened?
Is the X axis endstop switch using the NO connection or the NC connection?
Frederick
-
@fcwilt the print head was ac100mm right of the endstop at least.
NO is normally open, NC is normally closed, I get that? Should I be looking at the white-green, 2-wire connectors plugged into I/O5 and I/06?
-
@fcwilt all of the endstops have a green wire and a white wire coming into them. All of the green wires are in the center. All of the white wires are under the red switch. All of the third poles on the switches are vacant. When something touches the switch, it makes the switch click. My assumption is that all of the switches are normally open. I’m also assuming that contacting an endstop closes it momentarily.
-
@fcwilt on the board, all of the white wires from the endstops are going to the #_in, and all of the green wires are going to gnd.
-
@mac There's no gurantee, but every microswitch I've ever used had common connection near the button-end of the switch and normally-open in the middle and normally-closed at the opposite end from the push button.
This would mean that you have your switch wired as normally-open.
From the M574 description, since you have a normally-open switch, you shold add the "!" character to your M574 lines:
For active low endstops, use type S1 and invert the input by prefixing the pin name with '!', for example M574 X1 S1 P"!xstop". Invert the input when using an NPN output inductive or capacitive sensor, or using a NO switch (not recommended, use a NC switch instead).
like this:
; Endstops M574 X1 S1 P"!io5.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin io5.in M574 Y1 S1 P"!io6.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin io6.in M574 Z1 S1 P"!io2.in" ; configure switch-type (e.g. microswitch) endstop for low end on Z via pin io2.in
I do not know what Duet board you are using, so I don't know if you need to enable pullups yet. Let me know what board you have and I'll reply.
I can also make a video showing how you can use the DWC Object Model plugin to see if your switches are configured the right-way by using a browser and pressing the switches.
-
@alankilian the switches came with the Xvico I’m putting a Duet3D Mini 5+ into.
So I agree, all of the endstops I’m using are normally open.
On the video, I would really like to see that.
Thanks for the input on the coding. RRF asked, is your endstop low or high? It didn’t ask, is it NO or NC,? So that’s a new bit of info worth having.
-
@alankilian that’s great that you found that picture of one of my wires.
-
@alankilian I’m wondering what you’re thinking, re: editing the endstops? The problem I think I’m having is the print-head isn’t getting to the endstops. Are you suggesting that the endstops are invisible because they are portrayed incorrectly? Honestly, if that’s true, that’s brilliant!
-
@mac said in I could use some help:
@alankilian I’m wondering what you’re thinking, re: editing the endstops? The problem I think I’m having is the print-head isn’t getting to the endstops. Are you suggesting that the endstops are invisible because they are portrayed incorrectly? Honestly, if that’s true, that’s brilliant!
No, not invisible at all, just the opposite, in a way.
If you are right that your endstop switches are NO then when they are not touched the board is seeing them as active.
So your X homing G1 H1 moves never happen because G1 H1 moves stop as soon the endstop is active.
For NO switch connections you need the ! character which makes NO connection appear inactive when the endstop switch is not touched.
A better solution is to re-wire the endstop switches to use the COM And NC connections.
Didn't I post a picture, at one point, of an endstop switch showing the three connections COM, NO and NC?
Here it is in case my memory is faulty.
Frederick
-
From the M574 description, since you have a normally-open switch, you shold add the "^" character to your M574 lines:
You wrote
^
, but it should be!
.Ian
-
@droftarts this is the first time I’m seeing that picture, so, this is all new info to me. To be clear: my endstops should all be inverted? Yes, or no?
-
@droftarts @alankilian I do remember our discussion about rewiring the endstops to use the vacant post. I’ll have to find that comment.
-
@mac I thought we resolved this in another of your threads? If you're using NO and C on the microswitch, ie NOT the outside two pins, then yes, you need to invert the endstop. In the configurtion tool, on the "I/O Mapping" page, select "io[x].in (active low)" on the drop down list for the endstops wired like this:
On the "Endstops" page, select Endstop type "Switch" and, because all your endstops are high end, "High end".
This should give the output:
; Endstops M574 X2 S1 P"!io5.in" ; configure switch-type (e.g. microswitch) endstop for high end on X via pin !io5.in M574 Y2 S1 P"!io6.in" ; configure switch-type (e.g. microswitch) endstop for high end on Y via pin !io6.in M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Z-Probe M950 S0 C"io3.out" ; create servo pin 0 for BLTouch M558 P9 C"io3.in" 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
Your homing macros should also output from the configuration tool to suit this setup.
Ian
-
@droftarts @alankilian Okay, COM is O on the switch pictured. So using the COM (O) and the NC posts, the white wire should go to the NC (Signal), and the green wire should go to the COM (O) (GND)? I’m trying to visualize the IO_5 (X), IO_6 (Y), and IO_2 (Z) connections on the board.
-
@droftarts you’ve been busy! To be clear, these setting are the software solution versus rewiring the switches.
And, they include reinstalling the Z-probe (BLTouch). Is that what I’m seeing?
-
@droftarts @alankilian Interesting the Driver 2 is “unassigned,” to accommodate the Z-pride in its own assignment area of the software.
-
@mac I updated my post so it looks more like your setup. I'd chosen the wrong pins.
As I've said before, it doesn't matter which way around you wire a switch to the pins on the Duet. If you are using C and NO, wire one to the IO header GND, and one to io[x].in. Same if you are using C and NC. It's just the signal is different, so that needs changing in the configuration.
Think of it this way;
- NC means Normally Closed. In a circuit, the switch in 'ON'. A light bulb in the circuit would be on. If you flick the switch, the light bulb turns off.
- NO means Normally Open. In a circuit, the switch is 'OFF'. A light bulb in the circuit would be off. If you flick the switch, the light bulb turns on.
The Duet doesn't mind which way it's wired, it just need to know the way you want the logic to work.
The answer, really, is to test your endstops before relying on the homing macro to be correct. For each endstop, send M119 in DWC. This will report the state of the endstop. Then press and hold the endstop, and send M119 again. The state of the endstop should change. When it's not pressed, it should say "not stopped". When it is pressed, it should say "at max stop" (or "at min stop" if that's the way it's been configured.
Ian
-
@mac
To be clear, these setting are the software solution versus rewiring the switches.
Yes
And, they include reinstalling the Z-probe (BLTouch). Is that what I’m seeing?
You've got one, it was working, may as well use it!
Interesting the Driver 2 is “unassigned,” to accommodate the Z-
prideprobe in its own assignment area of the software.Yes. But... you can have a Z endstop as well, if you want. Generally, best to use the Z probe for Z homing, but there are cases when it's good to have another option. If your printer stops mid-print (eg power failure), the Duet can save the position in the current file (it detects the power drop and quickly saves this info before power completely disappears). When power is back on, and assuming you want resume the print, how do you home the printer? X and Y is usually fine to home, but homing Z with the probe will probably cause it to hit the print. In this case, if you set up a max Z endstop, the printer can home Z to the top of the frame (as your printer moves the X axis up on Z), and then continue with the print.
Ian
-
@droftarts "In this case, if you set up a max Z endstop, the printer can home Z to the top of the frame (as your printer moves the X axis up on Z), and then continue with the print."
Is a "max Z endstop" a virtual endstop (versus the real z-stop)? Is it a record of the elevation when the printer lost power, that is used to return to the print with?
Mac
-
@droftarts does selecting Z-Probe render the Low end selection moot? Is that why your picture didn't show Z as "High end?"