Configuring an EAP device object

The configuration of an EAP device object involves several steps. If the Connector tool is not used (see section The Connector tool), the elements Tx variable, TxPDO, TxData and TxFrame have to be generated individually step by step for each EAP Publisher variable and referenced with each other via the configuration. For an EAP Subscriber variable, the elements are Rx variable, RxPDO and RxData.

I. Manual configuration of a Publisher variable

1. Generate and configure TxVariables and TxProcessDataObjects as described in section Generate variables.
2. Generate and configure TxData as described in section The TxData tool and section The TxData.
3. Generate and configure a TxFrame as described in section The Frame tool or The frame.
An EAP Publisher variable is fully defined.
Configuring an EAP device object 1:

Required configuration properties for successful data transfer

When configuring a Publisher variable, ensure that at least the following properties are configured, so that data transfer can take place:

  • For the TxFrame…
    … the property Enabled must be set to true, and
    … a valid destination address must be defined.
  • For TxData…
    … the property Enabled must be set to true,
    … a PDO number must be entered as a basis for referencing a TxProcessDataObject, and
    … a trigger condition including a valid trigger such as a cycle time must be defined.
  • The TxPDO must…
    … have at least one variable.

II. Manual configuration of a Subscriber variable

1. Generate and configure RxVariables and RxProcessDataObjects as described in section Generating variables.
2. Generate and configure RxData according to the description in section Interaction with the graphical user interface (GUI). and Configuring an EAP device object.
An EAP Subscriber variable is fully defined.
Configuring an EAP device object 2:

Required configuration properties for successful data transfer

When configuring a Subscriber variable, ensure that at least the following properties are configured, so that data can be received:

  • For RxData…
    … the property Enabled must be set to true,
    … a PDO number must be entered as a basis for referencing an RxProcessDataObject, and
    … the ID must match the ID of the Publisher variable to be received.

Generating variables

The command [Variables Configuration] from the context menu of the EAP device object opens a dialog (see illustration) for generating and editing Tx variables or Rx variables. The dialog is divided into three areas.

Configuring an EAP device object 3:
  1. The buttons at the top left are used to generate or edit variables.
  2. The right-hand part consists of a list, which shows variables that already exist.
  3. At the bottom left are operator control elements for activating/deactivating display filters, which are applied to the variable list.

Create Tx Variable (0x6000)/Create Rx Variable (0x7000)

The buttons [Create Tx Variable (0x6000)] and [Create Rx Variable (0x7000)] open the dialog for adding a new variable. The dialog offers two options for defining a variable.

Configuring an EAP device object 4:
Configuring an EAP device object 5:

Finally, the [Create] button is used to create the variable, which can then be found in the list among the existing variables.

Edit

The [Edit] button can be used to edit an existing variable. The variable to be edited must be selected first. The edit option is helpful, if a different symbol name is to be entered for linking with another PLC variable, for example.

Remove Selected

The [Remove Selected] button deletes the selected variable.

Generating process data objects

The command [Process Data Configuration] from the context menu of the EAP device object opens a dialog (see illustration) for generating and editing Tx or Rx PDOs. The dialog is methodically divided into two areas.

Configuring an EAP device object 6:

The left half displays all existing process data in a list. To the left of this list there are buttons for creating new PDOs or deleting PDOs. The operator control elements located below can be used to activate/deactivate display filters, which are applied to the PDO list.

The right half displays a list of variables, which are assigned to the PDO selected in the left half. The buttons on the far right can be used to edit the variable list. The radio buttons [Easy View] and [Technical View] can be used to switch the variable display.

Create Tx PDO (0x1A00)/Create Rx PDO (0x1600)

The buttons [Create Tx PDO (0x1A00)] and [Create Rx PDO (0x1600)] create TxPDO and RxPDO instances, which are displayed directly in the PDO list.

Edit PDO

The [Edit PDO] button opens a dialog for generating and configuring process variables (see illustration above). In the context of a PDO configuration, this dialog is also used to select the variables to be added to the selected PDO. Each variable, whose checkbox is ticked, is added to the variable list for the select PDOs, once the dialog has been confirmed with [OK].

Remove Selected

The [Remove Selected] button on the left deletes the selected PDO.

The [Remove Selected] button on the right removes the selected variable from the PDO definition.

Show Variables – Easy View / Technical View

The variable display can be switched. In [Easy View], all variables assigned to the PDO are listed one after the other. [Technical View] is a coded display, as stored in the object dictionary of the TwinCAT EAP device.

The Properties window

