Identification and Hot Connect of Slaves
This topic contains the following sections:
Addressing in EtherCAT networks
Auto-increment addresses: While there is no EtherCAT network configuration (ENI) available on the EtherCAT master, each slave device automatically gets a physical address during EtherCAT startup according to its position in the network and the order in which it is detected (auto-increment addresses).
Station address: After configuring the EtherCAT network in PLCnext Engineer, an ENI is available. After writing the configuration to the master, the master writes this network configuration to the slaves. As a result, the auto-increment slave addresses are overwritten by logical addresses which are also referred to as station address (numerical value between 1 and 65535). The station address does not necessarily depend on the physical address (i.e., network position) of the slave. Instead, it can be assigned in the 'Settings' of each slave. During operation, each slave is addressed by this station address.
Evaluating only the station address alone can lead to application errors: Slaves can be uniquely addressed in the network using their station address, as each slave is stored in the ENI with its 'Identity' data (vendor, product name, version, model code, etc. as shown in the 'Settings' editor of the slave) and the assigned station address. The master checks whether the slave actually found matches the information in the ENI.
However, if identical slave types are used in a network, there is a risk that if the network topology (slave sequence) has been changed (e.g. due to incorrect cabling), an identical slave type but with a different application function will be addressed at the stored station address. To avoid this, slaves offer one or more additional device identification modes, which are described in the following section.
Identification Modes in EtherCAT networks
The way in which a slave is identified by the master can be defined in the slave settings. Double-click the slave to be configured and open its 'Advanced Settings' editor. The identification modes the slave supports can be selected from the 'Mode' list box in the 'Identification' editor section.
The different settings offer varying degrees of protection against unintentional changes to the slave sequence in the network (e.g. by incorrectly plugging in the EtherCAT cabling). Depending on the setting of the slave parameter 'Identification Mode', the master checks in different ways (more or less rigidly) whether it is addressing the correct slave at the given address.
Identification in EtherCAT networks is also referred to as Device Recognition.
The following Identification Modes are defined. Which modes are actually supported depends on the slave:
| Note
Greater protection against misconfiguration by selecting an identification mode higher than 'None' is particularly important for changing network configurations, e.g. with Hot Connect (see section below). |
| Identification Mode | Description | How to configure in PLCnext Engineer | System behavior |
|---|---|---|---|
| None | No identification check takes place. | n/a | The slave is addressed under the station address stored in the ENI. This means that there is no increased protection in the event of topology errors (for example, due to identical slave types at the wrong bus position). |
| Configured Station Alias | The station alias is an optional identification value in addition to the station address to uniquely identify the slave in the network. It can be used to implement greater protection against topology errors. If the slave used supports station alias and Explicit Device ID, both features cannot be used at the same time.The station alias is stored in the ESC Configured Station Alias (0x0012) register when the power supply is switched on.The EtherCAT Group also refers to the station alias as the Second Slave Address (SSA). | The way, the station alias has to be configured differs depending on the device type.Refer to the Technical Manual of your slave device type for information how to setup the station alias.This station alias value configured for the device must be entered in the 'Settings' editor, section 'Identification', field 'Value'. This value is then stored in the network configuration. Value range: 0 to 65535 | During device startup, the ESC (EtherCAT Slave Controller) loads this address into its register 0x0012, from where it can be read by the EtherCAT master.The master uses auto-increment addressing to read the station aliases of the configured slaves. It then compares the detected station aliases with the network configuration to get the topology that was set as the network topology.If this comparison shows differences, EtherCAT communication is not established and an error is output. To rectify the error, evaluate the error message and use the 'Mismatch Analyzer' in the 'Online Functions'. |
| Explicit Device ID | The Explicit Device ID is an optional identification value in addition to the station address to uniquely identify the slave in the network. It is the latest type of device identification (according to ETG 1020 standard, 01.2016), which is usually faster than identification via station alias. Like the station alias, it can be used to implement greater protection against topology errors. If the slave used supports Explicit Device ID and station alias, both features cannot be used at the same time. The value is stored in the ESC register (0x0134). | This identification mode is not supported by all devices.The way, the Explicit Device ID has to be configured differs depending on the device type. Refer to the Technical Manual of your slave device type for information how to setup the Explicit Device ID.This Explicit Device ID value configured for the device must be entered in the 'Settings' editor, section 'Identification', field 'Value'. This value is then stored in the network configuration. The value range depends on the device type. | The ESC (EtherCAT Slave Controller) loads this address into its register 0x0134, from where it can be read by the EtherCAT master.The master uses auto-increment addressing to read the Explicit Device IDs of the configured slaves. It then compares the detected Explicit Device IDs with the network configuration to get the topology that was set as the network topology.If this comparison shows differences, EtherCAT communication is not established and an error is output. To rectify the error, evaluate the error message and use the 'Mismatch Analyzer' in the 'Online Functions'. |
| Input Word | A bit sequence which corresponds to the station address (0...65,535) is stored in the process data area of the slave. This value is interpreted by the master as the station address. | This identification mode is not supported by all devices.Consult the technical manual of your device for more information.Enter the 'Offset' address where the identification value is to be stored in the process data area of the slave. Enter the station address of the device as 'Value'. | Using the 'Offset' value specified in the editor, the EtherCAT master is informed of the storage location via the ESI description. The master then compares the detected identification word entered in the 'Value' field with the expected value.If this comparison shows differences, EtherCAT communication is not established and an error is output. To rectify the error, evaluate the error message and use the 'Mismatch Analyzer' in the 'Online Functions'. |
Hot Connect
In a "normal" EtherCAT network, the topology is clearly configured, which means that the order and network position of the slaves is normally fixed. With Hot Connect, however, the network topology can be adapted dynamically. Therefore, the Hot Connect function enables flexible topologies, which is useful if the application requires frequent topology changes or if slave devices are not available or need to be replaced frequently during commissioning.
Once Hot Connect has been activated in the master 'Settings', the master automatically recognizes the new configuration after slaves have been added or removed. In doing so, it takes into account the individual Hot Connect settings configured for each slave. Slaves assigned to a Hot Connect group can easily be removed from or added to the EtherCAT data traffic. The master can immediately integrate new participants or correctly delete removed/disconnected slaves without disrupting the communication of the other devices. Topology modifications are possible before the start or during operation of the EtherCAT system. Slaves can be added/removed by connecting/disconnecting the communication line, switching the devices off/on or by other means.
After slaves have been connected to a Hot Connect group, the master carries out the commissioning of the slaves: It establishes the Ethernet link, parameterizes the devices and then performs the EtherCAT boot sequence (state transitions from INIT to OP). If configured, finally the Distributed Clocks synchronization follows. This process, from identification to operation of the slaves in the Hot Connect group, can take up to several seconds depending on the slave position.
| Note
Hot Connect and Identification Mode: If slaves belong to a Hot Connect group, setting an 'Identification Mode' other then 'None' is of particular importance: The Station Alias or Explicit Device ID helps to clearly assign and uniquely identify the devices, even if they are plugged in different positions. When a Hot Connect segment is plugged in, the EtherCAT master recognizes the new slave and can immediately identify it in the Hot Connect segment, even if it is not in its original position in the network. If the EtherCAT master cannot detect a valid address in a hot connected slave station, the slave will not be accepted into the process data traffic. This ensures that the network configuration remains correct and the system continues to function seamlessly - without a restart. |
- The EtherCAT master supports Hot Connect.
- EtherCAT slaves are Hot Connect-capable.
- Only EtherCAT devices with an Ethernet RJ45 port (Y) can be added to their own Hot Connect group. If additional EtherCAT devices are connected to such a slave via an interface other than Ethernet RJ45 (e.g., LVDS/Eus instead of MDP), these downstream devices that have the same interface type must be added to the same Hot Connect group.
- If no device is currently a member of a Hot Connect group and the Identification Mode has not yet been configured, an error message appears stating that the Identification Mode of the device must be configured.
- When an existing Hot Connect configuration is disabled by deactivating the checkbox 'Create Hot Connect group' of the head device, the group ID is reset and the position in the topology is set to the default value. All group members are reset to the same default Hot Connect settings.
- When the Hot Connect group ID of the head device is updated, the group IDs of all other group members are not updated.
- Activating Hot Connect function on the EtherCAT master
- Double-click the 'EtherCAT' node in the PLANT (which represents the master).
- In the editor area, click the 'Advanced Settings' editor tab.
- In the 'General' section of the editor, active the checkbox 'Create HC Group for Slaves'.
-
For each slave that is to belong to a Hot Connect group:
- Double-click the slave node in the PLANT and open the 'Advanced Settings' editor.
- Active the checkbox 'Activate Hot Connect Configuration'.
- Select an entry from the 'Hot Connect Group Id' list box:
- Either add the slave into an already existing group (i.e., a group whose already defined head member is an upstream slave)
- or create a new group with the current slave as head by selecting the group ID which corresponds to the 'Identification Value' of the current device (provided that this value is already configured).
- Define the position in the EtherCAT field bus topology.
- Fixed to device_name. The position of the device in the topology is fixed and must match the configuration in PLCnext Engineer. It is derived from the order of the slave devices in the PLANT. The physical slave must be connected to the slave with the specified device_name.
This is the default setting while Hot Connect is not activated for the slave.If the device is not present at the specified position, EC_Topology_OK is set to FALSE and the EtherCAT network is interrupted. device_name stands for the device in the EtherCAT configuration. - Floating Hot Connect Group: Floating groups can be connected anywhere in the EtherCAT network - it is therefore not tied to specific ports. No fixed or predefined connection position is required (in contrast to static and dynamic HC groups), which means that the master automatically connects the group regardless of where it is connected.The slave device may be located in a different position in the network or even missing. EC_TOPOLOGY_OK remains TRUE in any case.
- Fixed to device_name. The position of the device in the topology is fixed and must match the configuration in PLCnext Engineer. It is derived from the order of the slave devices in the PLANT. The physical slave must be connected to the slave with the specified device_name.
