National Instruments BridgeVIEW 用户手册

下载
页码 455
Chapter 13
Front Panel Object Attributes
13-4
© National Instruments Corporation
Not function (Functions»Boolean)—In this exercise, the Not function 
inverts the value of the STOP button so that the While Loop executes 
repeatedly until you click the STOP button. (The default state of the 
button is FALSE.) 
Random Number Generator (Functions»Numeric)—Generates raw 
data between 0 and 1 to fill the tank on your front panel. You multiply 
this value by 100 to create a value between 0 and 100. 
Greater or Equal? (Functions»Comparison)—Compares the raw 
data to the Limit Setting input. If the value is greater than or equal to 
the limit input, a TRUE value is passed to the Case Structure. 
Attribute Node (Pop up on the Tank terminal)— Select Create»
Attribute Node
 from the Tank terminal. Pop up on the attribute and 
choose Select»Fill Color
Color Box Constant (Functions»Numeric»Additional Numeric 
Constants
)—Wire this constant to define a red color to Fill Color in 
the TRUE case and a blue color in the FALSE Case. Click on the 
constant with the Operating tool to select the color. 
Wait Until Next ms Multiple (Functions»Time & Dialog)—Wire a 
numeric constant of 1000 to execute the loop every second. 
5.
Run the VI. The level of the tank is compared to the Limit Setting 
control. If the tank value is greater than or equal to the Limit Setting 
value, the tank turns red. If the data falls below the limit, the tank 
turns blue.
6.
Save the VI as 
Tank Limit.vi
 in the BridgeVIEW
\Activity 
directory. 
End of Activity 13-1.