Wait for io pin
-
Hi,
I want to rebuild my printer as a dual parking extruder and for changing the Tools i want to use some electro magnets ans some kind of switches. In the tool change skript i want to wait until the correct Switch is triggered for example. On a pin on the extension header. I hope someone can help me wich g code i have to use to wait for an io pin is triggered. (I want to drive the axis to the tool set an io pin which switches the magnet ans wait for the pin until the tool is conected exactly.)
Thank you for your help!
danny_v1
-
@danny_v1 One way of doing it would be to connect your switches to spare end stops then use M581 to run a macro when the input level changes. Take a look here https://duet3d.dozuki.com/Wiki/GCode#Section_M581_Configure_external_trigger
-
Ok thank you. This is one possibility. Can i use for this also the E_Stops on the expansion header?
How would the g code lock like if I want to use E_Stop_5?
The sequence for change the extruders has to be like this: go to parking position of the active extruder activate the magnet of the parking position-> switch of the magnet of the x-axis -> go to the other extruder -> switch on the magnet of the x-axis -> switch off magnet of the parking position.
The switching of the magnets should be done by an arduino nano. The change is done signal should be send to the io pin of the duet.
-
Can you temporarily map an additional axis to the motor, then connect your switch as the endstop switch for that axis?
-
sorry I was some time not here.
@dc42 how should it work exactly (what I have to do)???Thank you for your help!
-
@danny_v1 have you looked at the functionality provided:
https://duet3d.dozuki.com/Wiki/GCode#Section_M581_Configure_external_triggerAny trigger number # greater then 1 causes the macro file sys/trigger#.g to be executed.
so you can setup a macro to do what you want and then use a trigger to call that macro.