Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [g-code]

Questions about the human-readable machine language, G-Code.

Filter by
Sorted by
Tagged with
12 votes
2 answers
12k views

What is a printer console/terminal?

I read that G-code commands can be sent through a console/terminal over USB. What is a console/terminal and how do you use that?
user avatar
  • 30.4k
9 votes
5 answers
46k views

Writing G-code : swiping at start of print

Ok, I did it, I ordered myself an Ender-3, a genuine 24V e3D hotend, inductive sensor and some better tubing/clamps to cope with the problem the CR10/Ender line has occasionally. But now I need to ...
user avatar
  • 19.2k
3 votes
2 answers
5k views

M502 will reset all configurable settings to their "factory defaults", which settings are those?

From the M502 documentation page can be read that M502: Reset all configurable settings to their factory defaults. Please ...
user avatar
  • 30.4k
12 votes
3 answers
46k views

Cura: set z-offset

I'm having a Prusa i3 derivative printer with a capacitive sensor for the z-axis. It switches a tiny bit before the nozzle hits the print bed and hence needs a z-offset to be configured. In Slic3r I ...
user avatar
  • 883
8 votes
1 answer
11k views

Using auto-bed leveling, do I need to initiate G29 before every print?

Various methods to scan the top surface exist to improve the bed adhesion to prevent prints to come loose from the bed during printing: e.g. BLTouch and clones or inductive and capacitive sensors/...
user avatar
  • 30.4k
4 votes
2 answers
2k views

Can G-code scripts be run automatically on inserting an SD card when using Marlin Firmware?

When running Marlin Firmware, is it possible to run G-code scripts/series of commands automatically when you insert the SD card? I'm running Marlin on a 3D printer board using an ATmega 2560 based ...
user avatar
  • 30.4k
5 votes
4 answers
765 views

Multiple unattended prints using extruder to sweep build plate?

I read something the other day about a guy who found a way to knock over completed prints with the printer head itself, then slide them to the edge of the build plate, where they fall into a box/...
user avatar
  • 215
14 votes
1 answer
2k views

What is the purpose of asterix (*) in Gcode?

Doing some low level monitoring, the following sequence is sent to the printer: N0 M106*36 N1 G28*18 N2 M107*39 This sequence just turns the fan on, homes the ...
user avatar
  • 599
8 votes
2 answers
3k views

How to pause a print to insert something in a cavity using Ultimaker Cura?

I have a model that contains a cavity, into which I want to insert a piece of metal, so I can use a magnet to stick to the print. How can I introduce a pause into the G-code without manipulating it ...
user avatar
  • 19.2k
7 votes
2 answers
1k views

Writing G-code: Audible Alert at end of print

Often, the pre-generated G-code is enough for start and end. However, sometimes we want to have something different. In this case: how to generate an audible alert of something like 4 bleeps at the ...
user avatar
  • 19.2k
6 votes
2 answers
3k views

Printer randomly moves to home during printing, then resumes as normal

During printing, my printer occasionally makes some mystery moves: it will very slowly move either the X or Y axis all the way to the left/front, before very slowly moving back to its original ...
user avatar
3 votes
2 answers
1k views

How to write arcs directly in G-code?

How can I write G-code for a triangle without sharp tips? I want to generate the corners manually, rather than using a slicer to generate them, just to know how it is done.
user avatar
  • 31
1 vote
2 answers
1k views

How do I set my Z offset?

After watching every possible YouTube video on the subject and reading any source available, and although I'm a PhD and quite computer savvy, I still can't make my Anet A6 (no probe) behave in terms ...
user avatar
  • 13
1 vote
1 answer
819 views

How do you send G-code from a USB port with Python?

I'm working on a project for my masters where I'm trying to detect print errors using object detection and I want to be able to pause the printer when a potential fault is detected. However I can't ...
user avatar
  • 13
27 votes
3 answers
64k views

Is there a G-code for waiting?

My printer has an auto-leveling feature that works by touching the build plate with the tip of the nozzle. I started using a BuildTak surface and BuildTak is damaged when you push a hot nozzle into ...
user avatar
  • 2,351
10 votes
2 answers
7k views

Calculating the estimated print time of an already sliced file

I started to write an application that calculates the estimated total print time from the G-code file for an already sliced model. The program works and it's pretty accurate. It works as follows: ...
user avatar
  • 595
8 votes
3 answers
3k views

Run custom code between g-code commands?

I would like to be able to add custom commands/script to be executed during a print. For example I would like to write some software to take a picture check the print hasn't moved off the bead ...
user avatar
6 votes
2 answers
14k views

Move print bed to front at the end of a print rather than the back

I have a Monoprice Maker Select Plus, currently using Ultimaker Cura 3.6.0 with the default settings for a Wanhao Duplicator i3 Plus. Right now when a print finishes, the bed retreats towards the back ...
user avatar
6 votes
1 answer
987 views

Add a laser module to Reprap Guru Prusa i3

I have a Reprap Guru Prusa i3 v2 3D printer. Here is a link to the 192 MB manual. And here is the link to the resources page for the Reprap Guru. Page 58 of the manual discusses electronics. I ...
user avatar
  • 183
6 votes
2 answers
3k views

Is G-code read line by line?

I am trying to add the line G4 P4000 G1 F4000 E-50 to pause and retract the print in order for the printed line to dry (printing in mid air vertically). Does the above code work or should i skip ...
user avatar
4 votes
1 answer
239 views

My 3D printer checks axes home during print, often wrecking the print

My Tevo Tornado has picked up this habit along the way of checking axes during a print. (I say picked up because it didn't exhibit any problems when I got it. As far as I can tell the problem ...
user avatar
  • 61
13 votes
4 answers
8k views

Why do some models appear broken in slicing software?

In my slicing software (Slic3r) some of the vertices/walls of my model seem to have disappeared, so that the inside of the model - which should be solid - is visible, while the surface appears as a ...
user avatar
4 votes
1 answer
610 views

Cura 4.3.0 does not pause on Renkforce RF100 V2.2

Cura (version 4.3.0) has the ability to insert a post processing script to your print. I tried this for printing a key cover around my door key (similar to this question). I designed the STL file with ...
user avatar
  • 141
3 votes
1 answer
8k views

G-code (M-code?) for Get Bed Temperature

I'm familiar with 3D printing, and the G-code concept. I'm also comfortable with programming. Can anyone give me the G-code (or probably the M-code, actually) to read the bed temperature? Is there ...
user avatar
  • 143
3 votes
2 answers
10k views

Any code to move up Z axis after finishing the printing?

Is the firts time that I saw this movement after the printing has finishig and causes the nozzle crashes to the printed part and I noticed due the part is 14x8 and the nozzle is to near and below to ...
user avatar
2 votes
2 answers
1k views

How to interrupt long command with G-code?

I was able to connect my terminal program (Putty) to my 3D Printer (Creality Ender 3 Pro) and was able to send G-code commands to my printer and it obeys. Now suppose I sent long command like ...
user avatar
  • 141
2 votes
1 answer
1k views

Marlin firmware: unload filament with G-code

I have upgraded my ER-20 with a Bondtech dual gear feeder. It is not or hardly possible to load/unload filament manually with this feeder, so some .gcode is needed to do it. I wanted to implement ...
user avatar
  • 133
2 votes
0 answers
2k views

Sending G-code through USB serial doesn't work (Ender 3) [duplicate]

Recently I was gifted an Ender 3 3D printer. I'm trying to use a Raspberry Pi Zero W to send commands to the printer remotely, if I get this to work the idea is to instruct the RPi to pull G-code ...
user avatar
2 votes
2 answers
235 views

How is the print time of an object to be printed estimated?

I am curious about the algorithm/principles behind the estimates that the slicing softwares provide. Is there a standard technique behind this and how accurate is it ?
user avatar
  • 63
1 vote
3 answers
281 views

When dwelling G4, my printer is oozing, how can i stop that? [duplicate]

Here is the sequence of my Gcode, printed in mid-air: Print (E20) Retract (E-20) Dwell (G4 10,000) Move away (E0) Print (E20) See the path on the printscreen ...
user avatar
1 vote
1 answer
810 views

Details of Marlin's feedrate calculation

I want to programatically generate G-code for a (Marlin-based) Ultimaker 2+ printer, and I have been looking at the Marlin documentation and working G-code examples generated by Cura. This has left me ...
user avatar
  • 111
0 votes
0 answers
445 views

Can't manage to force my print to standby while I insert a nut - Prusa Slicer and Tronxy XY2 pro

I use the Prusa Slicer on a Tronxy XY-2 pro which I believe uses RepRap firmware. I believe it uses RepRap firmware because I had to input it into the Prusa Slicer initialization questions, but I'm ...
user avatar