While this is not directly 3D printing related, I intend to use my 3D printer (Labist's ET40) to shake air bubbles off of a resin casting.

I printed parts, made a mould of them in silicon, then cast a copy with resin. All works, great looks and all! Except... bubbles. Especially at ceiling parts that are away from the gas hole.

I tried a few different techniques to get rid of bubbles (heating, cooling, release agent, handshaking, high drop pouring, a mix of the above, different hole positions in the mould), and some I can't due to price restriction (different resin, vacuum removal degassing), but I was explained by an expert I could just have a machine do some low amplitude, high frequency shakin' for me. Again they proposed a specific machinery or DIY project, but I believe I already have the tool for it in the shape of a 3D printer's axes.

Is there a way to create a G-code that would simply move at relatively high speed back and forth on the Y- and X-axis for, say 15 minutes? I'm sure there would need to be some variation to ensure the temporarily repurposed machine doesn't self-destruct in one way or another.


1 Answer 1


What you suggest is pretty straightforward with g-code. One would expect to have the item secured properly to the print bed. The printer you've indicated has movement only in the Y direction, which means your g-code should reflect that movement only. X-direction movement means the head will travel left and right and have nearly zero effect on the item. This also applies to Z-movement of the carriage.

Marlin (a common firmware) web page lists a specific g-code for repeat:

The Repeat Marker command is used to define regions of a G-code file that will be repeated during SD printing. A marker is first set with M808 L[count], and later in the file a plain M808 command is used count down and loop. (By default up to 10 start markers can be nested.)

In slicer software put M808 L to the “Start G-code” and M808 to the “End G-code.” But this command is not the only requirement. Before starting each whole object it’s important to actually clear the print area of obstacles and to reset the coordinate system with G92 or G28, so this command is best used with belt printers or other systems with automatic print removal.

From a different page on the same site:

The G0 and G1 commands add a linear move to the queue to be performed after all previous moves are completed. These commands yield control back to the command parser as soon as the move is queued, but they may delay the command parser while awaiting a slot in the queue.

A linear move traces a straight line from one point to another, ensuring that the specified axes will arrive simultaneously at the given coordinates (by linear interpolation). The speed may change over time following an acceleration curve, according to the acceleration and jerk settings of the given axes.

More details specific to this command are also on the linked page. A simple example of a movement g-code:

The most basic move sets a feedrate and moves the tool to the given position.

G0 X12 ; move to 12mm on the X axis G0 F1500 ; set the feedrate to 1500 mm/min G1 X90.6 Y13.8 ; move to 90.6mm on the X axis and 13.8mm on the Y axis

There are some caveats related with feedrates. Consider the following:

G1 F1500 ; set the feedrate to 1500 mm/min G92 E0 G1 X50 Y25.3 E22.4 ; move while extruding

In the above example the feedrate is set to 1500 mm/min, then the tool is moved 50mm on the X axis and 25.3mm on the Y axis while extruding 22.4mm of filament between the two points.

G1 F1500 G92 E0 G1 X50 Y25.3 E22.4 F3000

However, in the above example, we set a feedrate of 1500 mm/min on line 1 then do the move described above, accelerating to a feedrate of 3000 mm/min (if possible). The extrusion will accelerate along with the X and Y movement, so everything stays synchronized.

Consider to limit your acceleration based on the weight of the secured item. You would not be worried about precision, but skipped steps due to weight could bring the bed travel to the physical limit stops, causing stepper grinding.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .