RomeFallsAgain
Posts: 128
Joined: Wed Nov 18, 2015 6:56 pm

G-Code

In the G-Code files produced by S3D when creating an x3g file, can ALL the lines with a semi-colon in front of them be interpreted to mean they do nothing?

In other words, a semi-colon in the beginning of ANY line means the rest of that line is totally ignored by the machine and is there ONLY for documentation purposes?

And what exactly is all that semi-coloned text at the beginning of every file?
Is it just the parameters that have been set inside the software for that particular build?
User avatar
dkightley
Posts: 2405
Joined: Tue Mar 10, 2015 4:09 pm

Re: G-Code

In gcode, a line beginning with a semi-colon is a comment line.....this is defined in the gcode standard, etc and as you suggest, the line is ignored by the printer.

And S3D creates a batch of comment lines at the beginning of the gcode file that list the date/time the file was created and all of the profile settings used for the slice.

There are also many comment lines throughout the file that help show whereabouts the print is...and there are a few summary lines created at the end.
Doug Kightley
Volunteer at the National Tramway Museum http://www.tramway.co.uk
Railway modeller and webmaster at http://www.talkingtgauge.net
RomeFallsAgain
Posts: 128
Joined: Wed Nov 18, 2015 6:56 pm

Re: G-Code

Thanks.

Mainly I wasn't certain if S3D could somehow "pick and use" some parts of the code behind the semi-colons.
Also, I found this and it may help

https://www.simplify3d.com/support/arti ... -tutorial/
RomeFallsAgain
Posts: 128
Joined: Wed Nov 18, 2015 6:56 pm

Re: G-Code

My printers are getting old and parts are needing replacement parts, repairs and other recalibrations etc

As such, I'm going through a period where I sometimes have to terminate a print midway.
Considering that the print already completed can be several hours in time, I often try to salvage those prints by resuming them using S3D's Start Position settings under advanced.

This "should" be straight forward.....
You go back to your original file and simply set a new starting point in the Advanced section that is 0.2mm above the measured height of the build now on the print bed. If only it were always that easy.

For reasons I have yet to discover, sometimes the x3g file to continue the print does not always start at the correct point.
It is ALWAYS the x axis that is the trouble maker. I can always get the Z and Y axis re-start points correct.

(Let's assume that the belts, pulleys, stepper motors and their mountings are all ok and there is no erroneous shifting of any mechanical parts causing this and that no obstructions are causing the print head to shift in any way during printing..)

So I'm trying to develop a consistent process of determining the correct X offsets so that when I restart a build, it perfectly aligns with the previously interrupted build already on the print bed. (Or at least determine that the offsets are correct and the continued print will perfectly over lay the previously terminated portion of the build still on the print bed.

Let's assume for the sake of this exercise that the original files have been magically altered so that there is now a -15 shift in the X axis from the original file (or project)....but that this is not known to the operator. The desired end result is to somehow determine this offset from measurements taken directly from the build still on the print bed and the "Magically altered" GCode

Perhaps this is not possible? Or maybe I would have to create an x3g file to simply move to the desired X axis spot and visually check to see if it's where it should be and use those X axis offsets?

From the GCode, I could determine any current offset to the X Axis. But how would one determine if that offset matches the item already on the print bed and correct the "magically altered files" so that it re-aligns with the build on the print bed?

Return to “General Discussion and Tips”