Automation Glossary • Raw Count to EU Conversion

How Does Raw Count to Engineering Unit Conversion Work?

Merobix Engineering • • 7 min read

A PLC analog input does not see pressure or temperature; it sees a whole number produced by an analog-to-digital converter. Turning that raw count into a value an operator can read is a small piece of arithmetic done millions of times a day across a plant. This guide focuses specifically on the raw-count side of engineering-units scaling: what an ADC count is, how the two-point line equation maps a count range onto an engineering range, where that math lives, and the resolution pitfalls that trip people up.

Back to Blog

Raw Count to EU Conversion in one line: Raw count to engineering unit conversion is the linear mapping that turns a PLC analog input's raw ADC count, such as a value from 0 to 4095 or 0 to 32767, into a real-world engineering unit like psi or degrees. It works by anchoring two known count-to-unit pairs and drawing a straight line between them, so any count in between converts proportionally to its engineering value.

Where Raw Counts Come From

An analog input channel receives a signal, commonly a 4-to-20 milliamp current or a voltage, that is proportional to the measured quantity. Inside the module an analog-to-digital converter samples that signal and reports it as an integer count. The size of that integer depends on the converter's resolution: a 12-bit converter produces counts across a range of 0 to 4095, while a 16-bit converter spans a much wider range such as 0 to 32767 for a signed value. The count itself is just a number proportional to the input; it carries no units and means nothing until it is scaled.

The mapping from count to signal is fixed by the hardware, so a particular current lands at a particular count. What varies is where the useful measurement range falls within the count span. If a channel is configured for 4-to-20 mA, the bottom of the live range, 4 mA, corresponds to some count above zero, and 20 mA corresponds to a count near the top, with the counts below the 4 mA point acting as headroom that can reveal a broken wire. Knowing those endpoint counts is the starting material for conversion.

The key mental model is that everything between the endpoints is linear. Because the converter responds proportionally, doubling the input roughly doubles the count within the live range, so a straight line connects the low count to the high count. That linearity is what lets the conversion be captured by two anchor points and a line, rather than a lookup table, and it is the foundation the arithmetic in the next section rests on.

The Two-Point Line Equation

Converting a count to an engineering value is the classic problem of finding a straight line through two known points. You know two count-to-unit pairs: the low count and the engineering value it represents, and the high count and its engineering value. From those you can compute the line that passes through both, and then plug in any count to get its unit value. The whole conversion is nothing more than that line evaluated at the current count.

Concretely, the span of engineering units divided by the span of counts gives the value each single count is worth, which is the line's slope. Multiplying a raw count's distance above the low count by that per-count value, then adding the low engineering value, yields the reading. For example, if a pressure transmitter maps its live count range onto 0 to 150 psi, the engineering span of 150 spread across the count span tells you how much pressure each count represents, and any count converts by scaling from the low anchor. This is the same idea as engineering-units scaling in general, viewed from the raw-count end where the actual numbers get plugged in.

The two-point form is popular precisely because it is defined by things you can read off a datasheet or a range setting rather than by an abstract slope and intercept. You supply the raw low, raw high, engineering low, and engineering high, and the controller derives the line. It also generalizes cleanly: the same equation handles a range that does not start at zero, an inverted signal where the engineering value falls as the count rises, and any linear sensor, all by changing the four anchor numbers rather than the logic.

Where the Scaling Lives and Its Pitfalls in a SCADA Chain

The raw-count conversion can happen in more than one place along a SCADA data path. Often it is done in the PLC or RTU that reads the channel, so the controller already holds a value in engineering units. Sometimes the raw count is passed upward and scaled in the SCADA layer or historian instead. Either is valid, but the whole chain must agree on where it happens, because a value scaled once at the controller and then scaled again upstream is doubly converted and badly wrong. In a cloud SCADA such as Merobix, knowing whether an incoming point is already in engineering units or still a raw count is part of configuring it correctly.

The most common pitfall is a mismatch between the count range used in the math and the converter's actual resolution. If the scaling assumes a 12-bit range of 0 to 4095 but the module actually delivers a 16-bit range, or vice versa, every reading comes out proportionally off, and it does so silently because the value still tracks real changes. This is the same failure mode as any mis-scaling: the number looks plausible, trends sensibly, and can even satisfy alarm limits while being consistently wrong. It rarely announces itself.

The defenses are the same discipline that guards all scaling. Use the endpoint counts that match the hardware and the range configured on the transmitter, confirm which resolution the module reports, and verify a converted reading against a known physical condition such as a gauged pressure or a measured level. Keeping the raw count visible alongside the engineering value, which a monitoring platform can do, makes diagnosis far easier: if the count looks right but the engineering value does not, the scaling parameters are the suspect, and the arithmetic can be checked directly against the two anchor points.

Frequently Asked Questions

What is a raw count on an analog input?

A raw count is the integer an analog-to-digital converter produces to represent the signal on an analog input channel. Its range depends on the converter's resolution, so a 12-bit converter gives counts from 0 to 4095 while a 16-bit one spans a wider range. The count is proportional to the input current or voltage but carries no units, so it must be scaled to an engineering value to be meaningful.

How do I convert 12-bit counts to engineering units?

Identify the raw count at the low end of your measurement range and the count at the high end, along with the engineering values those ends represent, then draw a straight line between them. The engineering span divided by the count span gives the value of each count, which you scale from the low anchor to convert any count. For a 12-bit input the count span runs across 0 to 4095, though the live range for a 4-to-20 mA signal sits within that.

Why does the wrong count range produce wrong values?

If the scaling arithmetic assumes a different count range than the converter actually uses, for example treating a 16-bit reading as if it were 12-bit, every converted value comes out proportionally off. The trouble is that it fails silently: the reading still moves with the real measurement, so it looks plausible and can pass a casual check. Matching the count range to the module's true resolution, and verifying against a known value, prevents it.

From Definitions to a Live Dashboard

Merobix reads your field devices into a cloud SCADA - the real thing behind these terms, live in days from any browser.

Request a Free Demo +1 (903) 307-7300
More in Automation Glossary
Scaling Factor and Offset  •  Reasonability Range Check  •  Word Swap and Byte Swap  •  Tiered Historian Retention  •  Historian Storage Sizing  •  Raw vs Aggregate Retention  •  All Automation Glossary →
Free SCADA operator training
Merobix University - 70 video lessons & 261 quiz questions, from first login to compliance reporting. No demo call required.
Start free →