PROFINET IO Controller

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

CODESYS provides two different PROFINET IO controllers: A variant especially for Hilscher CIFX adapters and a variant that runs on any Ethernet adapter.

When inserting the Ethernet-based controller, two tasks are created implicitly that are required by the PROFINET IO 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 requirements. Therefore the task is low priority.

  • Profinet_IOTask: This is where the actual PROFINET IO real-time data exchange takes place. Pending I/O 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 I/O performance with minimum delay when reading/writing, I/O data can be updated in this task (à insert own POU that updates I/Os in this task). No blocking or persisting operations should be executed in the I/O 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 (see Slave Configurator: Watchdog).

Attention

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

Note

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

See also