National Instruments BridgeVIEW 用户手册

下载
页码 455
Chapter 4
Human Machine Interface
4-28
© National Instruments Corporation
Figure 4-4.  Process View Display VI
How Do You Initialize and Shut Down Multiple-Loop Applications? 
When you have a multiple-loop application, you can add initialization code 
before executing the loops, and some cleanup or shutdown code after all the 
loops finish executing. You can use the Sequence structure for this purpose. 
Put the initialization code in the first frame of the Sequence structure, put 
all your loops in the second frame of the Sequence structure, and put the 
shutdown code in your final sequence. This guarantees that none of your 
loops start execution until your initialization code is complete and that all 
loops complete execution before you execute the shutdown code. 
Figures 4-7 and 4-8 demonstrate this technique.
You also can use dataflow programming to enforce sequential operation. In 
some cases, your diagram might be easier to read using this technique. It is 
possible that you might have some data flow between the initialization code 
and the loops anyway. There is no difference in performance using either 
technique. It is purely a diagram documentation issue. Figure 4-6 illustrates 
using this technique.