Modify Start And End GCode

After handwriting (modifying) code for pulley production I figured that there must be a way to have Skeinforge output the GCode with whatever you want at the start and end. There is. It's actually really easy too.

There are two text documents within the skeinforge_tools folder: one called start.txt and the other end.txt. The carve tool within skeinforge will automatically find those documents and put their contents at the beginning and end of the GCode respectively.

A few oddities came up when I was playing around with it:
The G1 (move) command used at the end to tell the extruder to move up is a little weird in that it won't do exactly what you tell it to. I think this is because it's trying to linearly interpolate the points you give it.

I found the G0 command much better. To my knowledge, the G0 command tells the machine to move to the specified location as quickly as possible. You can designate either absolute or relative positioning with G90 and G91 respectively.

The best way to learn GCode I've found is to just look at some examples and do some trial and error.

As an example my start and end files look like this:

I've left the test extrusion stuff but I have the nozzle return to zero automatically before each build. It's nice because now I rarely have to eyeball the nozzle's height and alignment above the build-platform. I have the extruder first just return to a Z of 10mm so that I don't have to put the platform back right away and so that the nozzle won't be touching the acrylic for too long (I always worry about leaving the hot nozzle on the acrylic).


*******ENSURE Z IS POSITIONED AT 10mm*********

(homing routing)
M104 S220 T0 (Temperature to 220 celsius)
G21 (Metric FTW)
G90 (Absolute Positioning)
G92 X0 Y0 Z10 (You are now at 0,0,10)
(You have failed me for the last time, MakerBot)
G0 Z15 (Move up for test extrusion)
M108 S255 (Extruder speed = max)
M6 T0 (Wait for tool to heat up)
G04 P5000 (Wait 5 seconds)
M101 (Extruder on, forward)
G04 P5000 (Wait 5 seconds)
M103 (Extruder off)
M01 (The heater is warming up and will do a test extrusion.  Click yes after you have cleared the nozzle of the extrusion. Make sure you started with Z at 10mm)
G0 Z0    (Go back to zero.)
(end of start.)


(end of the file, cooldown routines)
M104 S0
G91 (Relative positioning)
G0 X0 Y0 Z10 (rapid move 10 up)
M01 (Build complete. Please remove the object and return build platform)
G90 (Absolute positioning)
G0 X0 Y0 Z10 (rapid move to 0,0,10)
Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.