Skip to content

Slicer

Configuring Start G-code in the Slicer for Proper iHeater Operation

To ensure even heating and stable printing with technical materials, it is important to correctly arrange the command sequence in the start G-code. Below are recommendations for integrating the iHeater chamber heating into the start code of your slicer (e.g., Cura, PrusaSlicer, OrcaSlicer, etc.).

What Needs to Be Done

Before activating the chamber heating, you should:

Enable bed heating

Preheating the bed helps the chamber to heat more evenly and quickly. The bed acts as an additional heat source, promoting more efficient chamber heating.

M140 S[first_layer_bed_temperature]

Activate the air circulation fan (if used)

This could be a side fan or any other fan intended to distribute heat evenly within the chamber. If it is named chamber_fan in your Klipper configuration:

SET_FAN_SPEED FAN=chamber_fan SPEED=1.0
Some printers are equipped with exhaust fans that maintain the minimum possible temperature in the chamber. This is important when printing with materials such as PLA and PETG, but it hinders the speed of chamber heating. Such a fan can be assigned a new temperature parameter, for example, chamber_target_temperature + 10.

SET_TEMPERATURE_FAN_TARGET TEMPERATURE_FAN=chamber_fan TARGET={chamber_temperature + 10}

Start chamber heating using one of the macros: M141 or M191

Difference Between M141 and M191

Macro Purpose Does It Block Code Execution?
M141 Sets the target chamber temperature No (heating begins, but printing continues immediately)
M191 Sets the chamber temperature and waits until it reaches the set value Yes (next command runs only after chamber reaches set temp)

Examples:

  • If you want to start chamber heating immediately and perform all initial operations in parallel with the heating, then continue printing without waiting for the chamber to fully heat up, use the following. This works well for plastics like ABS and large models - the chamber will have time to heat up during the first few layers:
M141 S60
  • If you are printing a small part or require a stable chamber temperature (e.g., when printing PA, PC, and other sensitive materials), it's better to use the command that waits for the chamber to heat up:
M191 S60

After Chamber Heating

After calling one of the macros (M141 or M191), you can proceed with the usual start G-code:

M190 S[first_layer_bed_temperature]  Wait for bed to heat
M109 S[first_layer_temperature]  Wait for hotend to heat
G28  Homing
G29  (if auto-leveling is used)
...

Recommendations

  • If using M191, you can define a small offset at which the chamber is considered sufficiently heated (e.g., 5°C below target) - this is set in the [gcode_macro CHAMBER_VARS] macro variable_start_offset.
  • Make sure that all macros used (M141, M191) are included and correctly configured in your Klipper setup.
  • If your slicer supports conditions, you can add a check - for example, only activate the chamber if the print temperature exceeds 50°C (for ABS, ASA, etc.).

Setting Chamber Temperature in the Slicer

Slicer_settings

Many modern slicers allow you to specify the desired chamber temperature directly in the filament profile. This value is convenient to use as the S parameter for the M141 or M191 macros.

The screenshot shows the "Chamber temperature" field with a value of 60°C. This is just a numerical value - not all slicers actually send a command to heat the chamber. To ensure the temperature is applied, you need to check the G-code generated by the slicer and include commands in the start G-code if necessary:

M141 S{chamber_temperature}

or

M191 S{chamber_temperature}

Also, make sure the variable chamber_temperature is defined in the slicer's settings, or replace it with a number manually.

If the "Activate temperature control" option is enabled, some slicers automatically add an M191 command with the specified temperature. This is convenient if you want the chamber to heat up with a wait before printing.

Manual control via macros is recommended to maintain full control over the heating logic and sequence of operations.