PROFINET IO Slave Device

The configuration of the PROFINET IO slave device consists of the device itself as well as the modules inserted below.

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

When inserting the Ethernet-based slave devices, 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).

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.

See also