<h2>G-code <code>M0</code> is not supported!<sup>1)</sup></h2>
<p>According to the <a href="http://www.renkforce-rf100.ch/firmware/firmware-rf100/index.html" rel="nofollow noreferrer">original firmware of the RF100</a>, the firmware is based on Marlin Firmware. From the original sources you can find that in order for <code>M0</code> (or <code>M1</code> which is a deprecated alias for <code>M0</code>) to work, you need an <code>ULTRA_LCD</code> supported  LCD panel:</p>
<pre>
 * "M" Codes
 *
 * M0   - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)
</pre>
<p>However, your printer does not support such an LCD panel, from the configuration.h can be read that the constant is disabled (<code>//</code> means that the line is treated as a comment and as such ignored by the compiler):</p>
<pre><code>//#define ULTRA_LCD  //general LCD support, also 16x2
</code></pre>
<p><strong>Therefore, these scripts will not work for your printer!</strong>
<br><em>(Not your printer is running a very old version of Marlin; version 1.0.3)</em></p>
<hr />
<h2>Solution:</h2>
<p>It is possible to manually change the G-code for a (in this case) Marlin based firmware<sup>2)</sup> (so no adding of a pause by Cura) by inserting a few lines to:</p>
<ol>
<li>First set relative movement (<code>G91</code>), then retract a certain amount of filament (<code>G1 E-2 F500</code>) or alternatively use <a href="https://reprap.org/wiki/G-code#G10:_Retract" rel="nofollow noreferrer"><code>G10</code></a> using predefined retraction definitions in <a href="https://reprap.org/wiki/G-code#M207:_Set_retract_length" rel="nofollow noreferrer"><code>M207</code></a>;</li>
<li>Insert a dwell period by inserting the G-code <a href="https://reprap.org/wiki/G-code#G4:_Dwell" rel="nofollow noreferrer"><code>G4</code></a> (plus a time to wait), e.g. <code>G4 P2000</code> to dwell for 2000 milliseconds (alternatively, <code>G4 S2</code> will also pause for 2 seconds), please adjust the value to an adequate one in which you can insert the object;</li>
<li>First, unretract filament (<code>G1 E2 F500</code>) and then put the printer back in absolute movement (<a href="https://reprap.org/wiki/G-code#G90:_Set_to_Absolute_Positioning" rel="nofollow noreferrer"><code>G90</code></a> or alternatively use <a href="https://reprap.org/wiki/G-code#G11:_Unretract" rel="nofollow noreferrer"><code>G11</code></a> using predefined retraction definitions in <a href="https://reprap.org/wiki/G-code#M207:_Set_retract_length" rel="nofollow noreferrer"><code>M207</code></a>.</li>
</ol>
<hr />
<p><sup>1)</sup> <sub><em>By your firmware version/implementation</em></sub></p>
<p><sup>2)</sup> <sub><em>Note that certain G-codes only work for certain firmwares! Fortunately, the <a href="http://www.renkforce-rf100.ch/firmware/firmware-rf100/index.html" rel="nofollow noreferrer">original firmware of the RF100</a> is based on Marlin Firmware (unless it has been changed form the factory default.)</em></sub></p>

CC BY-SA 4.0
2019-10-25T20:27:42.047Z
2019-11-25T15:53:37.210Z
2020-06-18T08:29:41.667Z
0scar
<p>Cura (version 4.3.0) has the ability to insert a post processing script to your print. I tried this for printing a key cover around my door key (similar to <a href="https://3dprinting.stackexchange.com/questions/10587/how-to-pause-a-print-to-insert-something-in-a-cavity-using-ultimaker-cura">this question</a>). I designed the STL file with Fusion 360 (version 2.0.6516) and verified that the height of the beginning of the top layers is exactly at 3.1&nbsp;mm. The top layer itself has a height of 0.5&nbsp;mm. In Cura I inserted a pause at height 3.1&nbsp;mm. </p>

<p>I tried different post processing scripts:</p>

<ul>
<li>Pause at height</li>
<li>Pause at height (BG printers)</li>
<li>Pause at height for Repetier</li>
</ul>

<p><a href="https://i.sstatic.net/MnbZO.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/MnbZO.png" alt="enter image description here"></a></p>

