Redundancy definition
What is bus redundancy? As we all know, EtherCAT fieldbus has a flexible topology, supporting linear, star, and tree connections between devices. Among them, the linear structure is simple and has high transmission efficiency, and this connection method is used in most field applications, as shown in the figure below.
Linear connections are indeed simple, flexible in routing, and convenient for on-site equipment layout and maintenance. In automated industrial production, equipment typically operates for extended periods in various environments, and factors such as cable aging and improper installation connections can lead to cable breakage. If one day the cable between the first and second servos breaks, will the equipment following the first servo malfunction? (See diagram below.)
Regardless of the wiring method, a broken cable will affect the normal operation of the equipment, even those using traditional CAN or RS485 communication. The problem needs a solution. Is there a standard solution that doesn't require significant additional design costs? Let's look at the solution provided by the EtherCAT bus and the implementation principle of EtherCAT redundancy technology. First, let's look at its connection method, as shown in the diagram below.
As can be seen from the EtherCAT cable redundancy wiring diagram, the OUT terminal of the last slave device is reused to connect back to the master station. Isn't that ingenious? It reduces hardware costs and solves the problem, which is why it's so popular. Let's take a closer look at its data flow. Assuming the connection between the first and second servos is still broken, its working principle is shown in the following diagram.
Even after the cables for servo 1 and servo 2 are disconnected, they remain connected to the slave device. However, the communication lines become two branches, allowing the devices to still communicate normally and continue operating under control. This is the EtherCAT redundancy solution, transforming the linear structure into a ring structure to achieve link redundancy.
Advantages of redundancy
01. Save on design costs: EtherCAT cable redundancy utilizes the OUT port of the last slave device, standardizing the redundancy function.
02. Enhancing System Reliability and Stability: In the industrial automation sector, devices on the bus are typically required to operate continuously, and production stoppages are not permitted. Redundancy technology can improve the reliability and stability of the application system.
03. Fault Diagnosis and Handling: When a cable breaks, the two links continue to operate. At the same time, EtherCAT can automatically detect fault points in the bus system, which can greatly simplify system maintenance and improve equipment maintainability.
Environment Configuration ▶ Currently, only versions 7 series 240520 and later support the positive motion feature.
Environment Preparation (1) Prepare a VPLC711-i5-ETH5 all-in-one machine;
(2) Install MotionRT version 240520 or higher;
(3) Use EtherCAT as the master port, and choose any one of the other network ports as the slave port;
(4) Connect the wires as shown in the diagram. Connect the EtherCAT cable to the in port of the first device and the out port of the last device to the corresponding redundant network port on the VPLC711 to form a loop.
(5) During bus initialization, SLOT_STOP is added after the bus stops; (6) At this time, if an interface is disconnected at any point in the loop, the node will run normally.
(7) If needed, instructions for disconnection detection can be added to the code.
RT driver installation step one: Install the driver
1. Open "Device Manager", select "Action" and then "Add legacy hardware", then select "Manual selection".
2. Click "Next".
3. Click "Install from disk".
4. Click the "Browse" button to select the path where the driver is located, open the folder "driver_signed", and select "ZMotionRt64.inf".
5. Keep clicking "Next" until the installation is complete.
Note: When updating drivers, you must remove the device from Device Manager and make sure to also delete the driver files.
Step 2: Install the EtherCAT protocol
The MotionRT711 supports XPCI/XPCIE ECAT network ports, and also supports using a computer's regular network port as an ECAT port.
1. In the Windows Network Connections interface, select the network port that you want to use as a redundant function bus, right-click Properties → Install → Protocol → Add.
2. Select "Install from disk".
3. Browse to the driver location and select "ZMotionRtPacket.inf".
4. Click "OK".
If you see "ZMotionRT64 Packet Protocol Driver" in the properties, the installation is successful. Check the box to add the corresponding network port bus protocol. You can uncheck the box for network ports that are not connected to devices.
5. Add bus protocol.
On the RT7 startup screen, click "AddEcat". In the EtherCAT bus list, add the corresponding redundant network port bus to the list. After successful addition, click "Start". See label 2 in the figure below.
Redundancy code instruction analysis: The usage of redundancy instructions is shown below. SLOT_SLAVE -- EtherCAT redundancy configuration. (This instruction is set when the bus is stopped.)
The disconnection detection command is parsed as follows:
1. SLOT_INFO and NODE_INFO
Printing `SLOT_INFO(slot,5)` can detect whether a cable is broken; 0 indicates the cable is normal, and 1 indicates a broken cable. `NODE_INFO` has the same function. `NODE_INFO(slot,node,6)` can also detect the device's network port status, operating on a bit-by-bit basis. Bit 0 represents the IN port status, and bit 1 represents the OUT port status; setting it to 1 indicates normal, and setting it to 0 indicates a broken port. (`SLOT_INFO` can only read whether the line is broken, but cannot determine which node is broken; `NODE_INFO` can pinpoint the broken node). See the example below.
(1) indicates that EtherCat detected a disconnection in the entire loop.
(2) The printed value is 3, which is represented as 0011 in binary. Bit0 and Bit1 are both 1, indicating node 0 and normal wiring.
(3) The printed value is 2, which is represented as 0010 in binary. Bit0 is 0 and Bit1 is 1, indicating that node 1 is disconnected at EtherCat In.
2. `NODE_REGREAD` `NODE_REGREAD(slot, node, address=0x111, bytes, modbus indes)` can read the network port status of a device, thus accurately determining which device and which network port is disconnected. A normal return value is 90, a disconnection at the `in` port returns 89, and a disconnection at the `out` port returns 86.
BIT0 = first port status (in port), BIT2 = second port status (out port). Only consider bits 0 and 2; setting them to 1 indicates disconnection, and setting them to 0 indicates normal operation. See the example diagram below.
(1) The printed value is 89, which is represented in binary as 01011001. Bit0 is 1, indicating that the EtherCAT In port of node 1 is disconnected.
(2) The printed value is 86, which is represented in binary as 01010110. Bit2 is 1, indicating that the EtherCAT Out port of node 0 is disconnected.
(3) The printed value is 90, which is represented in binary as 01011010. Bit0 and Bit2 are both 0, indicating that node 2 is connected normally.
In this C# application example for detecting disconnections on a host computer, we use a basic script program and the `slot_info` command to repeatedly check for disconnections. If a disconnection occurs, we set the value of the corresponding variable `test`, where a value of 1 indicates a disconnection and a value of 0 indicates a normal connection.
The Basic part of the program is shown in the figure below. (This can be determined by reading the value of the basic global variable, or by checking the value of the register, or by detecting a disconnection using the node_regread instruction.)
As can be seen from the above basic program, the program continuously monitors and refreshes the return value of the slot_info command, assigning it to the test variable. At this time, the host computer determines whether there is a disconnection by monitoring the change of the value of test. The host computer display interface is shown in the figure below.
1. The servo works normally without disconnection.
2. During normal operation of the servo, one of the EtherCAT nodes goes offline.
3. The relevant parts of the program are shown in the figure below.
As shown in the diagram above, the host computer reads the value of the underlying variable 'test' in real time through relevant interfaces to determine whether the corresponding EtherCAT node is offline.
Machine vision EtherCAT motion controller VPLC711
The VPLC711 is a high-performance machine vision EtherCAT motion controller based on the x86 platform and Windows operating system, possessing powerful computing capabilities and flexibility. It features excellent real-time performance, multiple high-speed hardware inputs and multiple high-speed PSO outputs, enabling precise control of multi-axis synchronous motion and high-speed communication with external devices using multiple protocols.
The VPLC711 supports multiple hardware interfaces and communication protocols, facilitating connection and integration with other devices. In addition, the VPLC711 features vision processing capabilities, enabling real-time processing of image data for applications such as visual inspection, measurement, and positioning.
The VPLC711 incorporates the Windows motion control real-time kernel MotionRT7, forming an open IPC-type real-time soft controller/soft PLC, providing users with a flexible and integrated motion control + vision solution.
VPLC711 Hardware Specifications
1. Employing a high-performance x86 CPU, EtherCAT supports 1ms 64-axis synchronous operation;
2. Onboard RS232, RS485, EtherNet*5, EtherCAT, and USB3.0*4 hardware interfaces; 3. Onboard 20DI, including 4 high-speed color mark latches and 2 sets of high-speed single-ended encoders; 4. Onboard 20DO, including 4 high-speed single-ended pulse axes and 4 sets of high-speed PWM;
5. Supports DVI-D and HDMI displays, and supports different IP settings for dual network ports.
To learn more about the VPLC711, please click on "x86 Platform Real-time Windows Machine Vision EtherCAT Motion Controller VPLC711".