PROFINET device (EL6631-0010) integration under TwinCAT 2.11

This description applies to the PROFINET DEVICE EL6631-0010.

1. Integration of the EL6631-0010 into the EtherCAT network

Insert the EL6631-0010 into your TwinCAT project.

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 1:
Integration of the EL6631-0010 in the TwinCAT project

2. Integration of the PROFINET protocol

A PROFINET device must first be added - EL6631-0010.

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 2:
"Insert Device" dialog

This interface must be assigned to an adaptor class. This is composed of the MAC and IP address of the network card. Use "Search" to look for the corresponding EtherCAT terminal. If there is only one terminal in the system, it will be configured automatically.

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 3:
"Adapter" tab

MAC Address:
MAC address of the Ethernet card (read-only)

IP Address:
IP address of the card (read-only). The IP address is read from the operating system, and has nothing to do with the PROFINET IP address that will be used later.

Promiscuous Mode:
Is not supported by the EL6631-0010

Virtual Device Names:
Is not supported by the EL6631-0010

Shared Adapter Interface:
Is not supported by the EL6631-0010

Free Cycle:
Cycle time in Config mode (no real-time). If TwinCAT is operated in FREERUN mode, care must be taken that the freerun cycle set is no longer than the PROFINET cycle!

 

If, e.g., a CX9000 is to be parameterized, the target system must first be accessed remotely; the corresponding Ethernet port can subsequently be selected.

The NetID used can be found under the "Protocol" tab. It is, e.g., necessary for an ADS access. Besides that, there is a possibility in the "Sync Task" tab to append a free-running task for PROFINET communication (this is recommended). This allows the RealTime communication to run independently of a PLC task. For performance reasons, however (e.g. in the case of a CX9000), the Sync Tasks can be dispensed with and standard mapping takes place, i.e. a PLC task, for example, must be running in order for PROFINET communication to be possible.

A PROFINET protocol is then added by means of the right mouse button. Precisely one TwinCAT device protocol can be appended!

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 4:
Inserting a PROFINET device protocol

A Box in the form of a GSDML is then integrated (right mouse button on "PROFINET Device").

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 5:
"Insert Box" dialog

Now select the version to be used to integrate your EL6631-0010. The main difference between V2.0 and V2.2 lies in the support for sub-modules.

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 6:
EL6631-0010 selection with or without port diagnosis

In the first EL6631-0010 (according to V2.2) the ports, and therefore the port diagnosis, can be seen in the DAP. The following EL6631-0010 is integrated according to V2.0. No port diagnosis is possible here. The same version must be used in the master. Older PROFINET controllers cannot yet support Version 2.2, in which case you should use Version 2.0.

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 7:
Several PROFINET devices in the TwinCAT tree

Virtual PROFINET device

It is also possible in TwinCAT to configure a number of virtual PROFINET devices (a maximum of 7 in the PROFINET Device Supplement, and one additional device in the EL6631-0010). Each device is again to be viewed as its own adaptor, i.e. each virtual device is assigned a default MAC address from a reserved range. To avoid possible address conflicts, the MAC address of virtual devices can also be changed. The name which the device was given in the strand (or in the "General" tab) is also taken as a PROFINET station name following a restart. On the basis of different MAC addresses and names, a PROFINET controller can now distinguish several devices in the strand.

It is therefore possible to use 8 devices per Ethernet interface in the PROFINET Device Supplement, and therefore to communicate with 8 different PROFINET controllers. In the case of the EL6631-0010 it is 2 devices.

In PROFINET, different user profiles can be defined within a device (API - Application Process Instance). Precisely one API is permitted / supported for each device in TwinCAT.

In accordance with PROFINET, the DAP (Device Access Point) is always defined on slot 0. Device-specific data is defined in it. In accordance with PROFINET, several DAPs can be defined; however, in TwinCAT there is currently precisely one!

3. Process data

