Using two endstops on same axis
-
But if you're not going to use G1 H1 you don't need the endstop configured with M574, M581 for the trigger will work with all the endstop pins, assigned to an axis or not. As such you don't need two endstops, just two triggers, which should work. (provided the code you put in the triggers gets the job done)
-
This is what it looks like ATM:
M574 V2 S1 ; set V axis max endstop to switched low G91 ; relative moves G1 V20 H1 F3000 ; feed filament to filament sensor G92 V0 ; force V to 0mm G1 V500 H1 F3000 ; feed a bit more to reliably switch sensor And reach tube G92 V0 ; force V to 0mm M400 ; wait for moves to finish M581 V S0 T2 C0 ; activate trigger 2 on falling edge M582 T2 ; check filament sensor to confirm loading successful M581 T2 S-1 ; deactivate trigger 2
This is moving the filament on V axis to the first endstop, checks that endstop , if the filament is not present it runs a trigger2.g macro.
If the filament it’s there I’ll have to disable the first endstop, configure second endstop to max V ,move the filament until it hits it, check in if is there as above, if it’s not present will run same/another trigger.g macro. I need the second endstop to check if the filament actually reached it , it may get blocked somewhere along its path between between the sensors.I hope this clarifies what I’m trying to achieve.
Anyway, it seems that currently there’s no way I can pair different endstops to axis and I’m not competent enough to compile the 3 beta, also I don’t think I’d be able to use i without proper documentation.
-
There are regular builds of the version 3 betas, which i keep updating to my "never works properly anyways" printer, the work horse is, and will be, running the latest 2.x release for 6-12 months I'm guessing, but I'm conservative when it comes to updates on stuff I rely on.
But yes, the task at hand is clearer now. Just a fyi, if you put ``` on the line over and under your g-code the forum formats it as code. single backticks will do the same inline in a paragraph.
so the trigger2.g would have M574 V2 S2 and more G1 H1 moves, followed by another M582 back in the homing file?
-
@bearer No, trigger2 just shows a message about filament not being detected and pauses the print.
I am trying to run a MMU2 with duets hardware using this guide Tprepmaster is the macro that I’m trying to edit. In there , after the endstop is checked , it uses sensorless homing to drive the filament into the extruder’s gears. But there is no way to detect if the filament really got there or it just got snagged on it’s way and stalled.
Other reason for not using sensorless is the fact that the filament will have some tension in it from the motor driving into the extruder gears until it stalls and it could prove tricky to measure the amount is needed to be extruded for the filament to get into the melt zone .
-
Okay, so you use
M574/G1 H1
to do the move and stop if/when the endstop is hit, then you useM581/M582
to pause if not.Then my proposed NC with NO in parallell solution should work i think with the adittion of
M581/M582
after eachG1 H1
move. To further avoid unnecessary grinding of filament you'd need a filament monitor that tracks filament motion i recon. -
I’ll try wire them in parallel but not sure it will work. What I think it will happen is that as soon I configure the with M574 V2 S1/S0 one will trigger while the other not.
-
Both switches are in parallell between signal and ground with onboard pull up to 3v3.
No filament present.
First switch is NC and not pressed, it pulls signal to gnd.
Second switch is NO and not pressed, it has no effect.You issue G1 H1 Vn and when filament arrive at first switch:
First switch is NC and pressed, it has no effect, and duet pull up makes signal 3.3v, the G1 H1 move is terminated by the active high endstop.
Second switch is NO and not pressed, it has no effect.(You check that filament actually arrived by means of M581/M582)
So far so good. You now reconfigure the V endstop to be active low instead of active high. Signal is currently high, and you issue G1 H1 Vn and when filament arrive at second switch:
First switch is NC and still pressed, it continiues to have no effect.
Second switch is NO and also pressed, it now pulls the signal to gnd and the G1 H1 move is terminated by the active low endstop.(You check that filament actually arrived by means of M581/M582)
I could be wrong, but if you wire it up I think its worth a try.
-
So, if I've got this correct, you want to send a sequence of commands to home the filament (E axis) twice, once to one point, and then again to a second point.
Set the firmware to expect a normally closed switch, which the first one will be. The second will be normally open, both will be in parallel. The circuit will see a closed switch.
Home the axis. The first switch opens when the filament enters it. Both switches are open, the axis stops.
Set the firmware to expect a normally open switch. Both switches are open, nothing is triggered.
Home the axis. When the filament hits the second switch, it closes. The axis stops.
Edit: LOL. Took me too long to type. This is the same solution as above.
-
Yes! That worked. Can’t believe you gave me the solution in your first post and I was just overthinking it.
-
More drugs less thinking
(No kids, dont do drugs!)But if you describe what you want to achieve instead of how you (think you) want to achieve it, you'll get to the finish line faster.