<p>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. </p>

<p>I've got the following code:</p>

<pre><code>M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}30{endif}; Filament gcode
M406 ; Disable filament sensor
M117 Filament sensor OFF
</code></pre>

<p>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:</p>

<pre><code>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
</code></pre>

<p>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.</p>

<p>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 <code>0A</code> line feed character, including mine. </p>

<p>Why isn't my printer doing anything with the M406 and M117 messages? Full gcode file <a href="https://pastebin.com/YDTN2Qes" rel="nofollow noreferrer">here</a>.</p>

[{'answer_id': 6392, 'author': 'Toon', 'author_id': 9303, 'author_profile': 'https://3dprinting.stackexchange.com/users/9303', 'pm_score': 0, 'selected': False, 'text': '<p>Have you correctly calibrated your steps per mm a.k.a. esteps? Tom made a great video about it:</p>\n\n<p><a href="https://www.youtube.com/watch?v=Mbn1ckR86Z8" rel="nofollow noreferrer">3D printing guides: Calibration and why you might be doing it wrong</a></p>\n'}, {'answer_id': 6573, 'author': 'Greenonline', 'author_id': 4762, 'author_profile': 'https://3dprinting.stackexchange.com/users/4762', 'pm_score': 1, 'selected': False, 'text': '<p>Following on from Toon\'s answer, here is a run down of <a href="https://www.youtube.com/channel/UCb8Rde3uRL1ohROUVg46h1A" rel="nofollow noreferrer">Thomas Sanladerer</a>\'s excellent\n video: <a href="https://www.youtube.com/watch?v=Mbn1ckR86Z8" rel="nofollow noreferrer">3D printing guides: Calibration and why you might be doing it wrong</a>.</p>\n\n<p><em>However, this may not be a definitive answer to the actual question about warts and bumps...</em></p>\n\n<hr>\n\n<p><strong><a href="https://www.youtube.com/watch?v=Mbn1ckR86Z8&amp;t=8" rel="nofollow noreferrer">0:08 - A step back</a></strong></p>\n\n<p>Back in time - when the RepRap project (and the hobby grade 3D printing market) was new territory - it was seen to be a <em>doable</em> technology, with no restrictions imposed by patents. The new printers created and developed included Darwin, Sells Mendel and Prusa Mendel. These often produced unusable parts.</p>\n\n<p>However, impromptu solutions, or kludges led to poor quality fixes giving poor quality prints, by today\'s standards. However, people (today) believe that because they worked back then,. that they must still be valid solutions today. However this is not necessarily the case. </p>\n\n<p>The common misconception is that it is necessary to calibrate the esteps per mm for all axes other than extruder - adjusting the x, y and z esteps per mm until the 10&nbsp;mm cube measures exactly 10x10x10&nbsp;mm, even if that means squeezing the callipers.</p>\n\n<hr>\n\n<blockquote>\n  <p><strong><a href="https://www.youtube.com/watch?v=Mbn1ckR86Z8&amp;t=85" rel="nofollow noreferrer">1:25 - Car analogy</a></strong></p>\n  \n  <p>You find that your car pulls to the left, when going in a straight\n  line, so you adjust the steering. However, then in hard corners and\n  the rain the car handles poorly. </p>\n  \n  <p>Upon closer inspection, it then turns out that the car had a flat\n  tyre. You wouldn\'t compensate for having a flat tyre by adjusting the\n  steering, now would you?</p>\n</blockquote>\n\n<hr>\n\n<p>In order to get that 10 mm cube precise, it is usual to calibrate for the filament diameter, and extrusion multiplier (most straightforward option), but some printers aren\'t even that precise in the first place.</p>\n\n<p>Mechanical, ripple, slaw, blacklash, can throw you off by 0.1 mm.  Compensation for this 0.1 mm is certainly possible and achievable. However, then for a larger print, say 100&nbsp;mm, then these <em>overcompensation</em> will become more evident, and you will be one entire milimeter off the desired dimensions.</p>\n\n<p>So, use the ideal calculated esteps per mm. Timing belts and threaded rods are made to tight tolerances. therefore the worst case of ideal step per mm setting is an inaccuracy of 0.5%.</p>\n\n<p>So, to find the ideal calculated steps use <a href="http://prusaprinters.org/calculator/" rel="nofollow noreferrer">Prusa\'s calculator</a> which is very good indeed. </p>\n\n<p>If you are not using belts, or very large printer, then it is worth recalibrating the steps per mm for x and y, as 0.5%  will make a noticeable difference in larger parts.</p>\n\n<p>Use the files and instructions for these <strong>Calibration sticks</strong> on <a href="https://www.youmagine.com/designs/calibration-sticks" rel="nofollow noreferrer">Youmagine</a>, for proper recalibrating without results slewed by the extrusion multiplier being off by a bit.</p>\n\n<p><strong><a href="https://www.youtube.com/watch?v=Mbn1ckR86Z8&amp;t=225" rel="nofollow noreferrer">3:45 - So what do I need to do?</a></strong></p>\n\n<p>What do you need to empirically calibrate your printer?  In actual fact, not all that much:</p>\n\n<ul>\n<li>extruder steps per mm setting</li>\n<li><p>extrusion multiplier (see video link - <a href="https://www.youtube.com/watch?v=YUPfBJz3I6Y" rel="nofollow noreferrer">Extruder calibration</a>)</p></li>\n<li><p>print speed, jerk and acceleration settings - These depend upon how much quality you want to sacrifice for increased speed.</p>\n\n<p>Pro-tip: <em>slow your printing down</em>. For example, try printing at half speed. Quality <em>may</em> be improved, and even if it isn\'t you will be able to observe more clearly what is happening, and going wrong.\n(see video link - <a href="https://www.youtube.com/watch?v=7HsIZuj9vOs" rel="nofollow noreferrer">Super Fast Guide:Tuning Speeds</a>)</p></li>\n</ul>\n\n<p><strong><a href="https://www.youtube.com/watch?v=Mbn1ckR86Z8&amp;t=270" rel="nofollow noreferrer">4:30 - Other than that?</a></strong></p>\n\n<p>There is not much else needs calibrating, per se.</p>\n\n<p>With regards to slicer software, there are only a certain range of settings make sense, but this isn\'t printer calibration. You simply learn the slicer software and, with familiarity, see how far you can go.</p>\n\n<p>These days any well maintained and well built and solid printer will produce good prints.</p>\n\n<p>Most slicers give you decent prints without tweaking or calibrating, other than the basic settings about your printer and deciding how the part should be printed.</p>\n\n<p>What about print temp and retract settings? Well, just use the default settings, or settings which depend upon the type of filament.  So, no calibration is required there, as it is a property of the filament.</p>\n\n<p><strong><a href="https://www.youtube.com/watch?v=Mbn1ckR86Z8&amp;t=324" rel="nofollow noreferrer">5:24 - Summing up</a></strong></p>\n\n<p>Don\'t try to calibrate everything</p>\n\n<p>The technology, in particular the software, i.e. slicers, is still developing and improving. Slic3r\'s prototpye beta (in Nov 2014) has added compensation for fitting errors(?) without messing other things up, which is essentially what the cube calibration tries to do, but in the correct way.</p>\n'}]
['https://3dprinting.stackexchange.com/questions/5971', 'https://3dprinting.stackexchange.com', 'https://3dprinting.stackexchange.com/users/8335/']