Home » Raw Counts to Engineering Units : Conversion Formula
Formulas PLC Tutorials

Raw Counts to Engineering Units : Conversion Formula

We need to convert sensor raw counts to engineering units in a PLC system.

Convert Raw Counts to Engineering Units

Convert Raw Counts to Engineering Units

We have a sensor which gives a raw value input of the range 4000 to 20000. We need the sensor value in a output scaled range of 0 to 1450. Find a formula that will allow to calculate the scaled value from the raw one.

I’ll make up an example: I get a raw reading of 12456 from the sensor. How do we convert that to a scaled output value?


We have an elevated Zero (4000 = 0 Units) so you need to subtract that from the 12456 to start with. The span of your sensor 0 to 1450 units = 16000 (20000 – 4000).

Once the zero is taken care of it’s a simple percentage or ratio calculation.

((Raw Reading – 4000)/16000) x 1450 = Value

(12456 – 4000) = 8456

8456 / 16000 = 0.5285 i.e your reading is 52.85% of the 1450

0.5285 x 1450 = 766.325 units

another way to visualize it.

0% = 4000
25% = 8000
50% = 12000
75% = 16000
100% = 20000

To go from units to the raw value would be the same except you’d need to add the zero (4000) to the ratio.

What would raw value of 725 units be?

((725/1450) x 16000) + 4000

725/1450 = 0.5
0.5 x 16000 = 8000
8000 + 4000 = 12000

Hopefully now you can solve your raw counts calculations using the above formula.

Spare some time to evaluate your skills on the raw count calculations. Using the above example, find-out scaled output for the following raw counts : 15750, 35780, 6854, 24758. You can share the answers using below comments section.

Do you have any other similar formula for the conversion ? Share with us.

Articles You May Like :

Why 4-20mA Standard is so popular ?

Scaling Sensor Output to Engineering Units

Raw Count Calculation for Pressure Transmitter

Similar Articles:

Related Articles

PLC Example with Switches

S Bharadwaj Reddy

Input-Output Relationships of Transmitters

S Bharadwaj Reddy

PLC Program for Food Processing Industry

S Bharadwaj Reddy

Contacts and Coils in PLC Ladder Logic

S Bharadwaj Reddy

Closed Tank Remote Seal Capillary type DP Transmitter

S Bharadwaj Reddy

Calculate Process Variable from Transmitter Current

S Bharadwaj Reddy

1 comment

Krish December 2, 2018 at 4:53 pm

Here is a typical example where a pressure sensor is used to measure 0-500 PSI and the output is 1-5Vdc.

First, using the Y=MX+B formula, we determine what each value is in order to calculate for Y.

X = 4 (since 1-5V has a span of 4 volts. If it was a 0-10Vdc output, X would be 10)

M = 125 (use divide the Units by the Voltage or Current – 0-500/1-5 = 125) which results in PSI/Volts

B = -125 ( since the output starts at 1 volt, there is an offset. We calculated a value of 125 PSI/Volt, therefore, 1V = -125) If the output of the sensor was 0-5Vdc, then there would be no offset.

To test that the values are correct, put them in the equation. 5 volts out should give us 500PSI and 1 volt out should give us 0 PSI.

Y=125(5) + (-125) = 500PSI
Y=125(1) + (-125) = 0 PSI


Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

WordPress Image Lightbox