ceo@instrumentationblog.in
PLC · How It Works

How PLC Analog Input Scaling Works

Move the input current, the transmitter range and the raw count the card gives at 20 mA. Watch the card convert the current to a raw count, the scaling block turn it into bar and the status change when the signal leaves the normal range.

Live animationAdjustable slidersFormula and example

Quick answer: A PLC analog input card converts the 4 to 20 mA current into an integer called the raw count. The program then scales that count with a straight line equation into engineering units such as bar, °C or m³/h.

What Is a PLC Analog Input Scaling?

A PLC cannot use milliamps directly. The analog input card measures the current across a small resistor, converts it with an analog to digital converter and stores the result as a whole number in a word of memory.

Each card maps its signal range to a fixed count range set by the manufacturer and the card settings. The program must know both ends of that count range and both ends of the transmitter range to calculate the real value.

Most analog problems on commissioning are scaling errors: the wrong count range, the wrong transmitter range or a missing check for wire break. A clear picture of the straight line behind scaling makes them quick to find.

Advertisement

How PLC Analog Input Scaling Works: Interactive Animation

Numbered markers match the parts list below.
Raw count…
Scaled value…
Resolution (value per count)…
Signal status (NAMUR NE 43)…
  1. 1Transmitter sending 4 to 20 mA
  2. 2Input shunt resistor on the card
  3. 3ADC sampling the voltage
  4. 4Raw count stored in an input word
  5. 5Scaling block (straight line equation)
  6. 6Engineering value on the HMI
  7. 7Scaling line from raw count to bar

PLC Analog Input Scaling Working Principle Step by Step

  1. The transmitter sends a current between 4 and 20 mA that is proportional to the process value.
  2. The card passes the current through a shunt resistor, producing a small voltage.
  3. The ADC samples that voltage and the card stores it as a raw count, with 4 mA at the low count and 20 mA at the high count.
  4. The scaling block in the program uses the straight line equation to convert the raw count into engineering units.
  5. The program checks the current or count against limits to flag under range, over range and wire break before using the value.

PLC Analog Input Scaling Labelled Diagram

Labelled diagram showing how plc analog input scaling works
Numbered parts: 1 transmitter sending 4 to 20 ma; 2 input shunt resistor on the card; 3 adc sampling the voltage; 4 raw count stored in an input word; 5 scaling block (straight line equation); 6 engineering value on the hmi; 7 scaling line from raw count to bar.
Advertisement

PLC Analog Input Scaling Formula

Value = EU low + (raw − raw low) × (EU high − EU low) ÷ (raw high − raw low)
Raw count = raw low + (I − 4) ÷ 16 × (raw high − raw low)
Resolution = (EU high − EU low) ÷ (raw high − raw low)
NAMUR NE 43: 3.8 to 20.5 mA is the measuring range; 3.6 mA or less and 21 mA or more signal a failure
Example: 12 mA, range 0 to 10 bar, raw 0 to 32000: raw = (12 − 4) ÷ 16 × 32000 = 16000; value = 16000 × 10 ÷ 32000 = 5.000 bar; resolution about 0.00031 bar per count

Main Parts of a PLC Analog Input Scaling

PartWhat it does
Shunt resistorConverts the loop current into a voltage the card can measure
ADCConverts the voltage into a binary number, usually with 12 to 16 bits of resolution
Input filterSmooths noise by averaging samples, adding a small delay
Input wordMemory location where the raw count is stored for the program
Scaling blockProgram instruction or function that turns the count into engineering units and checks limits

Where a PLC Analog Input Scaling Is Used

Pressure and level transmittersTurn 4 to 20 mA from field transmitters into bar, metres or percent.
Temperature transmittersScale a head mounted transmitter signal into °C.
Flow measurementConvert flow transmitter signals into m³/h for control and totalising.
Wire break alarmsUse the raw count below the 4 mA value to detect an open loop.

Advantages

  • Simple straight line math, easy to check by hand
  • Raw count range and engineering range are set independently
  • Allows under range and wire break detection from the same signal

Limitations

  • Wrong count range or transmitter range gives a wrong value with no alarm
  • Card resolution and filtering limit the finest change you can see
  • Non linear signals such as square root flow need an extra step

PLC Analog Input Scaling Field Tips and Common Problems

  • Check the card manual for the raw count at 4 mA and 20 mA for the range you selected; it differs between cards and settings.
  • Make sure the engineering range in the PLC matches the range configured in the transmitter.
  • Inject 4, 12 and 20 mA with a loop calibrator and confirm 0, 50 and 100 % on the HMI during loop checks.
  • Alarm on current below 3.6 mA or above 21 mA so a broken wire or failed transmitter is not read as a real value.
Advertisement

Related Calculators and Tools

Frequently Asked Questions

What is a raw count in a PLC?

It is the integer the analog card writes to memory after converting the signal. Its range, such as 0 to 32000, depends on the card and its settings.

Why does my PLC show a negative value?

The current is below 4 mA, so the raw count is below the 4 mA count. Check for a wire break, a failed transmitter or a wrong card range.

How do I scale a 4 to 20 mA signal?

Use the straight line equation from the raw count at 4 mA and 20 mA to the transmitter range low and high. The formula and example on this page show the steps.

What is the resolution of an analog input?

It is the smallest change in value that one count represents, equal to the engineering span divided by the number of counts.

You May Also Like

Learn more on the blog

PLC analog scaling and raw count

A practical guide on instrumentationblog.in that goes deeper into this topic with field examples.

Read Full Article

More How It Works

All How It Works animations · Instrumentation glossary · Comparisons

Advertisement