PROFINET device integration under TwinCAT 2.10

PROFINET device integration under TwinCAT 2.10 1:

Installation

An installation version is no longer available for TwinCAT 2.10. Use TwinCAT V2.11 or contact Beckhoff Support.

1. Integration of the PROFINET protocol

First of all, a real time Ethernet device must be added. This interface must be assigned to an adaptor class. This is composed of the MAC and IP address of the network card.
Hence, e.g., if a CX9000 is to be parameterized, the target system must first be accessed remotely; the corresponding Ethernet port can subsequently be selected.

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

PROFINET device integration under TwinCAT 2.10 2:
Inserting a PROFINET device protocol

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 Task 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.

PROFINET device integration under TwinCAT 2.10 3:
"Sync Task" tab

Next, a box is integrated in the form of a GSDML (right click on "PROFINET I/O Device Protocol"). In TwinCAT it is also possible to configure several virtual PROFINET devices. 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. In turn, the individual virtual devices can then be linked with terminals from the E-bus, e.g. via a PLC task. As a result of this, e.g., several EL6601 terminals in the E-bus can be configured as individual PROFINET devices!

In PROFINET, different user profiles can be defined within a device (API - Application Process Instance). In Twin CAT, precisely one API is permitted / supported per device!

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!

2. 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 integration under TwinCAT 2.10 4:
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!

3. General settings

In the "PROFINET Device" tab, the Instance ID and the PROFINET Frame ID as well as the Client and Server UDP port can be changed. However, the default settings suffice for normal operation!

PROFINET device integration under TwinCAT 2.10 5:
"Device" tab

There is one further way of assigning the PROFINET station name. 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 integration under TwinCAT 2.10 6:

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. Cycle times

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

If TwinCAT is operated in FREERUN mode, care must be taken that the freerun cycle set is no longer than the PROFINET cycle!

PROFINET device integration under TwinCAT 2.10 7:
"Adapter" tab

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 integration under TwinCAT 2.10 8:
Creating 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: