A visual representation of G-code flavor by overlaying code on ice cream.
Advertisement
QIDI Q1 Pro
Our site is reader-supported. When you buy via the affiliate links on this site, we will receive a commission at no cost to you. All opinions remain our own. Learn more

G-Code Flavor: Which One to Choose (Ender, Klipper & More)

G-code is a language that instructs 3D printers to create physical objects layer by layer. It consists of commands that direct the printer to heat up, move the print head, spin the fans, and so on.

However, this G-code language isn’t universal; it comes in different ”flavors” tailored to specific machines. Choosing the wrong G-code flavor would be like trying to communicate with someone who doesn’t speak your language—your printer won’t understand what you want it to do.

In this guide, we’ll help you become a G-code flavor expert. You’ll get an insight into the various flavors (languages) used by 3D printers and how to always choose the right one for your 3D printer.

Let’s dive in and have your projects taste success!

What Is G-code?

G-code dictates your 3D printer’s movements, speeds, and other operations.

G-code, short for Geometry code, is the language used to control CNC devices, including 3D printers CNC stands for computer numerical control. The G-code tells your printer how to move the print head, extrude filament, the print speeds, and manage its other vital functions.

Let’s take a look at a common G-code command: G1. This fundamental command instructs the print head to move in a straight line from one point to another. The syntax of this command typically involves specifying the target coordinates and, optionally, the desired speed.

It looks something like this in the actual G-code file:

G1 F300 X50 Y30 Z0.2

In this example, the G1 command directs the 3D printer to move to the position X=50, Y=30, Z=0.2 at a speed of 300 units per minute.

The specific set of G-code commands available and their structure will vary depending on your printer’s firmware and G-code flavor. However, once you understand the basic principles of G-code, it becomes easier to recognize the functions of each G-code command and troubleshoot print failures.

What Are G-code Flavors?

A screenshot of the Creality Ender 3 slicer printer settings.
Oftentimes the firmware and the G-code flavor terms are used interchangeably

G-code flavors are the variations in G-code language used by different 3D printers. Not all printers understand G-code in the same way, and this variation is the reason behind the existence of different flavors.

Think of these flavors as regional accents. While the basic grammar remains the same, certain G-code commands, syntax, and functionalities may differ slightly between versions.

For instance, the M117 command in Marlin G-code flavor outputs an LCD message. But, if you want the same code to work in Klipper 3D printer firmware, you will also need to configure a 3D printer display code. Likewise, the M205 command is interpreted differently by different code flavors.

These different flavors ensure compatibility with specific hardware configurations and different firmware variations. There’s an entire G-code Wiki that explains the function of each G-code command in 3D printing, along what it does in combination with different G-code flavors.

Is There a ‘Best’ Flavor?

Screenshot of Klipper's extended G-codes functionality.
You’ll find that there’s no universal G-code flavor that works for everything.

There’s no single ‘best’ G-code flavor that works universally in all 3D printers. The ideal choice of G-code flavor depends on your specific printer and firmware combination.

Different 3D printers and their corresponding firmware are designed with certain capabilities and limitations in mind, which can affect how they interpret and execute G-code instructions.

For example, some printers may be optimized for precision and speed, requiring G-codes that allow for intricate control of movements and temperatures. Others might prioritize ease of use and compatibility, favoring a more standardized or simplified set of G-code commands.

How Do You Tell Which Flavor Your 3D Printer Uses?

A screenshot of Marlin G-code flavor in Notepad++
You can often identify the Gcode flavor of your 3D printer with one of the included .gcode files and a text editor.

You can easily tell your 3D printer’s correct G-code flavor by looking over the printer documentation, user manual, or on the manufacturer’s website.

The G-code flavor is also usually mentioned in G-code files that are supplied with the 3D printing machine. To find out the Gcode flavor, simply open the G-code file in a text editor such as Notepad++ and search for the term “flavor”.

Another way to identify the G-code flavor is by referring to the printer’s documentation or the manufacturer’s website for controller board specifications. Usually, the controller board determines the G-code flavor of the printer.

For example, printers that use Duet Motherboards usually run on RepRap firmware and use the same G-code flavor. Likewise, if your printer uses a Smoothieboard, it’s likely running the Smoothie flavor.

Which Flavor G-code Do You Need For…

Below are tables showcasing some popular 3D printers and common controller boards, along with their preferred G-code languages.

Popular 3D Printers

3D Printer Brand G-code Flavor
Creality Marlin
Anycubic Marlin
Prusa Research Prusa (Customized Marlin)
Artillery Marlin
Sovol Marlin
Ultimaker UltiG-code
Voron Klipper

Controller Boards

Printer Board Brand G-code Flavor
Duet RepRap (Duet3D)
Smoothie Smoothieware
SKR (Bigtreetech) Marlin
EinsyRambo (Prusa) Prusa (Customized Marlin)
MKS (Makerbase) Marlin
RAMPS Repetier-Firmware

You can use these tables as a quick reference to help you identify the G-code flavor of your 3D printer and controller boards. Keep in mind that not necessarily all Creality, Prusa, Sovol, and other brands listed above use Marlin firmware.

These manufacturers have recently started to release their own 3D printers with Klipper firmware. Therefore it’s always a good idea to check the 3D printer’s documentation for the G-code flavor it uses, as opposed to base it on the brand alone.

How To Set the G-Code Flavor in…

Configuring the G-code flavor for your 3D printer is a crucial step to ensure it understands the specific G-code commands generated by the slicer software. Below are simple instructions for setting the G-code flavors in some of the popular slicing software.

Setting G-code Flavor in Cura

Screenshot of setting the G-code flavor in Cura slicer

  1. Open Cura.
  2. Go to Preferences > Printers > Select your Printer > Machine Settings.
  3. Open Cura Machine settings, and you can find the G-code flavor option under the Printer tab.
  4. Click on it and choose the suitable G-code flavor for your 3D printer.
  5. You can use the same process while adding a custom 3D printer as well.

Setting G-code Flavor in PrusaSlicer

Screenshot of setting the G-code flavor in PrusaSlicer

  1. Open PrusaSlicer
  2. Open the print settings.
  3. In the General tab, go to the Firmware section.
  4. Click on the G-code flavor to open a dropdown menu.
  5. Select the correct G-code flavor as per the printer’s specifications.
Notification icon
If you are using Cura or PrusaSlicer, you don’t always need to know your printer’s G-code flavor. Both these slicers have plenty of pre-configured 3D printer profiles, which automatically select the right flavor.

Conclusion

The G-code flavor is often one of the most overlooked elements in 3D printing. Understanding this “language” of your 3D printer and setting the correct one in the slicer’s printer settings ensures that all commands are executed as they should. It allows for better control of certain functions, helps execute custom instructions, and avoids potential print failure.

There’s also no one-size-fits-all approach when it comes to the topic of G-code flavors. Like every language, every flavor has its nuances, and you can’t really compare them with each other.

Remember to go through your printer’s specifications, and you can quickly get an idea of the G-code flavor it’s using. The RepRap Wiki linked above has a comprehensive list of all the flavors used by 3D printers, which can be helpful if you want to deep dive into understanding each step.

Go ahead and explore the world of G-code flavors, and let us know how your adventure goes!

Author image
Pranav is a skilled content creator specializing in 3D printing, holding a Bachelor's degree in Mechanical Engineering from Sinhgad Institute of Technology. His work stands out for blending technical precision with accessible, clear explanations, making complex topics understandable and encouraging exploration and experimentation with innovative techniques.

Leave a Comment

Comments are moderated on a ~24-48 hour cycle. There will be some delay after submitting a comment. Your email address will not be published.