The main configuration properties of the element currently selected in the user interface can be defined in the Properties window. Each element type has an individual list of properties. All lists have the property Data State in common. The Data State is for information only and cannot be changed in the Properties. It shows the current configuration state of the respective EAP device object.

  • None
    The configuration was not changed.
  • Changed
    At least one change was made in the configuration.
  • Written
    The current configuration was successfully transferred to the TwinCAT EAP device
  • Error
    An error has occurred. (e.g. during transfer of the configuration to the TwinCAT EAP device.)

The EAP device object

In the EAP device object, the following properties can be checked and modified via the Properties window (see illustration)

Configuring an EAP device object 7:

AMS Port

This property is reserved and has no function at present.

EAP Device Info File

This property is reserved and has no function at present.

Filename

This property is for information only; it indicates which file, including the full file path, belongs to this EAP device object. This file is loaded when the user interface is opened; any changes in the configuration are saved in this file.

Local AoE Net ID

The AMS NetID of the TwinCAT EAP device must be entered in the Local AoE Net ID. It is marked for the communication with the required TwinCAT EAP device.

This address is used for the communication between the EAP Configurator and the TwinCAT EAP device. The communication is required for reading the active configuration of a TwinCAT EAP device and for writing a new configuration from the TwinCAT EAP Configurator to the TwinCAT EAP device. If no valid NetID is entered, no communication with a TwinCAT EAP device can take place.

The first four digits of the Local AoE Net ID are always identical to the Router AoE Net ID. The last two digits of the Local AoE Net ID can never be .1.1, since these digits are reserved for the AMS NetID of the PC itself (cf. Router AoE Net ID).

Local IP

The Local IP is set when an active EAP configuration is read. It can also be set and modified manually. The IP is used when the TwinCAT EAP Configurator communicates via AoE and UDP/IP. In addition, the TwinCAT EAP Configurator needs this information to detect which EAP device object can be reached from a configured TxFrame with an IP address as destination address.

Local MAC

Like the Local IP, the Local MAC is also set when an active EAP configuration is read. It can also be set and modified manually. In addition, the TwinCAT EAP Configurator needs this information to detect which EAP device object can be reached from a configured TxFrame with an MAC address as destination address.

Name

This property indicates which file belongs to this EAP device object.

Operation State

The Operation State indicates which operation is currently executed by the EAP Configurator for this device object. Possible states are

Process Data

The property Process Data can be used to generate PDO elements. When this property is selected, a button is displayed, that can be clicked on in order to open the respective configuration dialog (cf. section Generating process data objects).

Router AoE Net ID

The Router AoE Net ID is set when an active EAP configuration is read. It is essentially intended for information only. The first four digits of the Router AoE Net ID and the Local AoE Net ID are identical. The last two digits of the Router AoE Net ID are always .1.1.

Protocol

The protocol defines the communication protocol that is used to transfer the configuration data from/to the TwinCAT EAP device. ADS and UDP are available. UDP means that the application protocol AoE via UDP/IP is used automatically (cf. The functional principle of the TwinCAT EAP Configurator).

The frame

The following frame properties can be checked and modified via the Properties window (see illustration).

Configuring an EAP device object 8:

Enabled

The property Enabled is used to activate or deactivate the frame.

Index

The Index is created automatically. It is shown in the list of properties for information only. It indexes the frame object in the EAP object dictionary and must not be modified manually.

Name

The property Name is also defined automatically, although it can be modified as required. The length is limited to 255 characters.

Subscriber Monitoring

The property Subscriber Monitoring can be switched on or off. Depending on which selection is made in the property Option (see below), Subscriber Monitoring is activated or deactivated by default. Subscriber Monitoring is used to monitor whether a receiver is still reachable in the network. This monitoring is only meaningful and possible, if the frame is addressed as Unicast, i.e. to a single receiver.

Option

This property is used to specify the addressing mode for the frame. Three addressing modes are available. The default addressing mode is via AMS NetID, which only enables Unicast. The other modes are MAC or UDP/IP. Both modes enable Unicast, Broadcast or Multicast (cf. Communication methods).

Configuring an EAP device object 9:

The ADS/AMS protocol only supports unicast communication

The Automation Message Specification (AMS) makes no provision for special addresses in the form of a Broadcast or Multicast AMS NetID, so that only Unicast communication is possible when the AMS NetID is used for addressing.

Target (AMS Net ID / MAC / IP)

