Read tag (bit array) – National Instruments BridgeVIEW User Manual

Page 376

Advertising
background image

Appendix A

HMI Function Reference

BridgeVIEW User Manual

A-56

© National Instruments Corporation

Read Tag (bit array)

Use the Read Tag (bit array) VI to read the latest value for a given bit array tag from the
Real-Time Database. For immediate polling of the tag value, leave timeout (secs) unwired.
To wait until the value is updated before reading it, wire a timeout value, in seconds, to the
timeout input. The Read Tag (bit array) VI returns with the most recent Real-Time Database
value when it is updated, the timeout is exceeded, or the Real-Time Database is shutting
down, whichever occurs first. Use the changed? output to determine whether the value
changed since the last read.

Note

Use a separate Read Tag (bit array) VI for each tag you want to monitor. Do not
put the Read Tag (bit array) VI in a loop to read a different tag each iteration of
the loop. This results in slower program performance. The Read Tag (bit array) VI
is designed to save information about the tag internally for efficient operation.
This information is updated every time the tag name changes.

tag name is the name of the bit array tag.

timeout (secs) (0) specifies how many seconds to wait for the tag value to
be updated in the Real-Time Database before reading the Real-Time
Database for the latest value. If timeout is the default value of 0, the Read
Tag (bit array) VI reads the Real-Time Database immediately and returns
the tag value without waiting. If timeout is –1, Read Tag (bit array) waits
indefinitely until the tag value is updated, or the BridgeVIEW Engine shuts
down, whichever occurs first. If a timeout occurs before the value is
updated, Read Tag (bit array) returns the most recent value from the
Real-Time Database, and timeout is set to TRUE.

in alarm is TRUE if the tag is in alarm.

value status returns the status of the value. If value status is greater than
or equal to 0, the value returned by Read Tag is valid and there is a warning
about the tag value. If value status is less than 0, either the device server
has reported an error indicating there is a problem with the tag, or
BridgeVIEW has reported an error indicating there is a problem using
the tag.

Advertising