May 7, 2026

Calculation of RAW count for Pressure Transmitter in PLC Programming

Introduction

In industrial automation and process control systems, pressure transmitters play a critical role in monitoring and controlling processes such as fluid flow, tank levels, hydraulic systems, steam lines, pneumatic systems, and chemical processing. A pressure transmitter converts physical pressure into an electrical signal that can be interpreted by a PLC (Programmable Logic Controller), SCADA system, or DCS (Distributed Control System).

 

 

One of the most important concepts in PLC programming and instrumentation is Raw Count Calculation. PLCs do not directly understand engineering units such as bar, psi, MPa, or kg/cm². Instead, the PLC receives a numerical value called a raw count from the analog input module. This raw count must be mathematically converted into engineering units so operators and control systems can correctly interpret the process pressure.

Understanding raw count calculation is essential for:

PLC programmers

Instrumentation engineers

Maintenance engineers

Automation technicians

SCADA developers

Control panel designers

This document explains the concept of PLC raw counts for pressure transmitters in detail, including scaling formulas, analog signal conversion, practical examples, ladder logic concepts, troubleshooting methods, and industrial applications.

 

Understanding Pressure Transmitters

A pressure transmitter is an instrument that measures pressure and converts it into a proportional electrical signal.

Common output signals include:

Signal Type

Description

4–20 mA

Most widely used industrial analog signal

0–10 V

Voltage-based analog signal

1–5 V

Derived from 4–20 mA using resistor

Digital Communication

HART, Modbus, Profibus, Ethernet/IP

 

The most common signal used in industries is:

4–20 mA Analog Signal

In a 4–20 mA system:

4 mA represents the minimum pressure

20 mA represents the maximum pressure

Example:

Pressure

Output Current

0 bar

4 mA

10 bar

20 mA

This relationship is linear.

 

Why PLC Uses Raw Counts

A PLC analog input module cannot directly process current values like 4 mA or 20 mA. Instead, the module converts the analog signal into a digital value using an Analog-to-Digital Converter (ADC).

This digital value is called:

Raw Data

Raw Count

ADC Count

Digital Count

The PLC program then converts this raw value into actual engineering units.

 

Analog-to-Digital Conversion

The analog input module samples the incoming signal and converts it into binary data.

Example:

Current Signal

PLC Raw Count

4 mA

0

20 mA

32767

 

Some PLCs use:

PLC Brand

Typical Raw Range

Allen-Bradley

0–32767

Siemens

0–27648

Delta

0–4000

Mitsubishi

0–32000

Omron

0–4000

 

The raw count depends on the PLC manufacturer and analog module resolution.

 

Relationship Between Pressure and Raw Count

Pressure and raw count are directly proportional.

For a pressure transmitter:

Pressure

Current

Raw Count

0 bar

4 mA

0

10 bar

20 mA

32767

 

This creates a linear scaling relationship.

 

Linear Scaling Formula

The general scaling formula is:


Where:

Parameter

Meaning

Raw Count

Current PLC analog value

Raw Min

Minimum raw value

Raw Max

Maximum raw value

EU Min

Minimum engineering unit

EU Max

Maximum engineering unit

 

Example 1: Pressure Scaling Calculation

Given Data

Pressure transmitter range:

0 to 10 bar

Output: 4–20 mA

PLC raw range: 0–32767

Suppose PLC raw count = 16384

Find the pressure value.

 

Step-by-Step Calculation

Using the formula:

Simplifying:

Result:

Thus:

Raw count = 16384

Actual pressure ≈ 5 bar

 

Example 2: Siemens PLC Scaling

Siemens analog modules commonly use:

Signal

Raw Value

4 mA

0

20 mA

27648

 

Pressure range:

0–16 bar

Suppose raw count = 13824

Calculation:

Result:

 

Importance of Scaling in PLC

Scaling is necessary because operators cannot interpret raw counts directly.

Without scaling:

PLC may show meaningless numbers

SCADA displays become confusing

Alarm settings become incorrect

PID control becomes unstable

After scaling:

Raw Count

Actual Pressure

0

0 bar

16384

5 bar

32767

10 bar


Pressure Transmitter Calibration Range

Every transmitter has:

LRV (Lower Range Value)

URV (Upper Range Value)

Example:

Parameter

Value

LRV

0 bar

