PNIOGETALARM
The driver provides this function block in order to process alarms in the Runtime Service.
Every time a new alarm is received by the controller, it is pushed in a FIFO queue.
The PNIOGETALARM function block should be called when one wants to know if an alarm has been received and pushed in the FIFO queue.
- If an alarm has been received, the output Q is set to TRUE.
In this case, all the other outputs can be used to get information about the first alarm in the FIFO. - If there is no alarm received in the FIFO queue, the ouptput Q is set to FALSE.
In this case, all the other outputs should not be used.
The alarm will remain in the FIFO queue until we call the function block PNIOACKALARM.
Therefore, several calls to PNIOGetAlarm without calling PNIOAckAlarm will return information about the same alarm.
NOTE: If the device sends several times the same alarm, it will be put in the FIFO queue only once.
Inputs
Parameter |
Data type |
Description |
EN |
BOOL |
Enable function block to retrieve info about alarm. TRUE to retrieve info about alarm. |
DATA[] |
USINT[] |
BYTE array containing additional data about the alarm. Hint: DATA[] is an Input/Output and an Array. The property has to be declared as an Input, otherwise it will not work in the Runtime Service. Attention: The function block PNIOGETALARM uses DATA[] as an Output. This additional data includes the User Structure Identifier (USI16 bits and OPTIONAL) followed by the data itself. An overview is given in the chapter Additional data. This additional data is optional and the content and length depend on the alarm and the device that sends the alarm. See the documentation of the device manufacturer to know what can be this additional data). Use DATALEN parameter to know the size (in BYTES) of the additional data.
NOTE: If you don’t want to use the additional data, don’t connect any variable to this output. |
Outputs
Parameter |
Data type |
Description |
Q |
BOOL |
|
FRAME_ID |
UINT |
Profinet Frame ID.
|
SRC_ENDPOINT |
UINT |
Source End Point Identifier, specifying the origin of the packet inside the Source Process. Value is between 0 and 2 high 32 -1. See Profinet standard documentation to know more about this. |
DST_ENDPOINT |
UINT |
Destination End Point Identifier. Value is between 0 and 2 high 32 -1. See Profinet standard documentation to know more about this. |
SEND_SEQ_NUMBER |
UINT |
Send Sequence Number of the alarm. See Profinet standard documentation to know more about this. |
ACK_SEQ_NUMBER |
UINT |
Acknowledge Sequence Number of the alarm. |
ALARM_HIGH |
BOOL |
|
ALARM_TYPE |
UINT |
Alarm Type:
Other values specific to manufacturer. See the documentation of the device manufacturer for more information in this case. |
API |
UDINT |
API of the submodule associated with alarm (most of the time 0). See Profinet standard documentation to know more about Application Process Identifier (API). |
SLOT_NUMBER |
UINT |
Physical or logical slot which issues the alarm. 0x0000 - 0x7FFF See Profinet standard documentation to know more about Slot number. |
SUBSLOT_NUMBER |
UINT |
Physical or logical subslot which issues the alarm. 0x0000 - 0x8FFF See Profinet standard documentation to know more about Subslot number. |
MODULE_IDENT_NUMBER |
UDINT |
Module Ident Number. 1 - 0xFFFFFFFF This value is specified by the device manufacturer. See the documentation of the device manufacturer for more information. |
SUBMODULE_IDENT_NUMBER |
UDINT |
Identifier of the submodule which issues the alarm. This value is specified by the device manufacturer. See the documentation of the device manufacturer for more information. |
ALARM_SPECIFIER |
UINT |
Alarm specifier. The content is explained in the chapter Alarm specifier. |
DATALEN |
UINT
|
Size of the additional data (DATA[]) (in BYTE).
|
Other topics in this chapter |
PNIOGETALARM |
IEC 61131-3 Automation platform > Programming - Reference guide > Driver specific function blocks > PROFINET IO RT Controller > PNIOGETALARM |
Created with the Personal Edition of HelpNDoc: Effortlessly create a professional-quality documentation website with HelpNDoc