Labview user manual

Page 95

Chapter 5

Building the Block Diagram

use distance units, the Increment function cannot tell whether to add one meter, one kilometer, or one foot. Because of this ambiguity, you cannot use the Increment function and other functions that increment or decrement values with data that have associated units. To avoid ambiguity in this example, use a numeric constant with the proper unit and the Add function to create your own increment unit function, as shown in Figure 5-7.

Figure 5-7. Creating an Increment Function with Units

Block Diagram Data Flow LabVIEW follows a dataflow model for running VIs. A block diagram node executes when all its inputs are available. When a node completes execution, it supplies data to its output terminals and passes the output data to the next node in the dataflow path. Visual Basic, C++, JAVA, and most other text-based programming languages follow a control flow model of program execution. In control flow, the sequential order of program elements determines the execution order of a program. In LabVIEW, because the flow of data rather than the sequential order of commands determines the execution order of block diagram elements, you can create block diagrams that have simultaneous operations. For example, you can run two While Loops simultaneously and display the results on the front panel.

Š National Instruments Corporation

5-25

LabVIEW User Manual


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.