URV

10 bar

The transmitter linearly maps pressure into current.

4–20 mA Signal Calculation

To calculate current from pressure:

Example:

Pressure = 5 bar

Range = 0–10 bar

Calculation:

Result:

Thus:

5 bar = 12 mA

 

PLC Scaling Methods

PLC scaling can be performed using:

Method

Description

Mathematical Formula

Manual programming

SCP Instruction

Allen-Bradley Scale with Parameters

SCALE Block

Siemens scaling block

Function Block

Dedicated analog scaling FB

SCADA Scaling

Scaling inside HMI/SCADA

 

Allen-Bradley PLC Scaling

In Allen-Bradley PLCs, scaling is commonly done using:

SCP instruction

Compute instruction

CPT instruction

Example:

Input raw range:

0–32767

Engineering range:

0–10 bar

Formula:


Siemens PLC Scaling

Siemens provides standard instructions:

SCALE_X

NORM_X

NORM_X

Normalizes raw value into 0–1.

SCALE_X

Converts normalized value into engineering units.

 

Ladder Logic Concept

Basic PLC scaling process:

  1. Read analog input
  2. Store raw count
  3. Apply scaling formula
  4. Store engineering value
  5. Display on HMI

 

Example Ladder Logic Explanation

Suppose:

AI channel = IW64

Pressure range = 0–10 bar

Steps:

Read Analog Input

PLC reads:

IW64 = 16384

Apply Scaling

Program computes:

Pressure = (16384 × 10) / 32767

Output

Pressure = 5 bar

 

Importance in PID Control

Pressure scaling is critical for PID loops.

Incorrect scaling causes:

Oscillation

Unstable control

Wrong setpoint tracking

Valve hunting

Pump instability

Correct scaling ensures:

Accurate control

Stable process

Reliable operation

 

Real Industrial Applications

Pressure transmitter scaling is used in:

Industry

Application

Water Treatment

Pump pressure monitoring

Oil & Gas

Pipeline pressure

Food Industry

Tank pressure

Chemical Plants

Reactor pressure

HVAC

Air duct pressure

Power Plants

Steam pressure

Hydraulics

Hydraulic system monitoring

 

Differential Pressure Transmitter Scaling

Differential pressure transmitters measure pressure difference.

Applications:

Flow measurement

Filter monitoring

Tank level measurement

Example range:

-100 to +100 mbar

Scaling formula remains linear.

 

Negative Pressure Scaling

Some transmitters use negative ranges.

Example:

Pressure

Current

-1 bar

4 mA

+1 bar

20 mA

 

Scaling becomes:


Analog Input Resolution

Resolution determines accuracy.

Common resolutions:

Resolution

Counts

12-bit

4096

13-bit

8192

15-bit

32768

16-bit

65536


Higher resolution gives:

Better accuracy

Smoother readings

Improved PID control

 

Signal Noise Problems

Analog signals can contain noise due to:

Improper grounding

Electrical interference

VFD switching noise

Long cable runs

 

Effects:

Fluctuating pressure readings

Incorrect scaling

Unstable process control

 

Solutions:

Shielded cables

Proper grounding

Signal isolators

Analog filters

 

Open Circuit Detection

In 4–20 mA systems:

4 mA = minimum process value

Below 4 mA may indicate fault

Example:

Current

Condition

0 mA

Wire break

3 mA

Fault

4–20 mA

Normal

>20 mA

Over-range

PLCs can detect these faults using raw counts.

Over-Range and Under-Range

Industrial transmitters may exceed calibrated range.

Example:

Signal

Condition

22 mA

Over-range

3.5 mA

Under-range

PLC programs should include alarm logic.

Practical Example: Tank Pressure Monitoring

System Description

Pressure transmitter: 0–6 bar

PLC raw range: 0–27648

HMI displays pressure

Suppose raw count = 18432

Calculation:

Result:

Importance of Engineering Units

Engineering units provide meaningful interpretation.

Examples:

Raw Count

Engineering Unit

12000

Meaningless

4.5 bar

Useful


Operators always require engineering units.


Common PLC Scaling Errors

Incorrect Raw Range

Using wrong PLC raw values causes inaccurate readings.

Wrong Engineering Range

If transmitter range differs from program range:

Display becomes incorrect

Alarms fail

PID loops malfunction

 

