I have a spool of translucent PLA filament that doesn't work well with the filament sensor on my Prusa i3 MK3. The translucency trips up the sensor, making it think the filament ran out. I thought I'd create a filament profile in Slic3r and disable the sensor in the "Start G-code" block that gets inserted at the beginning of the exported gcode file.
I've got the following code:
M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}30{endif}; Filament gcode
M406 ; Disable filament sensor
M117 Filament sensor OFF
The first line is provided by Prusa's default PLA profile. The second line should disable the sensor, and the third line should print the "Filament sensor OFF" message. If I look in the gcode, it's there:
G92 E0.0
M221 S95
M900 K30; Filament gcode
M406 ; Disable filament sensor
M117 Filament sensor OFF
G21 ; set units to millimeters
G90 ; use absolute coordinates
M83 ; use relative distances for extrusion
;BEFORE_LAYER_CHANGE
But if I print this gcode file, I see no message, and when checking the sensor in the "Tune" menu while printing, the sensor is still on.
I thought I might have a problem with line endings, but looking at the file in a hex editor, all the lines seem to end with a 0A
line feed character, including mine.
Why isn't my printer doing anything with the M406 and M117 messages? Full gcode file here.