14
votes
Accepted
What is the purpose of asterix (*) in Gcode?
That is a checksum. It's added by the host software to the G-code, to allow some basic verification by the firmware that the G-code was transmitted unchanged. It doesn't change the meaning of the G-...
14
votes
Accepted
What is a printer console/terminal?
There are several programs that could serve as a console to connect to a printer, put let's start somewhere: the USB connection.
Step 1: Connection with USB
When connecting the printer via USB for the ...
13
votes
Accepted
What is G92 used for in G-code
The G92 command is used to set the start position (origin) of one of more axes (including the current extruder) to any arbitrary value. The command ...
12
votes
Accepted
Cura: set z-offset
You can trick the printer into applying an offset using the G92 command:
G0 Z0
G92 Z0.1
First, we move the nozzle to ...
12
votes
Are parentheses allowed within a G-code comment?
This is not universally valid G-code, and how it is handled depends on the implementation. You can use this style of comment on some machines, but not all.
The way parsing used to be implemented in ...
11
votes
Accepted
E axis vs Z axis
G-CODE can be confusing as historically it was developed for machining tools rather than FDM printers, and thus:
not all available commands make sense for a 3D printer
some of the command do slightly ...
11
votes
Accepted
Music from the printer?
Yes, it has been done before, see here and here.
The README file of the first repository linked above contains a detailed explanation of the basic idea/calculations involved. A short excerpt:
As ...
10
votes
Accepted
Writing G-code: Audible Alert at end of print
Let's put the parts one by one:
Wait for bed temperature being at 30 °C: M190 R30
Play Bleep for 1/5th of a second: ...
10
votes
Accepted
Simultaneous heating of extruder and bed at start of print
This can be achieved with start G-code adaptations, this requires no software changes. Cura, and most slicers, have the ability to use placeholders (basically variables or maybe better: constants). ...
10
votes
Accepted
Using auto-bed leveling, do I need to initiate G29 before every print?
No, it is not necessary to call G29 before every print to "auto level the bed" 1) provided that:
the bed surface has not changed (e.g. large load or ...
9
votes
Accepted
Writing G-code : swiping at start of print
The lazy way: Skirt/Brim
With my TronXY X1 I learned pretty fast, that this first bit of extrusion on an unheated bed can totally mess up the first layer by being just in the way, as explained in the ...
9
votes
Accepted
What is the difference between M420 S and M420 S1?
TL;DR
Short answer: "There is no difference!".
Long answer
G-code is parsed line by line. The parser in the firmware reads the command and the options (also called parameters) following it, ...
8
votes
Accepted
Is G-code read line by line?
Yes, G-code is read line by line. G-code is a numerical control programming language. It basically instructs the machine sequentially line by line to do a specific task. The printer than executes the ...
8
votes
Accepted
Move print bed to front at the end of a print rather than the back
Note that this reference states that:
Because the behavior of G28 is unspecified, it is recommended not to automatically include ...
8
votes
Accepted
G-Code for resetting to 100% speed
You can put the speed to 100 % by G-code command: M220 S100.
The M220command is described here.
Know that speed changes ...
8
votes
Accepted
Converting an undirected graph to optimal G-code paths
Quote of comment of R.. GitHub STOP HELPING ICE on question reads:
Pretty sure it is NP-complete (equivalent to travelling salesman problem), no? –
This is correct; this is route optimization ...
7
votes
Cura: set z-offset
For Cura 3.1(?)+:
Install the plugin: Menu / Plugins / Browse Plugins... / scroll to "Z Offset plugin" <-- Install
Configure the setting: ...
7
votes
Music from the printer?
I actually did this, on my Malyan M150.
After not that much experimentation at all it turned out that the frequency of the produced tone scales linearly with the speed of the motors. Due to the ...
7
votes
Accepted
Add a laser module to Reprap Guru Prusa i3
By connecting to the D9 output header (see RAMPS 1.4 shield schematic below) you only have 2 wires that represent a scheduled load and ground. You actually need to connect the positive (red) lead to ...
7
votes
Accepted
How to resume an unfinished project?
Provided that the print hasn't come loose from the bed and you know the layer height or layer number (you could count the amount of layers or measure the height of the print using a caliper), you can ...
7
votes
Are there attempts to standardize G-code for FFF/FDM printers?
G-Code Is RS-274/NGC
There is no need to attempt to standardize G-Code, the G-code itself already is standardized: it is the NIST RS274/NGC, or often short AIN RS-274 and was not designed for just FDM ...
7
votes
Does anyone know a site where you can download straight up G-code files?
This is generally not a good idea. Your slicing needs to be reasonably tuned to your specific printer. You’re going to have a hard time finding files to start with, and you may have a very bad time if ...
6
votes
Accepted
Turning off heatbed for the last few layers. Good idea or not?
It's not a bad idea, and you should try it. But only on prints with some height, because:
The goal of the heated bed is to ensure adhesion for the first few layers. Without the heat on the bottom ...
6
votes
Calculating the estimated print time of an already sliced file
First of all, there are some nice open source analyzers written in JavaScript that you can use online, or read the source to, at https://www.gcodeanalyser.com/ and http://gcode.ws/. Their predictions ...
6
votes
What is G92 used for in G-code
To supplement the accepted answer, and answer a question in the answer's comments (which should not be there), consider the E value as another axis - the axis of the filament.
If you executed:
...
6
votes
Accepted
Any code to move up Z axis after finishing the printing?
You can use:
G91
G1 Z10
G91 make the printer use ralative positioning, while G1 Z10 would ...
6
votes
Accepted
Apply X-offset to gcode (re-slicing not possible)
You can use G92 to change the coordinates the machine "thinks" it's at. If just after homing, you apply
G92 X-10
the machine ...
6
votes
Writing G-code : swiping at start of print
What code we have so far
The code already made by Ultimaker Cura 3 (and then commented on) can be explained a little more:
G28 ;Home
This homes your machine to hit ...
6
votes
Accepted
G4 S20 vs. G4 P2000
The answer is that it depends on the type of firmware you are using.
Let us look at the documentation of G4 to find that G4 is ...
6
votes
What does a stand alone "T" index value do?
T stands for "Tool" and has its origin in the origins of .gcode being for other automated machine controls. Depending on the machine, everything could be a tool for ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
g-code × 243marlin × 51
ultimaker-cura × 45
creality-ender-3 × 18
slicing × 17
slic3r × 12
prusa-i3 × 11
bed-leveling × 10
bltouch × 10
extrusion × 9
serial-connection × 8
troubleshooting × 7
diy-3d-printer × 7
firmware × 7
octoprint × 7
print-quality × 6
heated-bed × 6
software × 6
anet-a8 × 6
python × 6
extruder × 5
calibration × 5
knowledgebase × 5
usb × 5
cnc × 5