Integer Division Errors

Using integer math can reduce accuracy.

Solution:

Use floating-point calculations

 

Floating Point Scaling

Better accuracy is achieved using REAL data type.

Example:

REAL Pressure

Instead of:

INT Pressure

Benefits:

Decimal precision

Accurate analog scaling

Better control stability

 

HMI Display Considerations

HMIs display scaled engineering values.

Common display features:

Numeric display

Bar graph

Trend graph

Alarm indication

Historical data logging

 

SCADA Integration

SCADA systems use scaled values for:

Process monitoring

Trending

Alarm handling

Data logging

Remote monitoring

Incorrect scaling affects the entire control system.

 

Pressure Transmitter Accuracy

Accuracy affects PLC readings.

Typical transmitter accuracy:

Type

Accuracy

Standard

±0.5%

Industrial

±0.25%

High Precision

±0.1%

Calibration and Verification

Pressure transmitters should be calibrated periodically.

Calibration steps:

  1. Apply known pressure
  2. Measure output current
  3. Compare with expected value
  4. Adjust transmitter if neede

Example Calibration Table

Pressure

Expected Current

0 bar

4 mA

2.5 bar

8 mA

5 bar

12 mA

7.5 bar

16 mA

10 bar

20 mA

 

Importance in Industry 4.0

Modern smart factories use pressure scaling for:

Predictive maintenance

Cloud monitoring

IIoT systems

Energy optimization

AI-based diagnostics

Accurate raw count conversion is essential for reliable analytics.

 

Best Practices for PLC Raw Count Calculation

Use Proper Scaling

Always verify:

Raw input range

Transmitter range

PLC module specifications

Use Floating Point Math

Improves precision.

Add Filtering

Removes signal noise.

Include Fault Detection

Detect:

Wire break

Over-range

Sensor failure

Verify Calibration

Regular maintenance improves reliability.

 

Troubleshooting Analog Scaling Problems

Problem

Possible Cause

Wrong pressure display

Incorrect scaling

Fluctuating reading

Electrical noise

Always zero

Wiring fault

Reading too high

Wrong transmitter range

Unstable value

Grounding issue

Future of Smart Pressure Measurement

Modern transmitters now support:

Wireless communication

Self-diagnostics

Remote calibration

Digital protocols

Cloud integration

Despite advanced technologies, PLC raw count scaling remains a fundamental concept in automation engineering.

 

PLC raw count calculation for pressure transmitters is one of the most important topics in industrial automation and instrumentation. A pressure transmitter converts physical pressure into a standard analog signal such as 4–20 mA, and the PLC analog module converts this signal into digital raw counts.

Since PLCs process raw numerical data rather than engineering units, scaling becomes essential to convert these counts into meaningful pressure values such as bar, psi, or MPa. Proper scaling ensures accurate monitoring, stable PID control, reliable alarm systems, and efficient industrial operation.

Understanding raw count calculation helps engineers design accurate automation systems, troubleshoot analog problems, optimize control loops, and improve plant reliability. Whether in water treatment, oil and gas, manufacturing, chemical processing, or smart factories, correct pressure scaling forms the foundation of precise industrial control systems.

 

May 6, 2026

Data Logging and Predictive Maintenance: Turning PLC Signals into Timely Maintenance Decisions

Every automated machine produces clues about its condition. Motor current rises as mechanical resistance increases, valve travel slows as friction develops, vibration changes as bearings deteriorate, and cycle time drifts when pneumatic performance weakens. PLCs already observe many of these signals, but observation alone does not create predictive maintenance. The real value appears when trustworthy data is collected with context, converted into indicators and connected to a maintenance decision that can be acted upon before failure.

Begin with a maintenance question

Collecting every available tag at the fastest possible rate is usually costly and unhelpful. Start by identifying a failure mode and asking what evidence precedes it. For a conveyor bearing, useful variables might include vibration, temperature, motor current, speed, load and operating hours. For a pneumatic cylinder, extend time, pressure, command state and completed cycles may be more informative.

This failure-mode approach creates a clear chain from physical behavior to sensor, data feature and maintenance action. It also distinguishes condition data from background noise. If no one can explain how a tag contributes to detection, diagnosis or process context, it may not deserve high-frequency storage.

Build a trustworthy data path

