MOULDLKnowledge BaseElectrical Knowledge Base3D Model DownloadsMembership
中文版Model Store »
Knowledge Base › Electrical Knowledge Base › How should over-range and under-range analog inputs be handled?
HomeModels
Table of contents

On this page

PLC & Programming (100 articles)

Quick Reference

  • PLC & Programming
  • Electrical & Electronic Basics (monthly)(每月更新中)
  • Electrical Control & Drawings (monthly)(每月更新中)
  • Drives & Actuators (monthly)(每月更新中)
  • Sensors & Detection (monthly)(每月更新中)
  • Industrial Communication & Networks (monthly)(每月更新中)
  • HMI & Host Systems (monthly)(每月更新中)
  • Industrial Robots & Motion Control (monthly)(每月更新中)
  • Mechatronic System Integration (monthly)(每月更新中)
  • Fault Diagnosis & Standards (monthly)(每月更新中)

How should over-range and under-range analog inputs be handled?

An analog input above the upper limit of the module range is over-range; below the lower limit it is under-range. It may be a genuine process condition (the pressure really did rise too high), or a false reading from a broken wire, a short or wrong wiring. If you cannot tell them apart, protection trips when it should not, or fails to trip when it should. The sections below cover the judgement and the handling.

1. What over-range and under-range mean

An analog module converts a continuous signal such as 4-20 mA or 0-10 V into an integer. A signal above the module's rated range is over-range, one below it is under-range. The module usually sets an overflow or underflow flag on the converted value to distinguish "beyond what can be represented" from "at the edge of the range".

2. Judging the limit from the raw integer

Do not judge from the scaled engineering value alone; look at the raw integer after conversion. With a typical rated range, exceeding the upper limit produces a value close to the overflow code, and under-range produces a negative value or one near zero. Compare the raw integer with the limits first, then decide whether to clamp or to alarm; this is more reliable than reading the engineering value.

3. Clamping to protect the downstream logic

Feeding an out-of-range value straight into a PID or a display causes problems. Add a clamp after acquisition: take the upper limit above it, the lower limit below it, and set an alarm bit. Clamping keeps the downstream calculation from saturating or diverging on an extreme value, and stops absurd numbers appearing on the display.

4. Telling a genuine limit from a broken wire

On a 4-20 mA loop, a value below about 3.6 mA is commonly treated as a broken wire. If the reading is far below the lower limit or even negative, check the wiring and the sensor supply first; if it only slightly exceeds the limits, it is more likely genuine process variation. A genuine limit should trigger a protective action such as stopping a pump or opening a bypass; a broken wire should alarm and bring the machine to a safe state.

5. Alarm and recovery strategy

An out-of-range alarm needs hysteresis so it does not trigger repeatedly near the threshold. A genuine limit should recover automatically once handled; a broken-wire fault usually needs manual acknowledgement after recovery, so a flaky sensor does not cause repeated start and stop.

6. Out-of-range cases and handling at a glance

Out-of-range caseHandlingValue strategyAlarm and recovery
Slightly above the upper limitClamp and alarmTake the upper limitAutomatic recovery
Far above the upper limit (overflow code)Treat as module overflowTake the upper limitIndicate the overflow cause
Slightly below the lower limitClamp and alarmTake the lower limitAutomatic recovery
Far below or negativeSuspect a broken wire or wiring errorDo not take it; hold the last valueCheck wiring and supply
4-20 mA below 3.6 mATreat as a broken wireHold or take the lower limitInterlock action, manual acknowledgement
Value constantly jitteringAdd a filter or averagingUse the filtered valueSet hysteresis against jitter
Limit requires a shutdownComparison plus interlockOutput a protective commandProtect pump and valves
Recovery needs acknowledgementSet an acknowledge bitEnable only after acknowledgementBroken-wire cases reset manually
Display and alarm disagreeCheck the scalingVerify the limit settingsUnify the scaling basis

7. Notes

In handling an out-of-range value, first decide "genuine or false", then "clamp or alarm". A genuine limit protects the equipment; a false one means checking the wiring. Put both decisions after acquisition and before the calculation, and everything downstream stays clean.

8. References

The acquisition, protection and earthing of analog signals follow GB 5226.1 and the equivalent international standard IEC 60204-1. Data representation and clamping arithmetic follow GB/T 15969.3, Programmable controllers, Part 3: Programming languages (equivalent to IEC 61131-3). The exact range, overflow codes and broken-wire criteria are as stated in the module manual in use.

9. Points to watch

⚠️ Three common traps:
1. Converting to engineering units without checking for overflow, so a negative or overflow code becomes an enormous number and the PID output drives to the limit;
2. Treating a broken wire as a process limit and interlocking a shutdown, so a loose sensor stops the machine repeatedly and the real cause is never found;
3. An alarm with no hysteresis, so a signal jittering near the threshold makes the alarm flicker and the operator simply disables it.

Confirm the sensor supply and wiring are sound before treating an out-of-range value. Where the handling drives a pump stop or a valve open, check the process safety requirements and verify the logic with the machine stopped.

Related reading

Related 3D models: Ready to build it? Download free 3D models & CAD drawings at MOULDL »
MOULDL · Electrical Knowledge Base · free self-study reference for electrical & automation engineers, 3D CAD models at MOULDL