The property Target (AMS Net ID / MAC / IP) is used to define the destination address. The AMS NetID is an address with a length of 6 bytes. The bytes are separated by dots. The MAC address is also 6 bytes long, which are separated by colons. The IP address is 4 bytes long, which are separated by dashes. If the addressing mode MAC or IP is used, an additional Type property field is displayed, which can be used to specify Unicast, Multicast or Broadcast.

The configured addressing mode determines which transport protocol is used for sending the EAP messages (cf. Communication methods).

Type

Specifies the connection type of a MAC-addressed or an IP-addressed frame (cf. Communication methods).

  • Unicast:
    The address of a particular receiver is entered under MAC or Target IP.
  • Multicast:
    Under Target MAC, the TwinCAT Multicast MAC address for network variables (01:01:05:04:00:00) is entered automatically. Any other multicast-valid MAC address can be entered, as required.
    Under Target IP, a Multicast IP address (i.e. 224.0.0.0) is entered automatically. Any other multicast-valid IP address can be entered, as required.
  • Broadcast:
    Under Target MAC, the Broadcast MAC FF:FF:FF:FF:FF:FF is entered automatically.
    Under Target IP, the Broadcast IP 255.255.255.255 is entered automatically.

VLAN Enabled

The property VLAN Enabled enables configuration of a frame for a virtual LAN. The property can be switched on or off. If VLAN is enabled, the EAP message is extended by a VLAN header. Accordingly, there are two further properties for determining the required VLAN and for specifying a priority for the processing of the message within a virtual network:

  • VLAN Info ID: defines the ID of the VLAN (range between 0 and 4095), in which the message is to be sent, and
  • VLAN Info Priority: defines a priority for the message in the VLAN (high priority = 7, low priority = 0).

TxData

The following TxData properties can be checked and modified via the Properties window (see illustration).

Configuring an EAP device object 10:

Index

The Index is created automatically. It is shown in the list of properties for information only. It indexes the TxData object in the EAP object dictionary and must not be modified manually.

Name

The property Name is also defined automatically, although it can be modified as required. The length is limited to 255 characters.

Enabled

The property Enabled is used to activate or deactivate the TxData.

ID

The property ID is used to assign an ID from the range 0 to 65535 for the TxData, which is unique across the network. The ID is automatically assigned whenever a new TxData is created. The same ID must be set for the RxData of a Subscriber, which is to receive data from this TxData.

Length

The property Length is included in the list for information only. It indicates the number of bytes in the data set of the referenced PDO (see PDO number). If no PDO is referenced, no size is specified. The Length of the TxData and the associated RxData at the receiver (Subscriber) must be identical. Otherwise the data are not received.

PDO Content

The property PDO Content can be used to generate TxPDO elements. When this property is selected, a button is displayed, that can be clicked on in order to open the respective configuration dialog (cf. section Generating process data objects).

PDO Number

The property PDO Number is used to specify which PDO is referenced by the TxData. A selection box shows all available TxPDOs.

Version

The property Version is set to 0 by default. Version can be used to assign a version number to the TxData. The user should increment the version number when the TxData configuration is modified, so that the structure of the user data is distinguished from the previous version. The version number enables the Subscriber to detect that the received user data no longer match the expected data structure. During normal operation it compares the version number defined for RxData with the version number sent by the Publisher. If the version numbers do not match, the data is discarded and therefore not received. In this way it is possible to avoid a scenario where invalid data are received when the EAP variables are changed on one side. A one-sided change means the configuration is changed only at the TxData of the Publisher or only at the RxData of the Subscriber.

Trigger Condition

For a TxData one of three mechanisms is set, which defines how sending of data is triggered. The predefined Trigger Condition is the Cycle Time. In this case, data are sent cyclically at a defined interval. The time interval is defined under the property Cycle Time.

Another option is Change of State (CoS). In this case data are only sent if there was a change since the last task cycle. If this mechanism is used, the properties CoS Change Timeout Time and CoS Inhibit Time are used to define two delay times to control the mechanism (cf. section EAP send mechanism).

The third option is Polled. In this case the property Poll Request Rx PD must be defined. In this configuration the TxData acts as a client in a client/server model. The TxData is sent as request to a server. In this case the property Poll Request Rx PD defines the receive buffer for the expected response from the server.

Cycle Time

The property Cycle Time defines the interval at which the data are sent, in microseconds [µs]. If a time of 10000 µs was entered, the data are sent every 10000 µs = 10 ms = 0.01 s. The smallest possible cycle time depends on the task cycle time driving the EAP device. The resulting cycle times should always be integer multiples of the task cycle time.

CoS Change Timeout Time

