A macro to Enable/Disable Filament sensor during print ?
-
Hello,
I recently added a Biqu filament sensor that I have in stock since they sent it to me to beta test
It's a pulsing sensor, so can detect filament runout and clog or tangle
It work with M591 D0 P7 C"121.io1.in" L7 R80:120 E15 S1It works perfectly, but sometimes it give fake error with soft TPU, because the TPU extend
I know I can change the R value to bigger spacing value.
But I really want to find a way to make one Enable and one Disable Macro for enable or disable sensor while printing
And if possible with some visual tip in the menu like a green dot or something to show if it's enabled or disabled .Someone more familiar with macros can help me with this please ?
PS : also, is it possible to make a different Pause routine for filament runout than a normal Pause ?
Because it can be useful tu Up the Z height automaticly when in runoutThanks a lot
-
@Zoltan3D you should beable to put this in a macro to turn it off
M591 D0 S0 ;D = extruder number S0 =off
-
@Zoltan3D said in A macro to Enable/Disable Filament sensor during print ?:
Hello,
PS : also, is it possible to make a different Pause routine for filament runout than a normal Pause ?
Because it can be useful tu Up the Z height automaticly when in runoutIn your pause.g you can use the object model to check the status of the filament sensor and do a Z move if required
It would be something like this untested codeif sensors.filamentMonitors[0].status !="ok" G91 ; change to relative moves G1 Z20 ; raise head 20mm G90 ; change to absolute
-
There are a lot of things you can easily do with macros you write and with "standard" macros.
For example, In the Filaments folder you will find a sub-folder for each filament type. And in that folder, there is a file called config.g. This file (aka macro) is run when the filament is changed using DWC. You could put code in this file for your TPU filament to disable your filament sensor. You could have code in your other filament directories to turn on the filament sensor. This page is good to read: https://docs.duet3d.com/en/User_manual/Reference/DWC_filaments
You could also add a LED to a Duet board output and have it turn on or off with the filament sensor. Or you could have a message displayed when the filament sensor is turned off or on to alert the user. That's an M291 command.
Writing macros is not too difficult, and is even fun for some of us. Read up on the capabilities of macros here: https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands
-
@moth4017 thanks guys for your help,
So in fact, macros are just normal config commands, but are temporary