Skip to main content

General

The configuration of the PROFINET Controller consists of the controller and the PROFINET devices (Slaves) inserted below it. The devices are configured by the controller and exchange data with it.

CODESYS provides two different PROFINET Controllers:

  • A variant especially for Hilscher CIFX-Karten

  • A variant which is hardware-independent, the CODESYS PROFINET Controller. This variant runs on any number of Ethernet adapters.

When inserting the Ethernet-based controller, two tasks are created implicitly that are required by the PROFINET communication stack.

  • Profinet_CommunicationTask: This task includes the acyclic communication services, such as establishing connections and diagnostics. These services are not time-critical due to very weak real-time demands. Therefore the task is low priority.

  • Profinet_IOTask: This is where the actual PROFINET real-time data exchange takes place. Pending IO data packets are processed in each cycle (see Slave Configurator: Send clock). Therefore, a cycle time of 1ms is required (for 1ms send clock).

    If the smallest selected sender interval for the slaves of this controller is 2ms, 4ms, or greater, then also a cycle time of 2ms or 4 ms can be selected. However, the priority of the task should be selected as high as possible.

For maximum IO performance with minimum delay when reading/writing, IO data can be updated in this task (→ insert own POU which updates the IOs in this task). No blocking or persisting operations should be executed in the IO task, such as visualization or file access. If the task is blocked too long, then the watchdog cancels the connection for communicating with the slave.

Important

We recommend that you activate the Refresh I/Os in Stop option in the PLC settings. Otherwise the communication is canceled when the application stops at a breakpoint.

Tip

With the scan functionality, you can easily ascertain the present hardware structure and transmit to the device tree.

Installing and Inserting PROFINET Devices

In order for you to insert and configure PROFINET Devices as objects in the device tree of the project, you first have to install the IO Controllers, I/O Devices, and IO Modules on the local system. If this does not happen automatically with the current programming system installation, then you have to do it explicitly in the device repository dialog. The GSDML device description files which are supplied with the hardware serve as a basis for this.

In the device tree, you insert a PROFINET Controller below a device which has a PLC logic node. The device description file of the PROFINET Controller defines which PROFINET Devices you can insert below it. On the other hand, the description of an IO Device defines which PROFINET Modules you can insert below the IO-Device. For IO Modules which have a fixed position, CODESYS automatically provides slots in the device tree. The Add Device command is used for inserting devices. Note that it is also possible to deactivate a device temporarily for network operation.