Delay Filament Sensor Enable ... N seconds after purge?

I find that the BTT SFS v2 automatically pauses after purge… if i restart the print it works as expected. So, its ‘sensing’ no motion between the purge and the start of Layer 1.

I’m totally new to Klipper and hoping someone can provide gcode I cam put in Printer.cfg to delay the SFS from being enabled until say 10 seconds after Purge, or maybe 10 seconds after Layer 1 starts…

thx!

You can try something along the lines of:

[gcode_macro enable_runout_sensor]
# Helper macro to enable runout sensor
gcode:
    # Activate the sensor
    SET_FILAMENT_SENSOR SENSOR=my_sensor ENABLE=1

[gcode_macro whatever]
gcode:
    # disable the sensor
    SET_FILAMENT_SENSOR SENSOR=my_sensor ENABLE=0
    # rest of the magic
    ...
    # call enable_runout_sensor with a delay of 1 sec
    UPDATE_DELAYED_GCODE ID=enable_runout_sensor DURATION=1

This should give you an idea how to do it.

If put that macro as the last thing in START_PRINT (after nozzle purge) – will it delay the enable 10 seconds after the nozzle purge or 10 seconds after the START_PRINT code begins?

# call enable_runout_sensor with a delay of 1 sec
UPDATE_DELAYED_GCODE ID=enable_runout_sensor DURATION=10

Will this delay the sensor from being enabled

Use

    SET_FILAMENT_SENSOR SENSOR=my_sensor ENABLE=0

somewhre in the beginning of your macro and

    UPDATE_DELAYED_GCODE ID=enable_runout_sensor DURATION=1

as last statement

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.