National Instruments BridgeVIEW 用户手册

下载
页码 455
Chapter 16
Program Design
© National Instruments Corporation
16-7
One of the main advantages in using the error input and output clusters is 
that you can use them to control the execution order of dissimilar 
operations. 
The error information generally is represented using a cluster containing a 
numeric error code, a string containing the name of the function that 
generated the error, and an error Boolean for quick testing. The following 
illustration shows how you can use this technique in your own applications. 
Notice that the While Loop stops if it detects an error.
Watch Out for Missing Dependencies
Make sure that you have explicitly defined the sequence of events when 
necessary. Do not assume left-to-right or top-to-bottom execution when no 
data dependency exists.
In the following example, no dependency exists between the Read File VI 
and the Close File VI. This program might not work as expected.
The following version of the block diagram establishes a dependency by 
wiring an output of the Read File VI to the Close File VI. The operation 
cannot end until the Close File VI receives the output of the Read File VI.