Regular Stepper Motor Task in Daeomon.g
-
Hi everyone. If i wanted to turn a stepper motor (separate from the X,Y,Z,E axis of the printer) a specific amount after X amount of material has been extruder, how do I go about this in the daemon.g file?
This task is to be done while the duet is running a print job. Thanks.
-
@ravs99 or even at a regular interval regardless of filament extruded if that is easier
-
@ravs99 you can use a loop in daemon.g to perform an action every time extrusion exceeds a certain value. Object model variable move.extruders[N].position will give you the amount of filament that has been extruded, where N is the extruder number. This value gets reset to zero when a print starts. So you can capture it in a local variable, then when it has increased by the required amount, perform the action and reset the variable to the new amount. Make sure you allow for that variable decreasing to zero when you start a new print, and decreasing a little when you retract filament.
Currently, if you try to move a motor in that loop, the normal printer motion will stop while that motion is performed. In RRF 3.5 it will be possible to have two motion streams that execute asynchronously.
-
@dc42 ah i thought as much. If I were to use a servo and the DUET's IO ports, how would I go about it? What are some recommended servos for the DUET3?
Thanks
-
@ravs99
Hopefully this helps you get started!https://docs.duet3d.com/en/User_manual/Connecting_hardware/Motors_servos
Make sure to note the "Caution" statement on that page.
-
@hebigt thank you!