Tilting dual extruder - position check with endstops?
-
Can't help with your state check but why not just have the magnets pull the mechanism one way of the other? Saves a drive to the end each time and it would be a hard stop which may be more accurate.
-
@eumldeuml Hmm. Well kind of. If I understand what you want correctly that is.
Check out M581 https://duet3d.dozuki.com/Wiki/GCode#Section_M581_Configure_external_trigger
You could use that to monitor an end stop and take some action if it sees either a rising or falling edge on the signal. The "T" parameter is the logical trigger number and from the wiki ..........quote
"Trigger number 0 causes an emergency stop as if M112 had been received. Trigger number 1 causes the print to be paused as if M25 had been received. Any trigger number # greater then 1 causes the macro file sys/trigger#.g to be executed. "
So, you could have a macro called "trigger2" for example which in itself cpuld call the tool change macro (or run any other commands that take your fancy).
Does that help?
-
I'm not sure if I understand your answer correctly (or if I didn't describe the mechanism clear enough) but I do have a hard stop for the tilting mechanism.
In the picture you can see it. In the middle there's the bearing and below that there is a pin that moves onto an adjustable magnet holder (the screws and the magnet on the left are not visible).
-
@eumldeuml I guess that post was in answer to @DocTrucker and not me?
-
@deckingman I think that's it! I'll play around with it as soon as I managed to cram the two endstops in there. Thank you very much!
One last question to be sure: The triggers are constantly monitored, right? So no waiting until the buffer is empty or something?
-
@deckingman Sorry for the confusion: The post with the picture was an answer to DocTrucker and the one after that was for you.
-
@eumldeuml I was just thinking about using the magnets to pull the mechanism either way rather than ramp to save needing to go off to a specific location. Could save quite a bit of travel moves.
-
@eumldeuml said in Tilting dual extruder - position check with endstops?:
................One last question to be sure: The triggers are constantly monitored, right? So no waiting until the buffer is empty or something?
Sort of. It depends on what you set for the "C" parameter. C0 will enable the trigger at any time, C1 will only invoke when printing from the SD card. I can't be sure but I think it's an instant interrupt so does not have to wait for whatever moves are i the queue to complete. DC42 will confirm that or otherwise.
-
@doctrucker But that would mean that I need a servo to move the magnet and thus tilt the extruder. Either that or using the servo directly to tilt the extruder was my original plan but it's not that easy to fit a small servo on the printhead and get it to reliably and repeatably set the tilt. Also I'll save some time since I don't need an ooze shield or in the case of a single nozzle, an excessive purge tower.
Sooner or later I'll move to a toolchanger but that's another can of worms entirely...@deckingman I think, either C1 or C0 will get me the results I want because when it's not printing it's usually not important if the tool is in the right spot as I can include a toolchange routine at the beginning of each print which will set the tilt to the desired position.
-
@eumldeuml Fair enough, I'd assumed there were two magnets.
@eumldeuml said in Tilting dual extruder - position check with endstops?:
The extruder is then locked by magnets in either position.
-
@eumldeuml said in Tilting dual extruder - position check with endstops?:
@deckingman I think, either C1 or C0 will get me the results I want because when it's not printing it's usually not important if the tool is in the right spot as I can include a toolchange routine at the beginning of each print which will set the tilt to the desired position.
Yes, I think so too. I use M581 for additional axis maxima end stops in case I do something stupid, and although it's been a while since they have been triggered, IIRC it's pretty instant.
-
So, I've built my tilting extruder and now I want to configure the triggers. Does anyone know if and how I can set a trigger with M581 with a dependency on the loaded tool? That means I only want a trigger input to be monitored when the corresponding tool is active. To be more specific, I need a way to use an "if" command without actually using it (since gcode doesn't support conditionals).
My idea is to initiate the trigger monitoring for the specific endstop upon selecting the tool. But I don't know how to stop monitoring that endstop when deselecting the tool... -
@eumldeum Conditional gcode statements are not possible at this point in time. Coming soon I believe.
Edit. If you use the tool change macros (tfree, tpost etc). you could maybe add the M581 to one of those. Come to that, you can always call any macro from within a macro so that might be a work around? So the M581 only gets called if a certain macro is running if you get my meaning.
-
@deckingman I'm not sure about that since gcode has been around for a very long time without such changes... I think we will see another implementation of machine control code (maybe based on gcode). But that's another topic...
Regarding my question: I found the answer in the documentation (I just didn't read thoroughly enough)... -
@eumldeuml Oh I meant that conditional gcode will be implemented in RRF soon. That's from DC42 and is on his work list.
-
@deckingman Really? That would add a lot of possibilities to Duet controled machines! Although only for the advanced user, I don't think that the average person needs conditional gcode for printing vases and figures...
Regarding your edit in your post above: Calling a macro from within another macro would certainly work butfor now I'm testing it with a M581 S1 in tpost#.g and a M581 S-1 in tfree#.g. This command also calls a macro (trigger#.g) so in a way you were right
-
@eumldeuml Yes, conditional gcode and also the use of variables have been asked for on many occasions on these forums and it's definitely on David's "todo" list. For sure not needed for straight printing as such, but these things would be very useful inside macros and for configuration purposes.
-
@eumldeuml said in Tilting dual extruder - position check with endstops?:
...................... This command also calls a macro (trigger#.g) so in a way you were rightThat sounds just like my wife - she will never admit that I might be right about something but might go as far as saying "in a way"....
-
@deckingman The phrase "in a way" might be subject to my deficiency in expressing the desired statement distinctly enough in the prior sentence. So I'll gladly and openly admit that you were absolutely right
This post was made possible by google translator and other sources of fancy english words lol
-
@eumldeuml said in Tilting dual extruder - position check with endstops?:
@deckingman The phrase "in a way" might be subject to my deficiency in expressing the desired statement distinctly enough in the prior sentence. So I'll gladly and openly admit that you were absolutely right
This post was made possible by google translator and other sources of fancy english words lol
Good Lord. I had absolutely no idea that English was not your first language. In fact, I know very few native English speakers who could have put those sentences together. You and your sources of "fancy English" are doing a remarkably fine job. Terms such as "can of worms" and the slang expression "cram the two endstops in there" had me convinced that I was conversing with a native English speaker.
May I ask what your first language really is? Let me guess. You use expressions such as "endstop", "toolchanger" and "printhead". These would normally be separate words (end stop, tool changer etc) but I believe that the German language tends to combine multiple words, if not whole sentences into a single word. Would I be right?
By the way, it's English with a capital "E".