Often, the pre-generated G-code is enough for start and end. However, sometimes we want to have something different. In this case: how to generate an audible alert of something like 4 bleeps at the end of the print, after putting the printer into the end position and when the bed has reached a "safe" 30 °C?
2 Answers
$\begingroup$
$\endgroup$
5
Let's put the parts one by one:
- Wait for bed temperature being at 30 °C:
M190 R30
- Play Bleep for 1/5th of a second:
M300 S440 P200
- Wait for 1/5th of a second:
G4 P200
That gives:
M190 R30
M140 S0
M300 S440 P200
G4 P200
M300 S440 P200
G4 P200
M300 S440 P200
G4 P200
M300 S440 P200
G4 P200
Just for 0scar:
M300 S1396.91 P400 ;f7
G4 P400
M300 S1661.22 P600 ;as7
M300 S1396.91 P400 ;f7
M300 S1396.91 P200 ;f7
M300 S1864.66 P400 ;b7
M300 S1244.51 P400 ;es7
M300 S1396.91 P400 ;f7
G4 P400
M300 S2093.00 P400 ;c8
M300 S1396.91 P400 ;f7
M300 S1396.91 P200 ;f7
M300 S2217.46 P400 ;des8
M300 S2093.00 P400 ;c8
M300 S1661.22 P400 ;as7
M300 S1396.91 P400 ;f7
M300 S2093.00 P400 ;c8
M300 S2793.83 P400 ;f8
M300 S1244.51 P400 ;es7
M300 S1244.51 P200 ;es7
M300 S1046.50 P400 ;c7
M300 S1567.98 P400 ;g7
M300 S1396.91 P1600 ;f7
-
1
-
2$\begingroup$ @0scar There you go. Beverly Hills cop. $\endgroup$– TrishCommented Jan 13, 2020 at 21:37
-
-
1$\begingroup$ For the printers with non-blocking beeping, the pause duration must be longer than the tone duration, e.g.
M300 S440 P200
andG4 P400
(note the pause is twice as long as the tone duration, so it covers the tone itself, and a silent pause). This is, for example, true for the Creality Ender 3 V3 SE which I tested. $\endgroup$– v_2eCommented Apr 21 at 18:38 -
$\begingroup$ @v_2e good point - the tone lengths here are for old style 1.0.x! $\endgroup$– TrishCommented Apr 21 at 19:17
$\begingroup$
$\endgroup$
3
Trish's version is good but wait for bed temperature being at 30 °C (M190 R30
) before setting the temperature to 0 °C (M140 S0
)
So this is my version:
G91 ;relative positioning
G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more
G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way
G1 Y150 F5000 ;move completed part out
M84 ;steppers off
G90 ;absolute positioning
M190 R30 ;waits until cooling to 30 °C
M300 S300 P1000 ;beep
M300 S300 P1000 ;beep
M300 S300 P1000 ;beep
M300 S300 P1000 ;beep
M104 S0 ;extruder heater off
M140 S0 ;heated bed heater off
-
$\begingroup$ S perimeter is "this or more" - 60 is more than 30, so triggers S. $\endgroup$– TrishCommented Oct 4, 2019 at 13:54
-
$\begingroup$ ups yeah my bad..I was talking about the M190 R30 gcode but - hey - you used the "R" right so my fault..I'm gonna edit my answer $\endgroup$ Commented Oct 4, 2019 at 14:34
-
$\begingroup$ Yur order of commands in the revamped... You do realize that you set the bed off (M140 S0) and then demand the printer to target 30°C after that and not turn off the bed again? $\endgroup$– TrishCommented Oct 5, 2019 at 15:23