How IO-Link Sensors With Condition Monitoring Features Work With PLCs

As manufacturers continually look for ways to maximize productivity and eliminate waste, automation sensors are taking on a new role in the plant. Once, sensors were used only to provide detection or measurement data so the PLC could process it and run the machine. Today, sensors with IO-Link measure environmental conditions like temperature, humidity, ambient pressure, vibration, inclination, operating hours, and signal strength. By setting alarm thresholds, it’s possible to program the PLC to use the resulting condition monitoring data to keep machines running smoothly.

Real-time data for real-time response

A sensor with condition monitoring features allows a PLC to use real-time data with the same speed it uses a sensor’s primary process data. This typically requires setting an alarm threshold at the sensor and a response to those alarms at the PLC.

When a vibration threshold is set up on the sensor and vibration occurs, for example, the PLC can alert the machine operator to quickly check the area, or even stop the machine, to look for a product jam, incorrect part, or whatever may be causing the vibration. By reacting to the alarm immediately, workers can reduce product waste and scrap.

Inclination feedback can provide diagnostics in troubleshooting. Suppose a sensor gets bumped and no longer detects its target, for example. The inclination alarm set in the sensor will indicate after a certain degree of movement that the sensor will no longer detect the part. The inclination readout can also help realign the sensor to the correct position.

Detection of other environmental factors, including humidity and higher-than-normal internal temperatures, can also be set, providing feedback on issues such as the unwanted presence of water or the machine running hotter than normal. Knowing these things in real-time can stop the PLC from running, preventing the breakdown of other critical machine components, such as motors and gearboxes.

These alarm bits can come from the sensors individually or combined together inside the sensor. Simple logic, like OR and AND statements, can be set on the sensor in the case of vibration OR inclination OR temperature alarm OR humidity, output a discrete signal to pin 2 of the sensors. Then pin 2 can be fed back through the same sensor cable as a discrete alarm signal to the PLC. A single bit showing when an alarm occurs can alert the operator to look into the alarm condition before running the machine. Otherwise, a simple ladder rung can be added in the PLC to look at a single discrete alarm bit and put the machine into a safe mode if conditions require it.

In a way, the sensor monitors itself for environmental conditions and alerts the PLC when necessary. The PLC does not need to create extra logic to monitor the different variables.

Other critical data points, such as operating hours, boot cycle counters, and current and voltage consumption, can help establish a preventative and predictive maintenance schedule. These data sets are available internally on the sensors and can be read out to help develop maintenance schedules and cut down on surprise downtimes.

Beyond the immediate benefits of the data, it can be analyzed and trended over time to see the best use cases of each. Just as a PLC shouldn’t be monitoring each alarm condition individually, this data must not be gathered in the PLC, as there is typically only a limited amount of memory, and the job of the PLC is to control the machines.

This is where the IT world of high-level supervision of machines and processes comes into play. Part two of my blog will explore how to integrate this sensor data into the IT level for use alongside the PLC.

IO-Link Event Data: How Sensors Tell You How They’re Doing

I have been working with IO-Link for more than 10 years, so I’ve heard lots of questions about how it works. One line of questions I hear from customers is about the operating condition of sensors. “I wish I knew when the IO-Link device loses output power,” or, “I wish my IO-Link photoelectric sensor would let me know when the lens is dirty.” The good news is that it does give you this information by sending Event Data. That’s a type of data that is usually not a focus of users, although it is available in JSON format from the REST API.

There are three types of IO-Link data:

      • Process Data – updated cyclically, it’s important to users because it contains the data for use in the running application, like I/O change of states or measurement values like temperature and position, etc.
      • Parameter Data – updated acyclically, it’s important to users because it’s the mechanism to read and write parameter values like setpoints, thresholds, and configuration settings to the sensor, and for reading non-time critical values like operating hours, etc.
      • Event Data – updated acyclically, it’s important to users because it provides immediate updates on device conditions.

Let’s dig deeper into Event Data. An Event is a status update from the IO-Link device when a condition is out of its normal range. The Event is labeled as a Warning or Error based on the severity of the condition change.

When an Event occurs on the IO-Link device, the device sets the Event Flag bit in the outgoing data packet to the IO-Link Master. The Master receives the Event Flag and then queries the IO-Link device for the Event information.

It is important to note that this is a one-time data message. The IO-Link device only sends the Event Flag at the moment the condition is out of range, and then again when the condition is back in range.

Event Data Types, Modes, and Codes

Event Data has three following three components:

      • Event Type – categorized in three ways
        • Notification – a simple event update; nothing is abnormal with the IO-Link device
        • Warning – a condition is out of range and risks damaging the IO-Link device
        • Error – a condition is out of range and is affecting the device negatively to the point that it may not function as expected
      • Event Mode – categorized in three ways
        • Event notice – usually associated with Event Type notifications, message will not be updated
        • Event appears – the condition is now out of range
        • Event disappears – the condition is now back in range
      • Event Code
        • A two-byte Hex code that represents the condition that is out of range

IO-Link condition monitoring sensor

To bring all these components together, let’s look at a photoelectric IO-Link sensor with internal condition monitoring functions and see what Events are available for it in this device manual screenshot. This device has Events for temperature (both warning and error), voltage, inclination (sensor angle is out of range), vibration, and signal quality (dirty lens).

By monitoring these events, you have a better feel for the conditions of your IO-Link device. Along with helping you identify immediate problems, this can help you in planning preventive and planned maintenance.

An IO-Link condition monitoring sensor uses Event Data similarly to report when conditions exceed the thresholds that you have set. For example, when the vibration level exceeds the threshold value, the IO-Link device sends the Warning event flag and the IO-Link Master queries for the event data. The event data consists of an Event Type, an Event Mode, and an Event Code that represents the specific alarm condition that is out of range. Remember this is a one-time action; the IO-Link sensor will not report this again until the value is in an acceptable range.

When the vibration level is back in range, the alarm condition is no longer present in the IO-Link device, the process repeats itself. In this case the Event Type and Event Code will be the same. The only change is that the Event Mode will report Event Disappears.

Within the IO-Link Specification there is a list of defined Event Codes that are common across all vendors. There is also a block of undefined Event Code values that allow vendors to create Event Codes that are unique to their specific device.

“I wish the IO-Link device would let me know….” In the end, the device might be telling you what you want to know, especially if the device has condition monitoring functions built into it. If you want to know more about condition monitoring in your IO-Link devices, check out the Event section in the vendor’s manuals so you can learn how to use this information.