Skip to main content

Diagnosis in the Application

Device Function Block

For each PROFINET Device in the device tree, a function block is created that provides basic information about the connection or configuration status of the device. For example, to request diagnosis entries or for a deviating module configuration.

For more information, see: IoDrvProfinet.ProfinetController.

Provider and Consumer Status

This status information is always transferred with the I/O data. It can be added to the CODESYS I/O mapping of the respective module.

PROFINET Device User Program

When a PLC is configured for the role as a PROFINET Field Device, in this case the PROFINET Device application is the source of diagnoses and alarms.

The application can use the function block CommFB.SALARM to send application-specific alarms ("process alarms") to the controller. Process alarms do not require diagnostic entries.

Entries in the diagnosis database of the device are created with the POU ProfinetCommon.UpdateDiagnosisEntry or deleted. If the module is exchanging data with a controller, then a corresponding diagnosis alarm is also sent to the controller.

For user-defined alarms and diagnostics (ProfinetCommon.ChannelErrorType in the range 0x0100 – 0x7FFF), the respective texts can be stored in the GSDML of the device.