This property is used to define a maximum delay time for the Change of State mechanism. It determines the interval for sending the TxData, if the data of the process variables assigned to this TxData have not changed within the interval.

CoS Inhibit Time

This property is used to define a minimum delay time for the Change of State mechanism. It specifies the duration for which sending of the TxData is interrupted, even if the data of the process variables assigned to this TxData have changed within this period. By definition, the Inhibit Time (minimum delay time) can never be greater than the Change Timeout Time (maximum delay time).

Poll Request Rx PD

For the Polled mechanism, this property is used to define the index of the RxData to be used as receive buffer.

RxData

Configuring an EAP device object 11:

Filter AMS Net ID

The Filter AMS Net ID is used for RxData to specify that an EAP variable can only be received if it was sent by the EAP device with the defined AMS Net ID.

Index

The Index is created automatically. It is shown in the list of properties for information only. It indexes the RxData object in the EAP object dictionary and must not be modified manually.

Multicast MAC Address

The property Multicast MAC Address can be used to set up a multicast MAC address for the EAP device (cf. section Communication methods).

Configuring an EAP device object 12:

Multicast MAC Address

Under TwinCAT, the default Multicast MAC Address set for an EAP device is 01:01:05:04:00:00. Further addresses can only be configured with the aid of TwinCAT 3 during commissioning of the TwinCAT system. It is not possible to configure additional multicast addresses for a TwinCAT EAP device with the aid of the TwinCAT EAP Configurator, since this is used to configure the EAP device after the TwinCAT system has been commissioned (Run mode).

Multicast IP Address

The property Multicast IP Address can be used to set up a multicast IP address for the EAP device. For this property the same restrictions apply as for the Multicast MAC Address. Multicast IP addresses are only required if the communication is to take place beyond the subnet boundary, i.e. via a router into other subnets.

Configuring an EAP device object 13:

Multicast IP address

An EAP Publisher, for which a Multicast IP Address is configured as the destination address in TwinCAT 3, is assigned the Multicast IP Address 224.0.0.0 by default. Other Multicast IP Addresses may be used, as required. TwinCAT generates a compliant multicast MAC address for each configured multicast IP address, which is used when TwinCAT starts up (i.e. when the Run mode is activated).

It is not possible to configure additional multicast IP addresses for a TwinCAT EAP device with the aid of the TwinCAT EAP Configurator, since this is used to configure the EAP device after the TwinCAT system has been commissioned (Run mode).

Name

The property Name is also defined automatically, although it can be modified as required. The length is limited to 255 characters.

Enabled

The property Enabled is used to activate or deactivate the RxData.

Ignore Version

The property Ignore Version can be used to specify whether a version check should take place when EAP variables are received. If Ignore Version is set to TRUE, an EAP variable can be received even if its version number does not match the version number defined here.

Poll Request Tx PD

The property Poll Request Tx PD only has to be defined if RxData is to be used for the Polled mechanism. Otherwise the value entered must remain 0.

In the Polled mechanism, RxData acts as a server in a client/server model. RxData then receives a request from a client. The property Poll Request Tx PD defines which TxData is sent as immediate response to the request. To this end the index of the required TxData is defined.

ID

The property ID is used to assign an ID from the range 0 to 65535 for the RxData, which is unique across the network. The ID is automatically assigned whenever a new RxData is created. The RxData that is used to receive the TxData must have the same ID as the sending TxData.

Length

The property Length is included in the list for information only. It indicates the number of bytes in the data set of the referenced PDO (see PDO number). If no PDO is referenced, no size is specified. The Length of the RxData and the length of the associated TxData of the sender (Publisher) must be identical. Otherwise the receiver (Subscriber) will not receive the data.

PDO Content

The property PDO Content can be used to generate RxPDO elements. When this property is selected, a button is displayed, that can be clicked on in order to open the respective configuration dialog (cf. section Generating process data objects).

PDO Number

The property PDO Number is used to specify which PDO is referenced by the RxData. A selection box shows all available RxPDOs.

Version

The property Version is set to 0 by default. Version can be used to assign a version number to the RxData. The user should increment the version number when the RxData configuration is modified, so that the structure of the user data is distinguished from the previous version. The version number enables the Subscriber to detect that the received user data no longer match the expected data structure. During normal operation this version number is compared with the defined version number. If the version numbers do not match, the data is discarded and therefore not received. In this way it is possible to avoid a scenario where invalid data are received when the EAP variables are changed on one side. A one-sided change means the configuration is changed only at the TxData of the Publisher or only at the RxData of the Subscriber.