Conditional Gcode question
nikscha last edited by
I want to extrude filament until my filament sensor triggers. I know there is a way where i use the sensor as an endstop, but i would like to know how to do it using conditional gcode. Something like this maybe?:
while !sensors.filamentsensor.trigger G1 E1
(not sure about the syntax/names)
As far as i can tell, this wont result in a smooth motion though.
OwenD last edited by OwenD
What's your use case?
Can't see why it wouldn't process just as fast as any other G Code, but it wouldn't be synchronous with any other moves.
I don't have a filament monitor, but I presume it will have a triggered state value
Edit: Just checked and it's "filamentPresent"
while sensors.filamentMonitors.filamentPresent G1 E1 M400 ; wait for move to complete
This assumes you only have one filament monitor or want to check the first one. (index 0)
The M400 may be needed to stop a case of many moves being queued before the trigger
OwenD last edited by
You could have the problem that filament monitoring is only active when printing from teh SD card