PLC scan cycle and data sampling error
Before reading a PLC tag for AI, know where in the scan cycle the value was produced and which timestamp describes it.
The scaling formula is PV = LRV + (I − 4) / 16 × (URV − LRV). I is the measured current in mA, LRV the lower and URV the upper range value. For percent, use (I − 4) / 16 × 100. The 16 mA span from 4 to 20 mA maps linearly onto the range.
The 4-20 mA signal is linear. As the current rises from 4 mA to 20 mA, the reading moves in a straight line from the lower to the upper range value. The part above 4 mA gives the fraction of the 16 mA span reached. Multiply that fraction by the range and add the lower value to get the physical reading. The unit can be bar, metres, °C or kg/h; the formula does not change. Only LRV and URV must match the device's engineering scale.
Scaling can be done in the transmitter, the PLC or the DCS. If the two sides use different LRV or URV values, a reading that looks plausible on one screen can be wrong on the other. Check both sides together.
Suppose a line pressure transmitter is set to a 0-10 bar range (hypothetical). So LRV = 0 bar and URV = 10 bar.
To check the setup, confirm that 20 mA maps to 10 bar and 4 mA maps to 0 bar. Those two end points show that the intermediate values are also correct.
The most common error is dividing the current by 20. That method ignores the 4 mA live zero. At 12 mA, I / 20 = 0.6 gives 6 bar, while the correct value is 5 bar. A second error is forgetting to add LRV when it is not zero. For a transmitter ranged from −5 to 15 bar, the correct reading at 12 mA is (12 − 4) / 16 × 20 + (−5) = 10 − 5 = 5 bar. Without the LRV, the reading would be 10 bar. A third error is mixing units, such as bar with kPa, or percent with engineering units. Write down the range and the unit before you calculate.
Some devices allow a reversed range, with URV entered below LRV. The formula stays the same: because (URV − LRV) is negative, the reading falls as the current rises. Set a reversed range only on purpose and document it, so maintenance staff do not misread the value.
A percent value gives the position of the reading within the range, from 0 to 100. The engineering value is the same position expressed in units such as bar, °C or metres. Control logic sometimes works in percent, while reports use engineering units. Labelling which one is shown prevents misreading.
Example numbers are hypothetical, not measured field results.