Category Archives: gCode

Seej Pillar

My Seej fortifications have been looking a little mundane lately so I designed this seven-piece fluted column to add a little bit of architectural elegance to my battles. It handily interlocks with existing Seej bloxen, and collapses spectacularly when hit with a penny from a Seej engine.

It’s pictured here with a Riveted Bloxen for scale.

This post was originally going to be about how to adjust your gCode by hand-tweaking it to get a good raftless PLA print, but then I went ahead and downloaded ReplicatorG 037. Editing gCode wasn’t necessary, except to set the HBP temperature to 65°.

Perfect print the first time out, even with a relatively complicated model like this one. No hocus-pocus required.

1.75mm Blue PLA (available at Amazon)
Infill 10%
Layer Height .20mm
Shells: 1
Feedrate 25mm/s
Travel Feedrate 55mm/s
Print Temperature 190°
HBP Temperature: 65°

Download it here.

Raftless Printing with PLA

I’m no expert at 3D printing, but through a lot of trial and error I’ve discovered a few nuggets of information that I wish I’d known a few months ago.

A few weeks ago I said I was chasing a raftless print. I’ve finally got it, at least with PLA and ABS, printing Seej bloxen.

This comparison isn’t entirely fair, since the bloxen are sourced from different models, but the difference between a hot, rafted print on the left and a cool, raftless print on the right should be pretty clear. Both of these are printed from the same roll of 1.75mm PLA.


Here’s what I’ve learned.

PLA likes a cool build platform, somewhere around 45° C: My MakerBot Replicator ships with a heated build platform, and ABS plastic seems to stick nicely around 115°.

When I first started printing with PLA I just assumed it was more or less like ABS. When prints started shifting off the platform I kept cranking up the temperature on the HBP, eventually resorting to elaborate raft structures with painters’ tape.

It never occurred to me that lowering the HBP platform temperature was the solution.

Changing the build temperature in gCode is easy: just find a line that looks like:

M109 S100 T0 (set HBP temperature)

And change S100 to S45. This assumes that you’re using ReplicatorG to generate your gCode.

There’s one other change that seems to be helping: print a nice, gooey first layer of PLA, and then back off the printing temperature to maintain the model’s integrity through the rest of the print. The gCode for this isn’t much more complicated, but you have to get it in the right place. First, set the extruder temperature at the beginning of the print, close to the top of the gCode:

M104 S240 T0 (set extruder temperature)

Change 240 (or whatever it is in your gCode) to 210.

The last step is to find the point in the gCode where the first layer stops and the second layer begins, and back off the temperature a bit.

In the other two instances there are existing M codes that tell the machine to wait for the extruder or bed to reach the specified temperature before proceeding. You’ll have to put those codes in yourself for this line.

Find the first example of:

M73 P1 (display progress)

and add these lines after the next <layer> tag:

(*custom gCode here*)
M104 S190 T1 (set extruder temperature)
M6 T1 (wait for toolhead, and HBP to reach temperature)
(*end custom gCode*)

That should drop the extruder temperature down to 190° and then resume printing. The delay can be a little unexpected the first time your Replicator just seems to stop printing abruptly, but then your forebrain will kick in and you’ll realize it’s just doing what you told it to do.

The usual warnings about bricking your Replicator or burning down your apartment building apply. Use this code at your own risk, and you should probably own couple of fire extinguishers anyways.

The Perfect is the Enemy of the Good

This happens to me all the time. I start looking for information on some technical subject and I end up wading through ancient forum posts and forgotten wikis in a fruitless search for clues. A lot of this stuff seems to be written by and for people smarter than I am. It can be very frustrating.

I usually just want to do X, where X is something straightforward like “pause the print, move the Replicator’s extruder head out of the way, wait for user input, and then resume the print.”

After a few hours of of data forensics and a fair amount of trial and error I have a gCode solution for X. Keep reading.

This is the beginning of a Seej Tournament Bloxen print.

I found the need for this script when I started printing with PLA a week or so ago. I haven’t got the temperatures quite down yet, so my rafts curl up a bit at the edges and sooner or later end up taking the whole print for a joyride around the build platform.

I’m still looking for that perfect raftless print, but along the way I’ve got to actually produce some printed models. So I’ve taken to printing a raft, pausing, and then using painters’ tape to bind the raft down to the build platform.

I’m a huge fan of having a bag of popsicle sticks around any hobby project. They’re cheap, disposable, and can be quickly modified into a variety of simple tools (gaffs, hooks, spreaders, etc) with a pocketknife. They’re also great for evenly applying painters’ tape to rafts.

It’s kludgey, but it works. The only problem I’ve had so far is getting around the print heads to get the tape down on the raft, but with this new script the Replicator moves the nozzles out of the way before pausing the print.

Fair warning: this worked on my Replicator, but there are no guarantees it will work on yours. If this code crashes your extruder head, slags your controller board, or burns your house down and torches all you hold dear and dry-humps the ashes, it’s not my fault.

That said, it’s pretty vanilla gCode and I don’t expect you’ll have many problems with it, assuming your gCode is using millimeters and absolute positioning, which I think is the default output from ReplicatorG.

The first lines you’ll need to look for are:

(<raftLayerEnd> </raftLayerEnd>)
M73 P6 (display progress)

This indicates the end of your raft’s print. The next significant line you’ll see is one that begins with G1:

It should look something like G1 X-4.8 Y-4.68 Z12.6 F3300.0

This is telling your Replicator to start extruding the first layer of your model. In between these two significant lines, you’ll have to add this code:

G91 (*set to relative positioning*)
G1 X-60 (*move the print heads -60mm in X, assuming the print is using mm*)
M71 P60 (Press button to resume print)
G1 X60 (*move the print heads back 60mm in X*)
G90 (*return to absolute positioning*)
M73 P6 (display progress)

Be careful with your X move values. I don’t see anything keeping you from accidentally ramming your extruder heads into the side of your Replicator with too large a value.

I’m sure there’s a more elegant way to write this code, but I’m never one to let perfection be the enemy of the good. It’s done, it works, and I can improve upon it later.

This code also seems to disable the Pause button once the user has pressed it, which is irritating but I can’t bring myself to spend the energy tracking that particular bugaboo down. I’d also like to find a way to get the nozzle’s current position, move the heads, and then return to that position. I’ve found tantalizing hints on just how to do that, but that’s a hack for a different day.