Fieldbus technology is a hot spot in the field of automation control, which is applied to real-time communication between multiple devices, and if a cable is disconnected in the device connection, the communication between the devices will be affected. Let's take a look at how EtherCAT redundancy technology enables remedial and locking of communication cables in the event of a disconnection.The EtherCAT fieldbus has a flexible topology, and supports linear, star, and tree cable connections between devices, among which the line structure is simple and the transmission efficiency is the highest, and this connection is also used in most field applications, as shown in Figure 1 below.
Figure 1 Topology of the linear structure.
The connection method of the line type is indeed simple, and the wiring is flexible, which is convenient for the layout and maintenance of field equipment. In automated industrial production, equipment usually runs in different environments for a long time, and factors such as aging of cables and lack of rigorous installation and connection lead to cable disconnection. If the cable between the first IO card and the second IO card is broken one day, will the device behind the 1st IO card not work normally? This is shown in Figure 2 below.
Figure 2 Example of a cable disconnection.
Regardless of the wiring method, cable disconnection will affect the normal operation of the equipment, even the traditional CAN, RS485 and other communication equipment control will not be able to operate normally. The problem still needs to be solved, so is there a standard that can solve the above problem without adding too much additional design cost? Let's take a look at the solutions provided by the EtherCAT bus and the implementation of cable redundancy technology. Let's take a look at the connection method first, as shown in Figure 3 below.
Figure 3 Cable redundancy wiring diagram.
As you can see from the redundant wiring diagram of the EtherCAT cables, isn't it a bit clever to reuse the out end of the last slave device back to the master? It reduces the cost of hardware and solves the problem, which is really liked by everyone. Let's take a closer look at its data flow direction, assuming that there is a disconnection between IO card 1 and 2, its working principle is shown in Figure 4 below.
Figure 4 Schematic diagram of cable redundancy.
The cable between the IO card 1 and 2 is still connected to the slave device after it is disconnected, but the communication line becomes two branch lines, the device can still communicate normally, and the software layer can continue to control the operation. This is the solution for cable redundancy in EtherCAT and the link redundancy function is realized by turning the line structure into a ring structure. With the device connectivity at the electrical layer taken care of, let's move on to see how the software layer is implemented.
The master station is usually the control end, and the slave station is the execution end. Let's take a look at how the redundant master side is implemented.
1.Principle of operation of slaves
After receiving the Ethernet frame of the master station in the link, the EtherCAT slave device copies its own data in the Ethernet frame, writes the current data, and carries the new Ethernet frame to the next slave device.
2.How the master works
As the control end, the master station actively initiates data requests and the slave station responds, so the redundancy function is mainly implemented in the protocol stack on the master side.
In the EtherCAT frame structure, every time the slave enters the IN end, the slave will update the CNT plus 1, and in the data frame that the slave ** returns, the master will verify the CNT value, if it is not the same as the network configuration, it is judged to be a network abnormal, and the specific position of the abnormal slave can be located according to the CNT, and the EtherCAT frame is shown in Figure 5 below.
Figure 5 EtherCAT frame capture.
When the master station detects a network abnormality, the protocol stack will flexibly change the direction of data flow and become two branches for control, at this time, the function of the redundant port is the same as that of the communication port, and in the normal state, the redundant port is also only responsible for the function of **, the data flow direction is shown in Figure 6 below, the blue circle is the sending direction, and the green circle represents the receiving direction.
Figure 6 EtherCAT data flow diagram.
In the implementation of the above-mentioned redundancy function, it is mainly processed by the protocol stack, which belongs to the application layer, and then sends it to the hardware after the protocol stack is processed. There is loss in the middle, and in applications with high requirements for PDO cycles, such as 256US communication cycles, redundant response is required, otherwise too many packets will be lost and cannot meet the application requirements.
ZLG PCIe EtherCAT communication card supports EtherCAT cable redundancy, which can maintain communication between master and slave devices even if the cable is physically interrupted at a certain point. At the same time, the redundancy function is designed using a hardware implementation scheme, which provides fast response and lower packet loss rate, as shown in Figure 7 below.
Figure 7 Hardware redundancy instance.
1.FPGA disconnection processing
PCIe EtherCAT communication cards use FPGAs for Ethernet data transmission and reception at faster rates. If there is a slave disconnection, the FPGA will continue to send data from the redundant port, which is still a complete link without being processed by the protocol stack, and the data flow direction is shown in Figure 8 below.
Figure 8 Hardware redundant data flow direction.
2.Hardware redundancy performance
The FPGA continues to send the data back from the communication port through the redundant port without going through the process of the protocol stack, thereby improving the response speed and reducing the packet loss rate of data.
1.The role of redundant features
Save on design costs.
EtherCAT cable redundancy, using the OUT port of the last slave device, allows redundancy to be standardized.
Enhance the reliability and stability of communication systems.
In the industrial automation industry, equipment on the bus is often required to run uninterrupted, and production is not allowed to be stopped, and redundancy technology can achieve the reliability and stability of the application system.
Fault diagnosis and handling.
When the cable is broken, it becomes two link control to continue working, and EtherCAT can automatically detect the fault point in the bus system, which can greatly simplify the maintenance of the system and improve the maintainability of the equipment.
2.Product Applications
Figure 9 PCIe EtherCAT communication card.
Zhiyuan ElectronicsPCIe EtherCAT communication cardIt is a PCI-based EtherCAT bus communication interface card. It adopts the advanced FPGA control scheme in the industrial field, with extremely high communication speed and strong real-time performance. PCIe EtherCAT communication cards are available in miniPCIe, half-card, and full-card designs, and are compatible with any type of 33 V DC miniPCIe and PCI slots. EtherCAT communication cards offer the following advantages:
PCIe communication cards are integrated with a commercially licensed EtherCAT master solution;
Support COE, FOE, FSOE, slave hot-swap, master hardware redundancy and other functions;
The PDO period is at least 125 s, and the jitter is plus or minus 5 s.
High-speed PCIe interface communication, support for multiple operating system platforms;
The PCIe interface is more efficient and expandable, and supports multi-platform operating systems.
The selection table is shown in Table 1 below.
zlg**:ZLG Developer Community:
For more technical dry goods, please pay attention to "ZLG Zhiyuan Electronics" WeChat***