The configuration of the PROFINET slave device consists of the device itself as well as the modules inserted below.
CODESYS provides two different PROFINET 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 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 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).
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.
See also