8

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.

0scar
  • 32,029
  • 10
  • 59
  • 135
Bas
  • 183
  • 3

2 Answers2

1

As per github PR this is not implemented - see this PR for details Please check if your printer is processing M406 by issuing it manually.

In meantime, a sticker on the sensor will help you to print :)

profesor79
  • 1,922
  • 1
  • 6
  • 24
  • Professor79 Could you give a little more detail on how to use a sticker to stop the filament sensor issue? Maybe a photograph or specific placement advice? Left to my own devices I will continue to avoid the issue by printing my shiny filaments in total darkness. There has to be a better way. Thanks, from the peanut gallery – Winky42 May 08 '19 at 14:59
  • @Winky42 that depends if you have a mechanical or optical sensor. if is optical then just cover the lenses, if is mechanical put down the lever. – profesor79 May 09 '19 at 11:32
1

When you download the latest version of your firmware you find the implementation of all the codes in Marlin_main.cpp. Here you see that the M406 is not implemented! Hence it does not work.

0scar
  • 32,029
  • 10
  • 59
  • 135