<9. Advanced Engineering >
This logic performs an AND calculation of the alarm of NPAS_PVI and
GM_ALRM_HH. In this way, even if multiple bits, including the HH limit bit, of the
alarm of NPAS_PVI are set to 1, only the HH limit bit is extracted for comparison
with GM_ALRM_HH.
This method of performing an AND calculation before comparison can be applied
similarly when checking for a specific condition for the mode or status of
NPAS_POU, or the status of a device label variable.
TIP
Consider an example where both HH limit and HI limit alarms are generated. The alarm status bit
pattern is:
00000000000010001000000000000000
The bit pattern of GM_ALRM_HH (DWORD#00080000) is:
00000000000010000000000000000000
ANDing the two bit patterns gives:
00000000000010000000000000000000
Performing an AND computation this way extracts only the target bit.