<9. Advanced Engineering >
From all these values, we know that device label AI001 is in error (BAD) condition
due to severed wire or hardware failure, and as a result, an IOP+ (High Input Open)
alarm is generated in NPAS_PVI_1, and the status of the PV value becomes BAD.
● Reading Mode, Status and Alarm from an Application
Values corresponding to each mode, status and alarm condition of NPAS_POU are
predefined as system global variables.
These global variables can be used in control applications to check for specific
mode, status or alarm conditions.
The figure below shows a subset of system global variables related to alarms.
A complete list of system global variables accessible in NPAS POUs is given in
Appendix A, “List of Global Variables” of IM34P02P25-01E, “NPAS_POU –
Overview.”
For instance, the high-high limit alarm (HH) value of DWORD#00080000 is set as
the initial value of global variable GM_ALRM_HH. By comparing the alarm of an
NPAS POU against GM_ALRM_HH, a control application can check for the HH
alarm condition.
However, multiple mode, status and alarm condition bits may sometimes be set as
described earlier in the "Example with high-high limit (HH) and high limit alarms (HI)
detected.” In the example, the alarm value is DWORD#00088000, which is not
identical to DWORD#00080000 (GM_ALRM_HH) so a direct comparison using an
EQ function will fail to detect the HH alarm condition.
Instead, the logic shown below should be used for the comparison.