The process data can be inserted from slot 1. This takes place by integrating the desired module in the API. Each module (slot) has at present precisely one sub-module (sub-slot). The configuration of the modules and hence the creation of the process data image on the PROFINET side takes place by means of specifying data types / data widths (e.g. byte, word, dword, float 32).

The designation of the inputs and outputs always takes place in TwinCAT from the TwinCAT point of view, i.e. the inputs are from the PROFINET point of view (from the controller) the outputs! Therefore the data of the PROFINET I/O devices is represented as follows:

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 8:
Representation of the inputs/outputs of the PROFINET I/O device

This representation applies only to the TwinCAT PROFINET device, in the case of a TwinCAT PROFINET controller, the view will correlate again!

4. General settings

The FrameID can be changed on the "PROFINET Devices" tab. However, the default settings suffice for normal operation!

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 9:
"Device" tab

4.1 PROFINET name assignment

When the EL6631-0010 is shipped it does not have a PROFINET name. It returns an empty string when the devices are searched.

There are several ways to assign a name to an EL6631-0010:

  1. Assignment through the PROFINET controller
  2. Assignment through the EtherCAT Master (assignment through the controller is then no longer possible)
  3. Assignment through a link to the PLC program (assignment through the controller is then no longer possible)
  4. Automatic device startup through topology specification is supported
    You can obtain more information from your PROFINET controller

4.1.1 Assignment through the PROFINET controller

In this case, the PROFINET controller assigns the name of the device. You can learn about this from the manufacturer of your PROFINET controller.

4.1.2 Assignment by the EtherCAT Master

Tick the "get PN station name from ECAT" to activate this.

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 10:
"EL663x" tab

The name used in the System Manager tree is then used. In this case, for example, "el6631-test-name".

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 11:
TwinCAT tree: assigning a PROFINET station name

4.1.3 Assignment through a link to the PLC program

This is comparable with the DIP switches in the BK9103 and can be carried out via a PLC task. For activation, "Generate Station Name from Control" must be activated. For clarification, 000 will be appended to the previous tree name (default: "tcpniodevice").

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 12:
Tree name in the TwinCAT tree
PROFINET device (EL6631-0010) integration under TwinCAT 2.11 13:

Tree name

This tree name no longer corresponds to the PROFINET station name! The Ctrl WORD of the PROFINET protocol is used to help assign a name. This means that the number that is entered (range of values 0 - 255) is appended to the existing station name. In addition, the Ctrl WORD must be linked to a task. It is subsequently necessary to restart TwinCAT. If, e.g., the task now specifies a value of 11 for the linked Ctrl WORD, its previous station name will change from, for example, "tcpniodevice" to "tcpniodevice011". The current tree name remains "tcpniodevice000".

The current station names and the IP configuration used can be checked via the "PROFINET diagnosis" tab.

4.2 Diagnostics

The actual PROFINET name is displayed on the Diagnostics tab. The IP configuration is specified when the master boots up, and has the values that are assigned by the master. The "Module Difference" field is displayed if the specified configuration is not the same as the actual configuration. The field should be empty if there is no error.

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 14:
“Diagnostics” tab

5. Cycle times

The device can be operated in the minimum cycle time of 1 ms defined by PROFINET!

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 15:
"Adapter" tab, setting cycle time

If TwinCAT is to be operated in RUN mode, a task must be created. In the simplest case, this is the aforementioned SyncTask. The call time for the task must not be longer than the PROFINET cycle time! If a second task is created, e.g. for the PLC, this can also run more slowly.

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 16:
Inserting a task

In the case of less powerful devices (e.g. CX1000, CX9000 with E-bus), the CPU load may reach its limits. However, the performance can be improved again by means of the following considerations/measures:

6. PDO Mapping

The PDO mapping describes how the PROFINET data is to be represented in the EtherCAT. The "Submodule data" setting should be used if TwinCAT is used.

PROFINET device (EL6631-0010) integration under TwinCAT 2.11 17:
"EL663x" tab