EtherCAT Master

This section describes how to configure the namespace of the TwinCAT OPC UA Server in order to obtain access to the symbols of an EtherCAT master. This requires the following steps to be carried out:

These steps are described in more detail below.

Activating the symbol file

To make the symbols of an EtherCAT master available via OPC UA, you must first activate the ADS server in the image of the EtherCAT master and the generation of the symbols. This enables access to the symbols via ADS. In the same dialog, you will also find the ADS port, which will be required later in the configuration process.

EtherCAT Master 1:

By activating the "Generate .tmc file" and "Copy .tmc file to target" parameters, a symbol file is generated and automatically downloaded to the target device when the configuration is activated. This is then located in the TwinCAT boot directory and has the ADS port in the file name for easy identification, for example:

%TwinCATInstallDir%\3.1\Boot\Io\Port_27905.tmc

Configuration of the server

You can now use the TwinCAT OPC UA Configurator to configure the TwinCAT OPC UA Server so that it reads the generated symbol file and makes the EtherCAT master available as a data access device in its address space.

Add a new device in the Data Access tab of the TwinCAT OPC UA Configurator. Select the AMS Net ID of your device and enter the ADS port of the EtherCAT master image (see above).

Now select the "EtherCAT Master (TMC)" entry from the selection list in the "Type" field. In the "SymbolFile" field, select the symbol file (TMC) that was created after activating the TwinCAT project and should now be located in the boot directory. Alternatively, you can also use the online symbolism.

EtherCAT Master 2:

You can leave all other settings at their default values.

Changing the namespace structure

The parameter "Generate hierarchical symbol names" enables a different structure of the symbol space, which also has a direct effect on the namespace of the TwinCAT OPC UA Server.

EtherCAT Master 3:

Let's take the following EtherCAT master configuration in TwinCAT XAE as an example:

EtherCAT Master 4:

If this option is activated, the namespace reflects the structure in TwinCAT XAE:

EtherCAT Master 5:

If this option is disabled, the namespace is structured "flatter":

EtherCAT Master 6: