Conditional extrusion based on trigger signal
-
Conditional extrusion based on trigger signal
Hi there, I am reposting this one because I realised I may have been too vague on the first post. I am trying to configure reprap to allow me to use a conditional extrusion command based on an input signal.
First let me explain the setup/use case of the system. I am using a 6 axes robot arm as a motion system and I am using a Duet 2 microcontroller to control the printing components. The motion control is handled completely within the robot proprietary programming language but I would like to configure the Duet board to extrude material based on a trigger signal sent from the robot controller to the Duet board.
To achieve this, I am using the endstop switch headers on the Duet board. Where a high signal will be the trigger to begin extruding material, and a low will be a trigger to stop extrusion. I do not need to vary the speed of extrusion or do retractions at this point, just turn on and off the extruder motor based on the trigger signal.
The closest I can see to this is by using an M577 wait command to wait until trigger signal is high, before continuing.
so M577 Y S1
followed up by an extrusion command. However, this will not allow me to extrude indefinitely or to stop when the signal changes from high to low. This is therefore not really a solution.
I also read in a forum that it is possible to extrude until trigger if the extruder motor is setup as an additional axis.
Here it is:
https://forum.duet3d.com/topic/8242/how-to-extrude-until-trigger/12However, I’ve had no luck with getting this to work. It also wouldn’t do what I need.
Is it possible instead to use some sort of conditional logic to do this?so if trigger is high, extrude at set fixed speed
if trigger is low, maintain hot end temperature but do not extrude filament