<p>Basically you need to write a G-code file yourself. This is a plain text file with a <code>.g</code> extension.</p>

<p>You need to home the printer with <code>G28</code>, then move the Y axis all the way forward (for a Prusa style printer) with <code>G1 F1500 Y{ymax}</code> (where <code>{ymax}</code> is the length of the bed). Now raise the head with a similar command <code>G1 F500 Z{zmax}</code> (where <code>{zmax}</code> is the height of the printer volume).</p>

<p>Heating the bed is done with <a href="https://reprap.org/wiki/G-code#M190:_Wait_for_bed_temperature_to_reach_target_temp" rel="nofollow noreferrer"><code>M190 S60</code></a> (set and wait to reach 60&nbsp;&deg;C).</p>

<p>You can now rock the Y axis by moving it fast, e.g. with <code>G1 F5000 Y{ymax-5}</code>, <code>G1 Y{ymax-1}</code>, <code>Y{ymax-5}</code>, <code>Y{ymax-1}</code>, etc.</p>

CC BY-SA 4.0
2020-04-26T08:25:19.653Z
2020-04-26T08:25:19.653Z
0scar
<p>Stefan from CNC kitchen already did it: <a href="https://github.com/CNCKitchen/3D-Printer-Vibration" rel="nofollow noreferrer">https://github.com/CNCKitchen/3D-Printer-Vibration</a></p>

CC BY-SA 4.0
2020-04-27T07:49:02.850Z
2020-04-27T07:49:02.850Z
FarO
<p>Never mind, figured the quickest dirtiest way myself - created a tall thin cylinder shape model in Blender and positioned it in Repetier so the printer head will be clear of the table as it moves. Then just broke off the filament that was currently in the printer so it will stop feeding once the current piece gets to the end of the feeder wheel. - not an endless loop but should give me a good 10 or 20 minutes of agitation before I need to restart the print if necessary.</p>

CC BY-SA 4.0
2020-04-26T06:30:39.250Z
2020-04-26T06:30:39.250Z
norlesh
<p>I was just about to start using my 3D printers heated bed to warm a chemical reaction in a container and was thinking it would be great to be able to get the bed stepping back and forth to stir the pot.
Can anyone already up to speed in programming G-code walk me through a quick and dirty way to get the X-axis on my old Printrbot metal doing a couple of micro-steps either way in an endless loop? Or suggest some software out there that could achieve the same effect? </p>

<g-code><desktop-printer><scripts>
How to make a printer bed vibrate using g-code (heated chemical stirrer)?
norlesh
# How to make a printer bed vibrate using g-code (heated chemical stirrer)?

(Asked by: username_0 on 2020-04-26)

I was just about to start using my 3D printers heated bed to warm a chemical reaction in a container and was thinking it would be great to be able to get the bed stepping back and forth to stir the pot.
Can anyone already up to speed in programming G-code walk me through a quick and dirty way to get the X-axis on my old Printrbot metal doing a couple of micro-steps either way in an endless loop? Or suggest some software out there that could achieve the same effect?

**Tags:** g-code, desktop-printer, scripts

---

## 3 answers

### Answer by username_1 on 2020-04-26. Score: 2 | Accepted answer

Basically you need to write a G-code file yourself. This is a plain text file with a `.g` extension.

You need to home the printer with `G28`, then move the Y axis all the way forward (for a Prusa style printer) with `G1 F1500 Y{ymax}` (where `{ymax}` is the length of the bed). Now raise the head with a similar command `G1 F500 Z{zmax}` (where `{zmax}` is the height of the printer volume).

Heating the bed is done with [`M190 S60`](https://reprap.org/wiki/G-code#M190:_Wait_for_bed_temperature_to_reach_target_temp) (set and wait to reach 60 °C).

You can now rock the Y axis by moving it fast, e.g. with `G1 F5000 Y{ymax-5}`, `G1 Y{ymax-1}`, `Y{ymax-5}`, `Y{ymax-1}`, etc.


---

### Answer by username_2 on 2020-04-27. Score: 1

Stefan from CNC kitchen already did it: <https://github.com/CNCKitchen/3D-Printer-Vibration>


---

### Answer by username_0 on 2020-04-26. Score: 0

Never mind, figured the quickest dirtiest way myself - created a tall thin cylinder shape model in Blender and positioned it in Repetier so the printer head will be clear of the table as it moves. Then just broke off the filament that was currently in the printer so it will stop feeding once the current piece gets to the end of the feeder wheel. - not an endless loop but should give me a good 10 or 20 minutes of agitation before I need to restart the print if necessary.


---

