wRTOS E-CAT Hot Connect, AutoRepair, AutoRestart
This section describes wRTOS E-CAT Hot Connect, AutoRepair, and AutoRestart, and their use cases.
Note: The wRTOS E-CAT Hot Connect function requires the wRTOS E-CAT Hot Connect license (WEHC64). Contact IntervalZero Sales to purchase the license.
wRTOS E-CAT Hot Connect
wRTOS E-CAT Hot Connect allows you to add hardware dynamically. This enables integration of new devices without disrupting existing operations. You can also add devices through additional EtherCAT-compatible ports, such as Ethernet (via T-junctions and couplers), eBUS (on couplers), and M12 connectors (on waterproof devices).
Users can add hardware at the beginning or between existing devices. However, adding a device at the beginning requires restarting the EtherCAT connection, as it involves unplugging the cable connected to the host PC (MainDevice), which takes all devices offline. You can avoid this disruption by using E-CAT Cable Redundancy. Since the goal of wRTOS E-CAT Hot Connect is to avoid interruptions, hardware is usually added at the end or between existing devices.
Note: Any device added before the DC reference clock device cannot use DC synchronization.
When wRTOS E-CAT Hot Connect is enabled, you can add hardware while the EtherCAT network is running. If it is disabled, you can only add hardware when the EtherCAT network is stopped and restart the MainDevice using RtecatRestart. To enable wRTOS E-CAT Hot Connect, call RtecatSetFeatureStatus and set parameter Feature to ecatFeatureHotConnect.
The diagram below shows the relationship between a SubDevice's index and its position on an EtherCAT network. When the EtherCAT network starts, the connected SubDevices are arranged sequentially according to their EtherCAT connection order. The SubDevice connected directly to the MainDevice is the first device. The MainDevice sorts SubDevices by index, which corresponds to the E-CAT SubDevice array.
However, when SubDevices are added or removed while the EtherCAT network is in the Operational (Op) state, their positions on the network may change, but their indexes remain the same. Newly added SubDevices are appended to the end of the E-CAT SubDevice array in sequence. As a result, a SubDevice's position and index may no longer align. Please refer to the following use cases for more details.
Note: This behavior applies only to physical SubDevices. It does not affect simulated ones.
Use Case 1: Adding, Removing, and Reconnecting SubDevices
Adding SubDevices when Hot Connect is enabled
In this scenario, four SubDevices (A, B, C, and D) are connected to the EtherCAT network. If we insert SubDevice E between SubDevice A and B, and SubDevice F between SubDevice B and C, SubDevice E and F will be recognized as Index 4 and Index 5 in the SubDevice array, respectively. The positions of SubDevice B, C, and D will change accordingly. However, their indexes will remain unchanged.
Removing a SubDevice when Hot Connect is enabled
Continuing from the above case, if we remove SubDevice E from the EtherCAT network, the positions of the SubDevices connected after SubDevice E will change. However, their indexes will remain unchanged.
Reconnecting a SubDevice to a different position when Hot Connect is enabled
Continuing from the above case, if we reconnect SubDevice E to a different position (Position 4), its Index will still be Index 4, as the MainDevice recognizes it as the same device with the same Vendor ID and Product Code.
Use Case 2: Adding SubDevices Using a T-Junction When Hot Connect Is Enabled
In this scenario, four servo drives are connected to the EtherCAT network. We want to add two more between the third and fourth using a T-junction. These two additional drives are connected via the Ethernet ports on the T-junction. The MainDevice recognizes them as Index 4 and Index 5 (indexes are zero-based) in the SubDevice array.
AutoRepair
AutoRepair allows you to replace a broken SubDevice or cable with a new one while all other SubDevices and the EtherCAT network are in operation. It restores the new SubDevice' EtherCAT state to Operational (Op). You must use the same model to replace the old one, as EtherCAT applies the old model's settings to the new SubDevice. If the replacement model has the same Vendor ID and Product Code and is compatible with the original SubDevice's settings, it can be used.
When AutoRepair is enabled, the EtherCAT states of the new SubDevice and all the SubDevices downstream from it are automatically changed to the Op state. When AutoRepair is disabled, their states transition to Init, and you must manually change them to Op.
To enable AutoRepair, call RtecatSetFeatureStatus and set parameter Feature to ecatFeatureAutoRepair.
To manually change a SubDevice's EtherCAT state, call RtecatRequestSubDeviceState.
Use Case 1: Replacing a SubDevice When AutoRepair is Enabled
In this scenario, five servo drives are connected to the EtherCAT network, and we want to replace the third one. We unplug the cable between the second and third drives. As a result, the third drive and all drives downstream from it go offline. We replace the third drive with the same model and plug the cable back. The EtherCAT states of the third drive and all downstream drives are initially Init, and then transition to Op.
Use Case 2: Replacing a SubDevice When AutoRepair and Hot Connect are Enabled
AutoRepair restores a replaced device of the same model, requiring the same Vendor ID and Product Code. Hot Connect adds new devices during EtherCAT operation. If the new device has a different Vendor ID or Product Code from the original, Hot Connect is applied. If they match, AutoRepair is applied.
In this scenario, five servo drives are connected to the EtherCAT network. We want to add two more between the third and fourth drives. We unplug the cable between the third and fourth drives, causing the forth and fifth drives to go offline. After connecting the two new drives, we plug all the cables back. The previously offline drives come back online, and their states transition to Op.
In this case, the original fourth and fifth drives use AutoRepair because their models remain unchanged. The two newly added drives use Hot Connect.
AutoRestart
AutoRestart restarts the MainDevice when the cable connected to it is unplugged and then plugged back.
When AutoRestart is enabled, the MainDevice restarts automatically when the cable is plugged back. When it is disabled, the MainDevice doesn't restart automatically. You must manually start or restart it.
To enable AutoRestart, call RtecatSetFeatureStatus and set parameter Feature to ecatFeatureAutoRestart. To manually start or restart the MainDevice, use RtecatStart or RtecatRestart.
Note: RtecatStart scans devices on the EtherCAT network while RtecatRestart doesn't. Because of this, RtecatStart is slower than RtecatRestart. If you add new hardware without using Hot Connect, you must call RtecatRestart.
Use Case: Auto Restarting the MainDevice When Hot Connect is Enabled
In this scenario, five servo drives are connected to the EtherCAT network. The cable connected to the MainDevice is loose. After plugging it back, the MainDevice and all connected drives restart automatically.