M142 P1 R35 S40 Gcode explained (X1C Chamber Fan Behavior)

This topic is to explain the M142 P1 R35 S40 line that is in in the machine_start_code TWICE and the filament start code ONCE.

Backstory: Brand new X1C was not turning on chamber fan automatically after updating to latest firmware (01.08.02) despite bed temp being >55 and using PLA. I discovered, through trial and error, that the M142 P1 R35 S40 line, which was located in the three before-mentioned places, had something to do with it.

Issue: Chamber fan not turning on automatically

Experiment: When I removed the line entirely from all three places, the behavior of the chamber fan was like the old days (two firmwares ago). Then I played around more. I changed the RXX (“R35” default), and found it represented chamber temp. If my chamber temp was below, the fans wouldn’t turn on and if it was above, the fan would turn on, give the rest of the start code (bed temp parameter “>55”) was met. HOWEVER, I found then that the chamber fan would turn on in increments as the chamber temp rose. This confirmed my suspicions that the M142 part of the line was a firmware reference. It’s a type of code used to reference an internal firmware line or set of lines and activate them, which explains the differing behavior between removing the line completely and changing the chamber temp (RXX/R35).

Summary:

Two firmwares ago, this code didn’t exist and what it referred to didn’t exist, and without it’s reference the chamber fan would start at 60-70% right at the time of reaching the set temp. However, now that the code exists, it aims for a 35 degree (“R35”) chamber temp. You have three options: 1) Leave as is, 2) Remove the M142 line entirely, or 3) or set a different temp for the RXX (default R35) figure. If you set a different temp for the RXX figure, it will incrementally increase chamber fan speed after reaching the desired temp at different, unspecified stages of the chamber temp. This means it’s controlled at this level 100% by firmware. If you want to not use this at all, and have the fan on from get-go (set BED temp [55 by default]), just delete or comment out line.

NOTE: The P1S has this code too. However, it is N/A for the P1S since the P1S has no chamber sensor.

Code breakdown:

M142 P1 R35 S40

M142: Firmware node reference and activation

P1: Parts cooling fan (presence to activate to aid cooling hotend)

R35: Set Chamber Temp

S40: Speed of fan

3 Likes

More info. Official reply from Bambu:
“ Thank you for your feedback.It means that the fan speed is no longer set according to the bed temperature, but is dynamically adjusted according to the actual chamber temperature”

1 Like

Defining S as the ‘speed of fan’ doesn’t make sense. Without an active heater, doesn’t the fan speed need to be dyamically varied to maintain a target temperture?
Is it actually a “minumum” fan speed?
That is, to ensure a negative chamber pressure and that the activated charcoal filter is used to reduce VOCs?
And is the range?
0-255 = 0-100% fan speed?

Also, isn’t P3 the chamber fan?

1 Like

The S placement is confusing but from what I can tell, it means the minimum speed that the parts ran should be on for the conditions outlined. P1 is the parts fan in every case with Bambu.

Yes, but we are talking about a hierarchy of things.

Additionally, the P3 speed is varied, but as the result of the firmware code we can’t see.