07 EtherCAT

Last modified by Wecon on 2025/09/03 21:02

Description

EtherCAT is an open industrial field technology based on Ethernet, which has the characteristics of short communication refresh cycle, small synchronization jitters, and low hardware cost.

Master station configuration

Double-click the EtherCAT node of the project management tree to pop up the EtherCAT configuration, modify the configuration and save it.

1744341705534-984.png

Configuration description

  1. Synchronous unit cycle: how long does it take to synchronize data.
  2. PreOP->OP timeout: the timeout from PreOP state to OP state during the initialization of OP;
  3. Automatically restart slave station: after it is enabled, if the slave is offline or powered off, it will try to recover to OP status;
  4. EtherCAT enables following PLC RUN status: after it is enabled, PLC RUN triggers EtherCAT to execute the process to OP;
  5. Synchronous offset: the percentage of time offset allowed during synchronization;
  6. Offline shutdown of EtherCAT bus: if a device is offline, the EtherCAT function will be disabled and all stations will switch to PreOP state. If automatic restart of slaves is enabled, it will be all restarted.

Import and add slaves

Import configurations

Right-click the EtherCAT node in the project management tree, click New, click the Import button in the pop-up Add Slave window, and select the EtherCAT xml file of the corresponding manufacturer to import.

1744341765703-669.png

Add a slave station

Right-click the EtherCAT node in the project management, click New, select a slave type and click Add, a new slave node will be added to the EtherCAT node in the project management, and click Close to end the operation of adding a slave.

1744341765720-985.png

Copy to new item

Right-click to select the slave node under the EtherCAT node in the project management, click “Copy to New Item”, and create a new slave node with exactly the same configuration as the selected node.

1744341765723-496.png

Slave station configuration

Delete

① Right-click the EtherCAT node, select [Delete all], and delete all currently created slave station configurations.

1744341765723-851.png

② Right-click the slave station under the EtherCAT node, select Delete, and delete the current slave station configuration.

1744341765724-681.png

Update devices

① Right-click the EtherCAT node and select [Update All Devices] to update the configuration information of the current EtherCAT node to the newly imported EtherCAT configuration file information.

1744341765725-408.png

1744341765725-319.png

② Right-click the slave station under the EtherCAT node, select [Update equipment], and update the configuration information of the corresponding slave station node to the newly imported EtherCAT configuration file information.

1744341765726-520.png

 Slave station parameters

1744341765727-592.png

Double-click the slave station under the EtherCAT node, and the EtherCAT configuration dialog box will pop up. In the slave station parameter interface, check the enable expert parameter to use the expert process data interface and the check box and edit box below.

▪Check Vendor ID: During activation, check whether the downloaded slave configuration is consistent with the slave vendor ID connected to the PLC;

▪Check Product ID: During activation, check whether the downloaded slave configuration is consistent with the slave product ID connected to the PLC;

▪Check version number: Check whether the version numbers are consistent when activated;

▪SDO access timeout: Set the SDO access time.

Distributed clock

This part is used to set the synchronous operation mode of the slave station. The interface is as follows:

1744341789527-748.png

Sync unit mode: Generally, EtherCAT slave stations have FreeRun mode, running mode synchronized with input and output events (SM-Synchron), and running mode synchronized with distributed clock (DC-Synchron). Depending on the selected slave station, the options supported by the synchronous unit mode will be different.

Take the Wecon VD3E EtherCAT Servo V1.11 module as an example. This module supports SM-Synchron mode, and neither SYNC0 nor SYNC1 can be set. There is only one interrupt of data input and output events inside the clock slave station. The processing logic inside the slave station is shown in the following figure:

1744341789530-451.png

At the same time, this module also supports DC-Synchron mode. In this mode, the Sync interrupt of the slave station can be configured. DC synchronization events are enabled by default, and SYNC0 interrupt is enabled. The cycle of SYNC0 interrupt is the same as the synchronization cycle of the EtherCAT master station. SYNC1 interrupt is not enabled.

1744341789531-717.png

When "Enable expert parameters" is checked, select DC mode in the drop-down box, such as "DC-Synchron", and check "Enable cycle synchronization event". SYNC0 and SYNC1 groups will be restored from the disabled state to the enabled status, and SYNC0 enable button will be checked by default. The configuration is shown in the figure below:

1744341789531-396.png

