Skip to main content
Call Eric:863-698-8266
CURRYCONTROLS.COMControls & Automation Knowledge Hub

Instrumentation

Analog Raw Counts to Engineering Units

Convert between the raw integer an analog input card reports and the engineering value, in either direction, with the resolution per count.

Inputs

Results

Raw count
16,384.0
Engineering value
12.5004ft
Percent of span
50.00%
Equivalent current
12.0002mA
Resolution per count
0.0007630ft

The smallest change the card can represent. Filtering below this is meaningless.

Within the configured range
Yes

The arithmetic

  1. EU = ((16,384 - 0) / 32,767) x 25.000 + 0.000
  2. EU = 12.5004 ft

What this does not account for

  • There is no universal raw count range. Read it from the module manual, then confirm it by injecting 4 mA and 20 mA and observing the value online.
  • If the channel is configured for 0-20 mA but the loop is a 4-20 mA transmitter, the reading is 25% high at zero and the error shrinks toward full scale, which looks like calibration drift rather than a configuration error.
  • Clamp the scaled result and flag out-of-range raw values separately. Without clamping, a fault current produces a physically impossible engineering value that downstream logic will act on.

How this is calculated

Scaling a raw analog count to engineering units is a linear map: subtract the count at 4 mA, divide by the count span, multiply by the engineering span, and add the lower range value. The raw count range is specific to the module and must be read from its manual, then confirmed by injecting a known current.

Formulas

EU = ((Raw - Raw_min) / (Raw_max - Raw_min)) x (EU_max - EU_min) + EU_min

Assumptions built into this calculator

  • Linear analog input with the endpoints you enter.
  • Does not model card accuracy, linearity error, or drift.

Frequently asked questions

What raw value corresponds to 4 mA on my card?
It depends entirely on the module and its configuration. Read the manual and then verify by injection. Assuming a value is the most common cause of a scaling error.

Direct contact

Have a controls question?

Reach Eric Sullivan directly about anything on this site, a controls or automation topic, or one of his personal projects.