4
$\begingroup$

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). 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

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.

$\endgroup$
  • $\begingroup$ Your firmware does not support the M0 G-code, please read my updated answer! The solution would be to insert a pause yourself. $\endgroup$ – 0scar Nov 25 '19 at 10:20
  • $\begingroup$ Just out of curiosity, have you been able to pause using the answer below? Please vote and accept or add your own solution. $\endgroup$ – 0scar Dec 17 '19 at 9:23
2
$\begingroup$

G-code M0 is not supported!1)

According to the original firmware of the RF100, 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 using predefined retraction definitions in M207;
  2. Insert a dwell period by inserting the G-code G4 (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 or alternatively use G11 using predefined retraction definitions in M207.

1) By your firmware version/implementation

2) Note that certain G-codes only work for certain firmwares! Fortunately, the original firmware of the RF100 is based on Marlin Firmware (unless it has been changed form the factory default.)

|improve this answer|||||
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.