Fix negative thermocouple readings shown as large positive HMI values

8 min read · Published November 14, 2026

Below freezing a BCD thermocouple module sets one bit of the data word as the minus sign, so the screen counts the bit as data and shows 8020 or 32800 for 20 degrees of frost. Mask the sign bit, convert the magnitude with BIN then BTOR, subtract the real from zero when the bit is on, and give the screen a signed real in its own register.

A thermocouple input set to BCD hands the PLC a magnitude plus a sign bit, not a signed number. Below freezing the module sets one bit in the data word. Any reader that treats the word as a number, screen tag or alarm compare alike, counts that bit as ordinary data. The repair belongs in the ladder of the PLC: isolate the sign bit, convert the magnitude with BIN and then BTOR, subtract the real magnitude from zero when the bit is on, and store the signed real in a register of its own for the screen to read. This page sorts the symptoms, builds the conversion rung, works one example at 20 degrees below zero on the Fahrenheit scale, and lists the checks that prove both signs before a freeze alarm goes back on watch.

Why does the HMI show a huge positive number below freezing?

The module stores magnitude plus sign. Below freezing it sets the most significant bit of the 16-bit data word, and the screen reads the whole word as a number. So 20 degrees of frost arrives as 8020 in BCD digits or 32800 as an unsigned value.

The behaviour is documented in the module's data-format chapter. The channel can be set for two's complement binary or for magnitude plus sign, and in magnitude plus sign form the most significant bit of the data word is set whenever the temperature is negative. Your channel is set for BCD magnitude plus sign, the usual choice when the rest of the program already speaks BCD. The magnitude digits are good data: read them on their own and you have the temperature exactly as the module measured it. What no screen tag and no raw-word comparison knows is which bit is only a sign.

A sub-zero reading is a normal event for the sensor, too. A type K junction reads from about -200 to +1250 °C (-328 to +2282 °F) across its standard range, so an outside wall in a hard winter sits nowhere near its bottom limit.

How do I tell whether the bad value starts in the PLC or on the screen?

Watch the raw word and the screen at one sub-zero reading. If the magnitude digits in the raw word match the temperature and only the sign is misread, the PLC needs the conversion and the screen is fine as soon as it gets a signed real.

  • Correct above freezing, garbage below: sign handling is missing, and the ladder conversion in the next two sections is the fix.
  • A screen value just over 32768, such as 32800 for 20 degrees of frost: the tag reads the word as an unsigned 16-bit integer. The sign bit contributes 32768, and the magnitude digits 0020 BCD count as 32 in plain binary.
  • Digits that start with 8, such as 8020: the tag format is BCD, and the sign bit lands in the first digit position.
  • Wrong at every temperature, positive readings included: look at the channel configuration, the scaling and the thermocouple wiring first. Check the thermocouple type selection and polarity at the module before building any conversion.
  • The raw word and its sign bit look right while the screen stays wrong: the tag is still aimed at the old word. Aim it at the new signed real register.

A screen fed a word in a format it was never told about is a failure of its own: an HMI that shows large positive numbers until the signed decimal data format is set covers that side of the same symptom.

Where is the sign bit in the module's data word?

The module manual's data-format table has it. The magnitude sits in the BCD digits and the minus sign is the most significant bit of the channel's data word, set when the temperature is negative.

The same chapter offers the two formats, and the manual's I/O map lists each channel's data word address. On a 16-bit word the sign is the most significant bit, bit 15. Check it live before you build anything: at a sub-zero reading, watch the word and watch that bit together, then warm the sensor above freezing and watch the bit clear. One test, and it separates a sign-interpretation problem from a channel-data problem.

Take the bit position from this module's chapter. Module families differ, and some carry a separate polarity bit for each channel instead of using the top bit of the word, so a position borrowed from another card garbles the digits. The same split catches other bipolar inputs too: an HMI that loses the sign on bipolar RTD temperatures trips over the identical representation.

How do I convert the BCD magnitude to a signed real in the ladder?

Convert the magnitude with two instructions and apply the sign with one subtraction. BIN turns the BCD digits into binary, BTOR turns the binary into a real, and when the sign bit is on you compute 0.0 minus the real magnitude.

  1. Copy the channel's data word into a work register. Leave the raw word untouched so it stays available for troubleshooting.
  2. Mask the work register down to the magnitude digits, dropping the sign bit.
  3. Bring the sign bit in as a discrete bit from the same data word.
  4. Run BIN on the masked magnitude, then BTOR on the binary result. The work register now holds the temperature as a real number of degrees.
  5. Under the sign bit as the permissive, subtract the real magnitude from zero and store the answer. When the bit is clear, store the magnitude as it stands.
  6. Keep the signed real in its own register and point the screen tag at it as a floating-point value.

