Back to blog

When Sensor-Level Logic Helps—and When It Hides Risk

Smart sensors can filter, qualify, and diagnose signals before they reach a PLC. This guide shows where local logic helps, where it hides risk, and how IO-Link, failure design, and change control k...

Configurable sensors can now execute window comparisons, hysteresis, delays, latches, counters, and simple Boolean decisions before data reaches a PLC. Used carefully, that local processing rejects contact chatter, identifies a valid measurement band, and exposes device diagnostics without burdening the controller scan. Used carelessly, it moves machine behavior into parameter files that operators and maintenance technicians cannot see.

The engineering question is therefore not whether a smart sensor can perform logic. It is which decisions belong at the measurement point, which belong in the machine controller, and how the boundary will remain testable after a device is replaced years later.

Industrial sensor qualifying a measurement locally before sending data to a PLC

Local processing helps only when its parameters, health state, and failure behavior remain visible to the control system.

Start with the measurement, not the output bit

A switching output hides much of what the sensor knows. A photoelectric sensor may see a declining signal margin; a pressure transmitter may be near saturation; a distance sensor may oscillate around a threshold. If the PLC receives only a qualified bit, a weak measurement can look identical to a healthy one until the process finally trips.

Where the device and network support it, preserve the process value, quality information, and diagnostic events alongside the local decision. The PLC can then use the qualified state for sequence control while maintenance tools trend the raw value or signal margin. This division reduces routine code without throwing away evidence needed to diagnose contamination, misalignment, leakage, drift, or mechanical wear.

Good local functions are close to the physics

Device-specific interpretation is often a strong candidate for local execution. A distance sensor can apply a teach point and hysteresis appropriate to its sensing principle. A pressure switch can provide separate warning and trip points. A short on-delay can reject a transient shorter than the process can physically respond to, and an off-delay can bridge a harmless gap in target detection.

These settings should reflect a documented process requirement. A debounce time longer than the minimum detectable fault can conceal the event it was meant to clean up. A wide hysteresis band may stop chatter while allowing unacceptable process variation. The designer should record the raw range, threshold, hysteresis, delay, update time, and intended response to an out-of-range or invalid measurement.

Keep machine intent in the controller

Logic spanning multiple devices usually belongs in the PLC: operating-mode selection, recipe coordination, permissives across machines, alarm prioritization, production counting, and sequences that an operator must understand. Putting such behavior in dozens of field devices makes change control fragmented and troubleshooting dependent on vendor-specific tools.

Safety functions require an even firmer boundary. A standard sensor’s switching logic must not be treated as a safety function merely because it reacts quickly. Personnel protection must use devices, communications, controllers, and output elements designed and validated for the required safety performance. Standard IO-Link diagnostics can support maintenance, but they do not convert ordinary measurement logic into a safety-rated channel.

Boolean sensor conditions separated from PLC machine-sequence logic

The Boolean expression may be simple; ownership, visibility, and safe-state behavior determine whether it remains maintainable.

Use IO-Link for transparency, not just convenience

IO-Link is a standardized point-to-point communication technology for sensors and actuators. It can carry cyclic process data, device status, and acyclic parameters over a conventional sensor connection. The IODD describes the device’s data structure and parameters so engineering tools and masters can interpret them consistently.

Parameter storage can simplify replacement, but automatic restoration is not magic. The master port must be configured correctly, the replacement device must be compatible, and any device-specific settings excluded from data storage still require attention. A good replacement procedure verifies vendor and device identity, parameter-set revision, process-value scaling, switching behavior, and diagnostic status before the machine returns to automatic operation.

Do not assume every replacement should accept the stored configuration without review. In regulated or high-consequence processes, the restored parameter set may require an approval record and a functional test. For recipe-dependent devices, define whether the PLC, IO-Link master, asset-management system, or local device is the authoritative source.

Design failure behavior explicitly

For each locally processed signal, define what the PLC receives during sensor power loss, broken wiring, communication loss, internal device fault, measurement overflow, and parameter mismatch. A false state may be safe for one sequence and hazardous for another. If the protocol provides a validity or quality indicator, use it instead of inferring health from a plausible numeric value.

Alarm logic should distinguish “process outside limit” from “measurement unavailable.” The first may call for a controlled process response; the second may require a stop, redundancy, or a maintenance action. Treating both as the same bit erases diagnostic value and can create nuisance resets that mask intermittent wiring or network faults.

Commission the boundary, not only the happy path

A practical test starts with known values below, within, and above the configured window. Verify hysteresis in both directions and measure the effective on-delay and off-delay. Disconnect the device, interrupt IO-Link communication, substitute a replacement, and deliberately load an incorrect parameter set to confirm the alarms and recovery sequence.

Then test observability. An operator should be able to identify the active threshold and the reason a signal is invalid without connecting a specialist laptop. The PLC or HMI does not need to expose every parameter, but it should show the states that affect production and direct maintenance to the controlled parameter record.

Applicable field devices are available in the Sensors collection, while masters and gateways can be reviewed under Communication & Networking.

Engineering perspective

Place filtering and sensor-specific interpretation near the measurement when doing so improves signal quality and diagnostics. Keep machine intent, cross-device coordination, and safety logic in the appropriate controller. The best distributed design is not the one with the fewest PLC rungs; it is the one whose decisions, parameters, failure modes, and replacement behavior remain obvious to the next technician.

Leave a comment

Please note, comments need to be approved before they are published.