National Instruments BridgeVIEW 用户手册

下载
页码 455
Appendix A
HMI Function Reference
© National Instruments Corporation
A-15
Read Tag Alarm
Use the Read Tag Alarm VI to read detailed alarm status for a tag from the Real-Time 
Database. You probably want to use the Read Tag Alarm VI in the portion of your program 
where you monitor alarm information for specific tags. The Read Tag Alarm VI indicates 
whether a tag is in alarm, which alarm state it is in, when the alarm occurred, at which value 
it occurred, and whether it has been acknowledged. If you specify a timeout value that is 
greater than 0, the Read Tag Alarm VI returns when the tag changes alarm state or the 
timeout is exceeded, whichever occurs first. The changed? indicator alerts you to whether 
the Read Tag Alarm VI returned a new value.
tag name is the name of the tag.
timeout (secs) (0) specifies how many seconds to wait for the tag alarm 
state to be updated in the Real-Time Database before reading the 
Real-Time Database for the latest alarm information. If timeout is 0, the 
Read Tag Alarm VI reads the Real-Time Database immediately and returns 
the tag alarm status without waiting. If timeout is –1, Read Tag Alarm 
waits indefinitely until the tag alarm state changes, or the Real-Time 
Database shuts down, whichever occurs first. If a timeout occurs before the 
value is updated, Read Tag Alarm returns the most current tag alarm state 
from the Real-Time Database, and timeout is set to TRUE. The default 
value is 0.
in alarm is TRUE if the tag is in alarm.
alarm ack indicates whether the tag alarm has been acknowledged. If 
acknowledged, alarm ack is TRUE.
alarm value is the tag value when it changed alarm states. Notice that the 
tag alarm value is updated only when the tag changes alarm states, and is 
not necessarily the most recent alarm value.
alarm timestamp indicates the time when the tag alarm state last changed.
alarm state indicates the name of the most recent alarm state for the tag.