[gcode_macro _FS_ENABLE]
gcode:
SET_FILAMENT_SENSOR SENSOR=filament_switch ENABLE=1
; SET_FILAMENT_SENSOR SENSOR=filament_motion ENABLE=1 ; Uncomment this line if you are using the SFS V2
[gcode_macro _FS_DISABLE]
gcode:
SET_FILAMENT_SENSOR SENSOR=filament_switch ENABLE=0
; SET_FILAMENT_SENSOR SENSOR=filament_motion ENABLE=0 ; Uncomment this line if you are using the SFS V2
# THESE ARE JUST EXAMPLES
# You should modify your own macros to include the calls to _FS_ENABLE and _FS_DISABLE
[gcode_macro PRINT_START]
gcode:
G28 ; home all axes
G90 ; absolute positioning
G1 Z20 F3000 ; move nozzle away from bed
_FS_ENABLE ; enable the filament runout sensor(s)
[gcode_macro PRINT_END]
gcode:
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
_FS_DISABLE ; disable the filament runout sensor(s)
; ... etc ...
[gcode_macro CANCEL_PRINT]
rename_existing: CANCEL_PRINT_BASE
gcode:
_FS_DISABLE
CANCEL_PRINT_BASE
[gcode_macro PAUSE]
rename_existing: PAUSE_BASE
gcode:
_FS_DISABLE
PAUSE_BASE
[gcode_macro RESUME]
rename_existing: RESUME_BASE
gcode:
_FS_ENABLE
RESUME_BASE