What Are the M105 & M155 G-Codes? (Detailed Explanation)

It’s undeniable that writing code is much less user-friendly than using a graphical interface where things are a lot more clearer. As a result, if you don’t have any experience with G-codes, learning about them may feel slightly intimidating.

Fortunately, most G-codes aren’t as complex as they look from the outside, making it possible to learn how to use them in a relatively short amount of time, even if you have no prior experience.

Today, we are back with a few more G-codes that we believe are vital for every 3D printing enthusiast to know. The G-codes we will be talking about in this article will be temperature-related, a factor that can easily make or break the quality of a print.

So, what are the M105 and M155 G-codes?

  • M105 (Report Temperatures) – Displays a detailed report of all the temperatures of the parts of the 3D printer.
  • M155 (Temperature Auto-Report) – Allows you to receive a detailed report of the temperatures regularly, where the frequency depends on the interval you have specified.

Alongside the primary functionality we have just mentioned, there are extra parameters you can use with these G-codes to extend their functionality.

Moving on, we will be taking a deeper look into these G-codes, including the extra parameters they offer.

M105 G-Code (Report Temperatures)

The M105 G-code is the primary way of getting detailed information about the temperatures of the 3D printer.

Sending the M105 command to the printer causes the printer to display an extensive report of all the temperatures, such as the hotend temperature, the heated bed temperature, and many more.

As the M105 command requires no parameters, all you have to input is:

M105

Here is an example report you will receive as a result of running this command:

ok T:190 /210 T0:90 /100 T1:80/150 B:80 /50 C:28 /50

To understand what the report tells us in a better way, let’s take a look at each of the elements one by one.

  • T:190 /210 – The letter T refers to the extruder temperature, which is 190 in this example. The value after the / is the target temperature, 210 degrees.
  • T0:90 /100 T0 refers to the first extruder of a multi-extruder printer, and it won’t be reported for single-extruder setups. In this case, the temperature is 90, and the target is 100 degrees.
  • T1:80/150 T1 refers to the second extruder of a multi-extruder printer. The amount of T values that the command will produce depends on the number of extruders. In this case, the temperature is 80, and the target is 150.
  • B:80 /50 – The letter B refers to bed temperature, which is 80, with a target of 50 degrees.
  • C:28 /50 – The letter C refers to chamber temperature, which is 28 degrees in this example, with a target of 50 degrees.

While the report may produce more or fewer parameters depending on the firmware, you should expect the parameters above with most of the widely used 3D printer firmware.

For the most part, you can use the general form below to parse an M105 report.

That being said, as the exact syntax can differ between firmware, you will most likely need to perform slight adjustments on your parser to accommodate for these differences.

<parameter>:<current_temperature>/<target_temperature>

OR

<parameter>:<current_temperature> /<target_temperature>

As you can see above, a great example of the difference in syntax is that while some printers insert a space between the current temperature and the /, some don’t.

Finally, here are some extra parameters that only some firmware produce, which you may see in your report if your firmware supports them.

  • @ (Hotend Power) – The amount of power that the hotend is currently using. Unlike temperature values, this parameter doesn’t have a target. Example -> @:20
  • B@ (Bed Power) – The amount of power that the heated bed is currently using. Unlike temperature values, this parameter doesn’t have a target. Example -> B@:30
  • P (Prusa PINDAv2 Temperature) – Temperature of the PINDAv2 sensor, which is only available in some Prusa printers.
  • A (Prusa Ambient Temperature) – Ambient temperature of the printer. Available only for Prusa MK3.

Next up, we will be talking about the M155 command.

M155 G-Code (Temperature Auto-Report)

The M155 G-code is the best way to check the temperatures frequently as it automates the reporting of temperatures.

When you use the M155 G-code with the interval of your choice, the printer will send temperature reports with each iteration until you disable it.

While the output you will get from M155 is the same as the output from M105, using this command is the recommended way of requesting regular temperature reports instead of polling with M105.

Here is an example of how you can use the M155 G-code:

M155 S60

The S flag is the only one the M155 command accepts, which refers to the interval in seconds.

As a result of running this command, your printer will display a temperature report every 60 seconds until you disable it.

Disabling the auto-report is also done with the M155 command, but by sending 0 for the value of the S flag:

M155 S0

As temperatures can fluctuate over time, it’s usually a better idea to use the M155 command with a short interval over M105 to keep track of the temperatures at all times and stay on top of the printing process.

Wrapping Up

Using these temperature-related G-codes is the quickest way to set the temperatures of the various parts of your 3D printer and get detailed information about the temperatures any time you wish to.

While some G-codes are a lot more complex with the number of parameters they require, the G-codes we have talked about today should be pretty simple to execute, even for a complete beginner.

We will be sharing detailed explanations of more and more G-codes in the upcoming articles, as there are plenty more that we believe will be very helpful for most 3D printing enthusiasts.

Stay tuned!