The drop-down box selects a non-DC mode, such as "SM-Synchron", the SYNC0 and SYNC1 groups are all grayed out, and the cycle time and offset time are both 0.

1744341789532-901.png

Alias settings

Check "Enable expert parameters" to set the slave alias, or check "Equipment optional" to force the slave to configure the alias. To use the site alias function correctly, please follow the following steps:

1. Create the configuration, uncheck "Alias Enable", and wait for the slave station to start normally after downloading the program.

2. Check "Enable expert parameters" or "equipment optional" and enter an alias.

1744341789533-378.png

3. In monitoring mode, click the "Write EEPROM" button and wait for the writing to complete.

1744341789534-367.png

4. After the writing is completed, re-power the slave station and check whether the alias was really written successfully through automatic scanning.

Expert parameters

1744341789534-573.png1744341789535-883.png

▪Select ① the synchronization manager table area, select input and output, and ② the PDO allocation table area will be updated with the PDO allocation list corresponding to the output or input of the synchronization manager;

▪Check or uncheck to enable the ②PDO allocation form area, which will be fed back to the ③PDO list;

▪Select the checked row in the ③PDO list, and the contents of the ④PDO content table will be updated;

▪In the ④PDO content table, right-click the menu and select Add or click the ⑤Add button, select the content to be added in the Add PDO content interface, and then click Add;

▪After selecting the content to be deleted in the ④PDO content table, right-click the menu and select Delete or directly click the ⑥Delete button to delete.

Process data

Except that the process data interface cannot customize the PDO content, other functions are basically the same as the expert process parameters.

1744341815071-354.png

I/O mapping

For the PDO content set by the process parameters, user can select devices or variables for mapping.

1744341815073-664.png

Start-up parameters

1744341815074-991.png

① Add

Right-click the menu to select [Add] or click [Add] directly to enter the interface for adding startup parameters, select the corresponding item, and add startup parameters.

② Delete

After selecting the parameter content to be deleted, right-click the menu and select delete or directly click the delete button to delete.

Slave information

Display slave station information.

1744341815074-931.png

Alias

Alias parameter configuration

Check [Enable expert parameters] and [Equipment optional] to use [Alias] function.

After [Expert parameters] enables, you can choose whether you need alias.

After [Equipment optional] enables, alias forcibly enables.

[Equipment optional] means that this device is an optional device and may not exist. When the device cannot be found, it will not run. If MC_POWER runs, it will not be successful and report error. [Alias enable] is forcibly turned on, that is, when the corresponding device must be found through alias and the product information must be checked, the product must be matched before it can be recognized normally.

If it is an alias set in [Expert mode], even if the alias is not found, the equipment of the corresponding model can run normally if it is found in order.

Example

  1. 5 devices: A, B, C, D, E. The link order is E, D, A, C, B, which will be searched according to aliases, and all of them correspond to configuration order. It will run normally.
Configuration orderAliasLink orderAlias
A1E5
B2D4
C3A1
D4C3
E5B2
  1. 5 devices: A, B, C, D, E. Check [Equipment optional], and the order of links is d, a, c, and b. When using e, the corresponding FB will report an error, but it will not affect the use and operation of other devices;
Configuration orderAliasLink orderAlias
A1D4
B2A1
C3C3
D4B2
E5  
  1. 5 devices: A, B, C, D, E. C and E turn on [Device optional], and the link order is e, d, c, b. Since a does not turn on [Device optional] and cannot be found at the same time,When OP, it cannot be OP, the error "Device not found" will be reported.
Configuration orderAliasLink orderAlias
A1E5
B2D4
C3C3
D4B2
E5  

If it is an alias set in expert mode, even if the alias is not found, the device of the corresponding model can run normally if it is found in order.

Example

5 devices: A, B, C, D, E. The link order is e, d, a, c, b.

