Klipper3d / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
9.08k stars 5.21k forks source link

Runout sensor - printer start printing without filament #2931

Closed Stetinac closed 4 years ago

Stetinac commented 4 years ago

Hi,

printer start printing without detecting filament by runout sensor. It's possible to test status of runout sensor before printer start printing and sensor is enabled at cfg?

My printer setup is: Rpi4 and Octoprint

Command: "QUERY_FILAMENT_SENSOR SENSOR=runout_sensor" returns: "Filament Sensor runout_sensor: filament not detected"

Best regards,

Pavel

klippy.log

Arksine commented 4 years ago

Right, the purpose of the sensor is to detect a filament runout during a print, it would not disallow you from starting a print if no filament is in the printer. You could use a gcode macro to accomplish something like that:

[gcode_macro PRINT_START_CHECK]
gcode:
  {% if not printer["filament_switch sensor runout_sensor"].filament_detected %}
  # Emergency shutdown to abort print
  M112
  {% endif %}
Stetinac commented 4 years ago

Thanks for help.