The PLC is often the first source because it knows equipment state, commands, recipes and interlocks. A historian or edge device can collect selected values through OPC UA, a vendor protocol or an industrial gateway. High-frequency vibration may require a dedicated acquisition system because a normal PLC scan and historian interval can miss important spectral information.



The feedback path from maintenance is crucial. If technicians do not record what they found, the analytics system cannot learn whether an alert represented a real defect, normal wear or a process change.

Preserve context and quality

A temperature value without operating context can mislead. The same gearbox may run hotter at a higher production rate or in a warmer season. Log machine state, product, recipe, speed, load and ambient conditions alongside condition signals. Exclude shutdown periods from models intended to evaluate running behavior, or label them explicitly.

Every record should include an accurate timestamp and, where possible, a quality status. Time synchronization across PLCs, drives, gateways and servers is essential for comparing events. A delayed network sample should not be treated as a sudden process change. Edge buffering protects data during short outages and forwards it after connectivity returns, but the storage layer must preserve the original event time rather than only the arrival time.

Tag governance keeps long-term datasets usable. Define names, units, scaling, expected ranges, sampling rules and ownership. Record configuration changes because a sensor replacement, firmware upgrade or modified scaling factor can create a data step that resembles a mechanical fault. Calibration records and missing-data indicators deserve the same attention as measured values.

Match sampling to the phenomenon

Sampling should reflect how quickly the condition changes. Operating hours can be recorded slowly, cycle time once per cycle and pressure profiles many times during movement. Bearing vibration may require kilohertz sampling and specialized sensors.

Event-based logging can reduce volume while preserving meaning. Store values around starts, stops, trips and completed cycles. A ring buffer can continuously hold recent high-resolution data and save it when an alarm occurs, giving engineers a picture of the seconds before and after the event. Deadbands reduce repetitive storage for analog values, although they should be chosen carefully so gradual drift remains visible.

Progress from rules to predictive models

Predictive maintenance does not have to begin with artificial intelligence. Thresholds, rates of change, moving averages and comparisons between similar assets can deliver early value. A temperature warning becomes more useful when it accounts for load and persists for a defined duration. A pump may be flagged when its current rises while flow falls, indicating declining efficiency rather than merely high production.

Statistical methods can establish a normal envelope for different modes and reveal deviation before a fixed alarm limit is reached. Machine learning may identify harder patterns. Supervised models estimate known faults from labeled examples; anomaly detection flags unusual behavior but may not explain why.

The model output should support a decision. A health score without explanation creates distrust. Show the contributing signals, trend, comparable baseline, confidence and recommended inspection. Maintenance teams need enough lead time to plan labor and spares, but not so many early warnings that alerts are ignored. Precision, recall, false-alarm rate and usable warning time are therefore more meaningful than a single abstract accuracy figure.

Deploy analytics safely

Predictive results should normally advise maintenance rather than directly defeat interlocks or operate equipment. The PLC remains responsible for deterministic control and protective limits. An analytics service can recommend an inspection, reduce an operating envelope through an approved mechanism or create a work request, but safety-related decisions require the appropriate engineered and validated safety function.

Models also require monitoring. Equipment ages, products change and control tuning is adjusted, causing data drift. Track whether input distributions and alert performance remain consistent. Version the model, feature calculations, training data period and deployment configuration. Provide a fallback rule when a model or network service is unavailable.

Because logging connects operational technology to more systems, use segmentation, least-privilege accounts, protected communications and controlled outbound paths. Avoid unnecessary analytics write access to PLCs, and define retention, backup and access policies.

Create a practical implementation roadmap

Begin with one asset whose failure is costly, whose condition is measurable and whose maintenance team is engaged. Establish a baseline, verify sensors and collect contextual data. Implement a transparent rule or health indicator, then compare alerts with inspections. Calculate avoided downtime, reduced emergency labor, spare-parts benefit and the cost of false alarms.

After the pilot works, standardize the architecture, tag model and feedback process before scaling. Similar assets can share templates, but their baselines may still differ because of installation, duty and environment. Predictive maintenance is not a one-time data-science project. It is an operating discipline linking controls, reliability, IT and technicians. When the chain remains intact—from sensor to context, from analysis to work order, and from inspection back to the model—data logging becomes more than a historical record. It becomes an early-warning system for better maintenance decisions.