Apply the sign exactly once. A screen that adds its own inversion or offset to the already-signed real turns -20.0 back into +20.0 or drifts it off again. The raw word keeps its original job as your window into the module, and the conversion never overwrites it.

Example: what does 20 °F below zero look like before and after the fix?

At an outside sensor reading 20 °F below zero with the module set to whole degrees, the raw word reads 8020 as BCD or 32800 as an unsigned integer. After BIN, BTOR and the sign subtraction the screen shows -20.0 °F.

Scenario: a heated shop building at a remote site, a type K thermocouple on the outside wall, the module scaled to whole degrees Fahrenheit and set for magnitude-plus-sign BCD, and a freeze alarm comparing temperature inside the PLC.

Step Value
True temperature -20 °F
Magnitude digits in the word 0020
Sign bit set, bit 15
Raw word 0x8020
Screen reads it as BCD digits 8020
Screen reads it as unsigned binary 32800 (32768 + 32)
BIN on the masked digits 20
BTOR on the binary value 20.0
Sign set, so 0.0 - 20.0 -20.0 °F on the screen

At +20 °F the same rung stores 20.0 with the sign bit clear. Positive values pass straight through, so test the cold side before you call the job done.

Can I fix the reading with screen scaling and leave the ladder alone?

No single scale and offset turns the raw word into the temperature. Mapping a raw 8020 to -20 °F and a raw 20 to +20 °F forces a slope of -0.005 °F per count and an offset of 20.1 °F, which reads 19.6 °F on a 100 °F day and drifts wrong everywhere in between.

The sign bit is data as far as the screen is concerned, and a scaled tag can only multiply and offset the number that arrives. Fit those two points and every temperature between them reads wrong, so a scaling fix that flatters one test reading lies about the rest.

One conversion in the PLC serves every reader of the temperature: the screen tag, the alarm comparison, a data log. Build it once in engineering units and nothing downstream needs to know how the module stores its sign.

There is one honest alternative. The module chapter offers two's complement as a data format; on a new program with nothing depending on the BCD words yet, switching the channel to two's complement and reading a signed integer can be the simpler build. On a program that already speaks BCD, the ladder conversion above is the smaller change.

Recommendation: Keep the channel in BCD and add the conversion rung when the program already uses those words: mask the sign bit, run BIN then BTOR on the magnitude, subtract from zero under the sign bit, and store the signed real in a fresh register that the screen reads as floating point. Choose the two's-complement format only for a new setup where no existing code depends on the BCD words.

How do I prove both signs before the freeze alarm goes back on watch?

Prove the fix with one sensor at two temperatures. Watch the raw word, the sign bit, the ladder real and the screen agree at a warm reading and again at a chilled reading, then trip the alarm from the signed value.

  1. Set a reference thermometer beside the sensor. On a whole-degree setup the screen and the reference should agree to within a degree at a warm reading.
  2. Chill the sensor below freezing. At a winter site, leave it outside for ten minutes; the sign bit should set and the screen should flip negative.
  3. Record all four values at both points: raw word, sign bit, ladder real, screen. They should tell the same story.
  4. Force the alarm comparison and watch it trip from the signed real. A compare left on the raw word reads 8020 or 32800 below zero and never trips a less-than alarm, so the watch dies exactly when the building needs it.
  5. Put the alarm back on watch only after step 4 passes.

Until step 4 passes, treat the freeze alarm as out of service and keep another watch on the buildings, because this failure mode is silence, not a false alarm.

Once the signed real exists, every reader can use it: the alarm compare, a log, and, where a workshop wall needs its own stand-alone status sign the controller drives directly, a large LED sign board for a shop floor.

Questions

Does the same conversion work if the module is set to tenths of a degree?

Yes. The magnitude digits simply carry one more digit, so a reading 20.0 degrees below zero holds 0200 instead of 0020. Run the same BIN and BTOR on the digits, divide the real by 10, then apply the sign step, or let the screen tag's decimal-place setting handle the point. The module's data-format table prints the scale in use, so read it once before you trust the decimal.

Do I need the sign logic on every thermocouple channel?

Only on channels that can genuinely read below freezing, but copying the rung for all four costs little and keeps every channel in the same format. Each channel has its own data word with the sign bit in the same position; the manual's I/O map lists the addresses. A channel that stays indoors all year simply keeps the sign bit clear, and the rung passes the magnitude through.

Why did the readings look correct all summer?

Positive temperatures leave the sign bit clear, so the word holds nothing but the magnitude digits and any reader sees an ordinary BCD number. The defect appears at the first sub-zero reading and stays invisible the rest of the year. Before freezing weather returns, chill one sensor, watch the raw word, the sign bit and the converted real together, and confirm the screen shows the negative value.

Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.

Keep reading

Build your signAsk for a quote