G-code

Hello,

I’m having a bit of trouble understand how G-code works. For right now I’ll be experiment with slic3r but I am a bit confused. Let’s say I use slic3r and get my generated g-code from there. If I’m to save this onto an SD card, am I supposed to add the start/end g-code to the top and bottom (respectively) of the slic3r gcode? And if true, I’m assuming it is true for all slicers?
Would I need another printer hose as well to use the gcode directly (without saving to an SD Card)?

So a Gcode is just an X Y Z and E for Extrude coordinate thingy. So you start with a 3d object usually an STL file, and slicers take that object and calculate what movements it would take to make it. Starting at 0,0, (x, Y, Z) for the lower left hand corner, your gcode file might say something like Start at 0,0,0 and then go up to x=10, and over to Y = 22 (usually in Millimeters) and then make a circle extruding from Extruder E0 or E1 (in the case of a dual extrusion machine) for another 45 mm.

You can send that gcode to the printer one of several ways. Either by loading it onto the sd card manually and starting it from the printer if it has an LCD (like with a Taz) and to do that you would not need a computer attached. You can also instead connect the printer to a computer via USB and user a control program such as Cura, or prointerface or Repetier host to send that gcode to the computer line by line as movement commands. You can also do the same thing with devices such as Octoprint or Astroprint which act as a web server attached to the printer that you upload your gcode to and then start the print.

With auto leveling and nozzle cleaning, you do need to make sure those commands end up in your gcode file. Either by adding them at creation time, or more usefully adding them into the pre and post script sections of your slicer You could also manually add them in i suppose. In Slic3r specifically you will want to use the Pre and post sections to add in all those pieces.

I am not familiar with Slic3r, but with Cura the Start and End GCode gets appended automatically when you save a GCode file. This implies that the GCode is specific to the printer, after all the slicer used the machine settings and profile you’ve chosen go generate the GCode.

I can confirm Slic3r also automatically adds the start and ed-gcode to the gcode file. Of course, it needs to be correctly supplied in the printer settings tab.

Great, thank you all very much. I shall do a little more reading before testing it out but your input is much appreciated. This is my first post so I guess I forgot to mention some important things. First of all I have been using a Taz 6 with the CURA slicer/printer host. However, I am trying to control the raster (infill) angle since I need to print my tensile specimens at 0, 45, and 90 degrees. However, I am unable to do this with the CURA slicer. There is a way to manipulate the infill angle by simply rotating the piece on the bedplate, but since it does the automatic cross hatch pattern inside, the angle ends up alternating, which I’m trying to avoid. Thus my trying to figure out how to work with other slicers and see if I can accomplish said purpose. I’ve already confirmed with Lulzbot tech support and I’ll be unable to control this in CURA and what I was doing with the initial positioning of the piece on the bedplate is the only way to alert it. Thanks again.

The only thing I can add to this is that once I move away from Cura to Slic3r I never went back apart from checking AO’s defaults for some profiles. I am running the prusa edition, since that got some more releases and updates lately, but original Slic3r 1.3.0 is around the corner and I’m eager to test it.