Profinet Alarms

Hello,
Is there any system variable I can use in order to know whether the profinet communication with a device is interrupted?
I found PNIO_SYSTEM_BF but from what I understand that is a general variable.
What if I have 3 profinet slaves configured? How can I say which one has a faulty connection?
Thank you in advance.

Hi dimitrismvrm,
each device brings it’s own set of status process data.
image.png BR
DivisionByZero

Is there a variable from the PLC side that I can use to indicate if the communication is not possible with each specific device?

Also, where can I find more information on the PN_DEVICE_STATE usage? I tried in many GSDML files and in the manuals of some profinet slaves that I have but I cannot find information anywhere regarding this variable.

You can simply use PN_AR_VALID to check if PLC and device established a connection.
image.pngIn this screenshot you see two global variables that are each connected to a PN_AR_VALID process datum of a device.

Hi dimitrismvrm,
sorry for the delayed reply on this matter.

There are several options available.

Also, where can I find more information on the PN_DEVICE_STATE usage? I tried in many GSDML files and in the manuals of some profinet slaves that I have but I cannot find information anywhere regarding this variable.
The PN_DEVICE_STATE is automatically created and you can get it as a BYTE, or as individual bits (PN_IS_PRIMARY, PN_AR_VALID, PN_APPL_RUN, PN_NO_DIAG):
image.pngPN_DEVICE_STATE.0 > PN_IS_PRIMARY (or State as shown in the image above)
PN_DEVICE_STATE.2 > PN_AR_VALID (or DataValid as shown in the image above)
PN_DEVICE_STATE.4 > PN_APPL_RUN (or ProviderState as shown in the image above)
PN_DEVICE_STATE.5 > PN_NO_DIAG (or StationProblemIndicator as shown in the image above)

The RECV_ALARM function block is also available in the PLCnext Engineer (in newer version you first have to reference the library PLCnext Controller via right-click on Libraries > Add Library…).
image.pngAnother library (PN_Alarm_Diag) is also available in the PLCnext Store: PLCnext Store | PN_ALARM_DIAG.

I hope this helps.
BR,
vcosic