<p>After inserting the script I did the "slice" and saved the G-code to an SD card. When printing on my RF100 (firmware version 2.2) no script created a pause at all. All scripts printed the full key cover in one step.</p>

<p>The part of the G-Code that does the pause looks like this:</p>

<pre><code>[...]
G1 X57.522 Y62.32 E134.15939
G1 X57.475 Y62.045 E134.1614
G0 F3000 X57.47 Y62.02
G0 X57.469 Y61.845
G1 F2400 E132.1614
G1 F600 Z4
;MESH:NONMESH
G0 F3000 X54.16 Y67.189 Z4
;TIME_ELAPSED:247.492714
;TYPE:CUSTOM
;added code by post processing
;script: PauseAtHeight.py
;current z: 4.15
;current height: 3.1500000000000004
M83 ; switch to relative E values for any needed retraction
G1 F300 Z5.15 ; move up a millimeter to get out of the way
G1 F9000 X190 Y190
G1 F300 Z15 ; too close to bed--move to at least 15mm
M104 S0 ; standby temperature
M0 ; Do the actual pause
M109 S210 ; resume temperature
G1 F300 Z5.15
G1 F9000 X63.338 Y61.621
G1 F300 Z4.15 ; move back down to resume height
G1 F9000
M82 ; switch back to absolute E values
G92 E132.1614
;LAYER:19
;MESH:0d0e86f0-0b59-4e06-9e77-78fe8e77be5b.stl
G0 X54.16 Y67.189 Z4.15
;TYPE:WALL-OUTER
G1 F600 Z3.15
G1 F2400 E134.1614
G1 F2040 X54.171 Y67.193 E134.16172
G1 X54.689 Y67.418 E134.17722
G1 X55.228 Y67.625 E134.19306
G1 X55.776 Y67.811 E134.20894
[...]
</code></pre>

<p>Cura out of the box has no machine setting for the RF100 v2, so I used the settings for the RF100 v1 and adjusted the dimensions of the width, depth and height to 120 mm. As G-code flavor I stayed with "Marlin".</p>

<p>What can I do? This question is not specific to a key cover. I could design this so I could insert the key at the end. But I really would like to know how to do a predefined pause during my print.</p>

CC BY-SA 4.0
2019-11-25T10:20:50.633Z
Your firmware does not support the `M0` G-code, please read my updated answer! The solution would be to insert a pause yourself.
0scar
CC BY-SA 4.0
2019-12-17T09:23:20.983Z
Just out of curiosity, have you been able to pause using the answer below? Please vote and accept or add your own solution.
0scar
<marlin><ultimaker-cura><g-code>
Cura 4.3.0 does not pause on Renkforce RF100 V2.2
tangens
# Cura 4.3.0 does not pause on Renkforce RF100 V2.2

(Asked by: username_0 on 2019-10-24)