The aliases b, d, and e are all corresponding. At this time, a and c will be found if they do not match. (After b, d, and e are matched, pull out these three units from both sides, and then it becomes: Configure the order, a, c, and find the link sequence so that a and c can be found.

Configuration orderAliasLink orderAlias
A1E5
B2D4
C3A10
D4C30
E5B2

If the aliases of a, d, and e correspond, b and c cannot be found if they do not match. (After the same removal, configure the order, b, c, search link sequence. So, c, b can't be found.)

Configuration orderAliasLink orderAlias
A1E5
B2D4
C3A1
D4C30
E5B20

Note

If [Expert mode] and [Equipment optional] are both checked, it will run according to [Equipment optional];

l At present, the first version does not support the situation that there are more linked devices than the configured ones, and there are more devices that can be linked normally;

For example, link 5 devices configured5 units, if one of them is set with [Device Optional] but there is no correspondence, it cannot be enabled at this time;

In addition, uncheck [Manufacturer id] and [Model check], although in some cases you can only check alias correspondence, and sequential matches are forced. But there is no guarantee that it will operate normally;

Except 0 aliases, aliases that can be normally corresponded are not allowed to be duplicated. Before OP, this section will be checked (SM1900 off->on Instantaneous detection), for example, during the process, it is allowed to set two identical aliases to the slave station, but after setting OP again(instruction or  STOP RUN Errors will also be reported.

Alias writes to servo

In monitoring mode, click on the EtherCAT device interface in the project management interface.

At this time, the following interface appears. Different from the non-monitoring mode, [Write EEprom] appears. This button writes the alias to the corresponding servo.

The execution rules for this key are:

After OP, (SM1902 ON) will be set according to the device corresponding to the configuration. If there is no correspondence, it will prompt that the setting failed;

Before OP, (SM1902 OFF) is aliased according to the link sequence Regardless of whether the model corresponds or not, set it directly. If there is no correspondence, the setting will fail.

Simple configuration instance

When an EtherCAT device configuration exists, open the EtherCAT configuration of the corresponding slave station.

1Check [Start Expert Parameters] and [Alias Enable], and then configure the corresponding alias to be written into the "Alias Address"; 2 Save the configuration and download it to Run in PLC;

When the link sequence corresponds, the corresponding servo can still be matched. 3Open the software device monitoring interface and observe that SM1902 is ON;

4 Open the EtherCAT configuration interface, click [Write EEprom], and write the alias to Servo;

Restart the servo and PLC can be matched by alias.

Then check [Device optional] in edit mode.

After removing the linked EtherCAT device and re-downloading the ladder diagram that checks the optional device, the ladder diagram can still start normally. However, MC_POWER corresponding to the axis cannot be started (but no error will be reported), and the IO mapping does not work.

In the same ladder diagram, connect the corresponding equipment, and then stop->run. The corresponding device of run PLC can be used normally.

Expert parameters

. Select ① Synchronization Manager table area, select input and output, ② PDO allocation table area will be updated to synchronization manager output or the PDO allocation list corresponding to input;

. Check or uncheck “enable ② PDO allocation table area”, which will be fed back to the ③ PDO list;. Select the checked row in the ③ PDO list to update the ④ PDO content table;

. In the ④ PDO content table, right-click to select Add or click the ⑤ Add to add Select the content to be added in the PDO content interface and click Add;

. After selecting the content to be deleted in the ④ PDO content table, right-click the menu to select Delete or directly click the ⑥ Delete button to delete it.

Process Data

The process data interface is basically consistent with the expert process parameter functions except that PDO content cannot be customized.

I/O Mapping

For PDO content set by process parameters, you can select device or variables to map.

Start Parameters

① Add

Right-click the menu to select [Add] or directly click [Add] to enter the interface for adding startup parameters, select the corresponding item, and add startup parameters. ② Delete

After selecting the parameter content to be deleted, right-click the menu to select delete or directly click “Delete”.

Slave station information

Display slave station information.

Device scanning     

EtherCAT device scanning supports direct scanning after connecting or uninstalling a device.

1 Select the EtherCAT label, and right-click to select the scanning device in the pop-up menu;

2 Click the "Scan device" in the pop-up window. If not connected to PLC, it will report an error, as shown in the following error message;

3 After the scan is completed, you can see the scanned slave devices from the left side. Only when the name and type of the scanned device are inconsistent with the current configuration device, click Copy All to update the scanned device to the currently configured configuration list, and then click Save to scan the scanned device.

Update to the configuration list of the project, click Exit to not update to the configuration list.

as shown in the figure below, after updating to the configuration list of the project, Wecon VD3E EtherCAT Servo v1.11 in the configuration will automatically associate the motion control axis and overwrite the original device and the associated control axis.

If there are unrecognized devices in the scanned devices, as shown in the figure below, "Copy all" and "Save" will be disabled to update to the existing configuration, and "Import Missing Profile" will be enabled. You can import the corresponding ESI according to the access device, and scan the device again after correct import to refresh the scan device.