IO Link is an industrial communication interface that is independent of any fieldbus and suitable for simple sensors and actuators at the bottom of industrial control. The IO Link system includes IO Link devices (such as sensors and actuators), IO Link master stations, and cables for standard sensors. The system structure is shown in Figure 1. For example, when a remote IO module compatible with EtherNet/IP serves as the main station, in addition to standard I/O signals, the module sends and receives configuration data, diagnostic data, or enhanced process data through a pulse modulation process, which is then packaged into EtherNet/IP data packets and finally transmitted to the network control station, usually a PLC. In the above applications, the connection between remote I/O and IO Link devices remains the same as traditional discrete devices. The advantage of IO Link mainly lies in its greater information exchange capability, which was previously impossible to achieve with standard I/O devices. Another benefit of IO Link is that it does not rely on any fieldbus, and through any I/O module that complies with the IO Link protocol (including local I/O and remote I/O), IO Link sensors or actuators can be integrated into any fieldbus system.
Figure 1 IO Link System Architecture
In order to further study the architecture, communication mechanism, and development application of the IO Link system, DYTP600A 61430001-ZY can design and develop an IO Link slave toolkit, including a universal development module for IO Link, an IO Link analysis tool, and an IO Link slave protocol stack. The IO Link universal development module is the foundation for this work and also serves as a bridge between the IO Link master station and device signals. The IO Link analysis tool can help developers and testers analyze communication details to identify and solve problems. The IO Link slave protocol stack is a firmware library that provides a hardware abstraction layer and application program interfaces, allowing developers to easily and quickly develop IO Link slave products on various microprocessor platforms. The IO Link slave station studied in this article only focuses on digital (button) signal input and digital signal output (indicator light). The design of the IO Link universal development module only needs to be expanded on this basis to enable it to process analog signals.
1 System structure
Figure 2 is a schematic diagram of the IO Link slave toolkit and demonstration system structure.
Figure 2: Structure diagram of IO Link slave toolkit and demonstration system
The IO Link Master module used in this article, USB IO Link Master, can connect IO Link devices to a PC, allowing for configuration and testing of IO Link devices or demonstration device functionality through IO Link Device Tool software. IO Link devices must be described through a device description file (IODD file), which includes a set of XML text files and PNG graphic files that contain information on device identification, communication characteristics, parameters, process data, and diagnostic data. The part within the elliptical dashed line in Figure 2 is an IO Link three wire cable, where L+/I – is a 24V DC power supply and C/Q is a signal line used for transmitting process data, diagnostic data, configuration data, etc. The IO Link universal development module mainly consists of a data transceiver and a microprocessor. It can process the input signals of sensors and transmit information to the IO Link master station. It can also receive and process data information from the master station and transmit it to the actuator. The IO Link analysis tool can help developers view, record, and analyze data, understand communication details, and this part of the design will not be discussed in this article.
Introduction to IO Link Communication Mode
IO Link devices can operate in SIO mode (standard I/O mode) or IO Link mode (communication mode). After powering on DYTP600A 61430001-ZY, the device always operates in SIO mode. The port of the main station has different configuration methods. If configured in SIO mode, the main station considers the port as a standard digital input. If configured in communication mode, the main station will automatically identify communicable devices for communication.
2.1 Data types
The three basic data types for IO Link communication are: periodic data (or process data PD), non periodic data (or service data SD), and events.
The process data (PD) of the device is transmitted periodically in the form of a data frame, while service data (SD) is only exchanged after a request is made by the main station. Figure 3 shows a typical IO Link message structure. When an event occurs, the “event flag” of the device is set, and the main station detects the setting and reads the reported event (service data cannot be exchanged during the reading process). Therefore, events or equipment status such as pollution, overheating, short circuit, etc. can be transmitted to the PLC or visualization software through the main station.
Figure 3 IO Link Message Structure
2.2 Parameter data exchange
Due to the fact that service data (SD) must be transmitted through PLC requests, SPDU (Service Protocol Data Unit) is defined. In the main station, requests for read and write services are written to SPDU and transmitted to devices through the IO Link interface.
The general structure of SPDU is shown in Figure 4, and its arrangement order is consistent with the transmission order. The elements in SPDU can take different forms depending on the type of service. SPDU allows access to data objects that are intended for transmission, while Index is used to specify the address of the requested data object on a remote IO Link device. In IO Link, there is a term called direct parameter page, which stores parameter information such as minimum cycle time, supplier ID, and master station commands. The data objects accessible in the direct parameter page can be selectively provided through SPDU.
Figure 4 General Structure of SPDU
3 IO Link Slave Station Hardware Design
The system structure of IO Link slave station is shown in Figure 5, mainly including data transceiver HMT7742, microcontroller AT mega328P, signal input and output channels, voltage and current monitoring module, and overcurrent protection module.
Figure 5 IO Link Slave Station Structure Diagram
HMT7742 is an IO Link slave transceiver chip that serves as a bridge between the MCU of external sensors or actuators and the 24V signal line that supports IO Link communication. When the IO Link device is connected to the master station, the master station initializes communication and exchanges data with the MCU, while HMT7742 acts as the physical layer for communication.
Due to the fact that the three indicator lights (rated voltage of 24 V) controlled by the output port of the MCU are powered by the IO Link power cord, it is necessary to monitor the current on the power cord in order to trigger appropriate corrective measures when the current exceeds a set threshold, such as cutting off the indicator lights from the IO Link power cord. The current monitoring module uses an INA194 current detection amplifier. As a high current detector, INA194 is directly connected to the power supply and can detect all downstream faults. It has a very high common mode suppression ratio, as well as a large bandwidth and response speed. It can amplify the voltage on the induction resistor 5O times and output it to the forward input terminal of the MCU’s internal voltage comparator, AIR0. When the voltage value of AIR0 exceeds the threshold set at the reverse input terminal, the PB0 output is controlled to be low, and the indicator light LAMP can be cut off from the IO Link power line to achieve overcurrent protection function. This part of the circuit is shown in Figure 6.