Cura (version 4.3.0) has the ability to insert a post processing script to your print. I tried this for printing a key cover around my door key (similar to [this question](https://3dprinting.stackexchange.com/questions/10587/how-to-pause-a-print-to-insert-something-in-a-cavity-using-ultimaker-cura)). I designed the STL file with Fusion 360 (version 2.0.6516) and verified that the height of the beginning of the top layers is exactly at 3.1 mm. The top layer itself has a height of 0.5 mm. In Cura I inserted a pause at height 3.1 mm.

I tried different post processing scripts:

* Pause at height
* Pause at height (BG printers)
* Pause at height for Repetier

[![enter image description here](https://i.sstatic.net/MnbZO.png)](https://i.sstatic.net/MnbZO.png)

After inserting the script I did the "slice" and saved the G-code to an SD card. When printing on my RF100 (firmware version 2.2) no script created a pause at all. All scripts printed the full key cover in one step.

The part of the G-Code that does the pause looks like this:

```
[...]
G1 X57.522 Y62.32 E134.15939
G1 X57.475 Y62.045 E134.1614
G0 F3000 X57.47 Y62.02
G0 X57.469 Y61.845
G1 F2400 E132.1614
G1 F600 Z4
;MESH:NONMESH
G0 F3000 X54.16 Y67.189 Z4
;TIME_ELAPSED:247.492714
;TYPE:CUSTOM
;added code by post processing
;script: PauseAtHeight.py
;current z: 4.15
;current height: 3.1500000000000004
M83 ; switch to relative E values for any needed retraction
G1 F300 Z5.15 ; move up a millimeter to get out of the way
G1 F9000 X190 Y190
G1 F300 Z15 ; too close to bed--move to at least 15mm
M104 S0 ; standby temperature
M0 ; Do the actual pause
M109 S210 ; resume temperature
G1 F300 Z5.15
G1 F9000 X63.338 Y61.621
G1 F300 Z4.15 ; move back down to resume height
G1 F9000
M82 ; switch back to absolute E values
G92 E132.1614
;LAYER:19
;MESH:0d0e86f0-0b59-4e06-9e77-78fe8e77be5b.stl
G0 X54.16 Y67.189 Z4.15
;TYPE:WALL-OUTER
G1 F600 Z3.15
G1 F2400 E134.1614
G1 F2040 X54.171 Y67.193 E134.16172
G1 X54.689 Y67.418 E134.17722
G1 X55.228 Y67.625 E134.19306
G1 X55.776 Y67.811 E134.20894
[...]

```

Cura out of the box has no machine setting for the RF100 v2, so I used the settings for the RF100 v1 and adjusted the dimensions of the width, depth and height to 120 mm. As G-code flavor I stayed with "Marlin".

What can I do? This question is not specific to a key cover. I could design this so I could insert the key at the end. But I really would like to know how to do a predefined pause during my print.

**Tags:** marlin, ultimaker-cura, g-code

> **Comments:**
> **username_1**: Your firmware does not support the `M0` G-code, please read my updated answer! The solution would be to insert a pause yourself.  
> **username_1**: Just out of curiosity, have you been able to pause using the answer below? Please vote and accept or add your own solution.  

---

## 1 answers

### Answer by username_1 on 2019-10-25. Score: 2

## G-code `M0` is not supported!1)

According to the [original firmware of the RF100](http://www.renkforce-rf100.ch/firmware/firmware-rf100/index.html), the firmware is based on Marlin Firmware. From the original sources you can find that in order for `M0` (or `M1` which is a deprecated alias for `M0`) to work, you need an `ULTRA_LCD` supported LCD panel:

```

 * "M" Codes
 *
 * M0   - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)

```

However, your printer does not support such an LCD panel, from the configuration.h can be read that the constant is disabled (`//` means that the line is treated as a comment and as such ignored by the compiler):

```
//#define ULTRA_LCD  //general LCD support, also 16x2

```

**Therefore, these scripts will not work for your printer!**
  
*(Not your printer is running a very old version of Marlin; version 1.0.3)*

---

## Solution:

It is possible to manually change the G-code for a (in this case) Marlin based firmware2) (so no adding of a pause by Cura) by inserting a few lines to:

1. First set relative movement (`G91`), then retract a certain amount of filament (`G1 E-2 F500`) or alternatively use [`G10`](https://reprap.org/wiki/G-code#G10:_Retract) using predefined retraction definitions in [`M207`](https://reprap.org/wiki/G-code#M207:_Set_retract_length);
2. Insert a dwell period by inserting the G-code [`G4`](https://reprap.org/wiki/G-code#G4:_Dwell) (plus a time to wait), e.g. `G4 P2000` to dwell for 2000 milliseconds (alternatively, `G4 S2` will also pause for 2 seconds), please adjust the value to an adequate one in which you can insert the object;
3. First, unretract filament (`G1 E2 F500`) and then put the printer back in absolute movement ([`G90`](https://reprap.org/wiki/G-code#G90:_Set_to_Absolute_Positioning) or alternatively use [`G11`](https://reprap.org/wiki/G-code#G11:_Unretract) using predefined retraction definitions in [`M207`](https://reprap.org/wiki/G-code#M207:_Set_retract_length).

---

1) *By your firmware version/implementation*

2) *Note that certain G-codes only work for certain firmwares! Fortunately, the [original firmware of the RF100](http://www.renkforce-rf100.ch/firmware/firmware-rf100/index.html) is based on Marlin Firmware (unless it has been changed form the factory default.)*


---

