Dataflow Programming and Data Types in Lab view
Data types indicate what objects, inputs and outputs you can wire together. For example,if a switch has a green border, you can wire a switch to any input with a green label on an Express VI. If a knob has an orange border, you can wire a knob to any input with an orange label. However, you cannot wire an orange knob to an input with a green label. Notice the wires are the same color as the terminal. The dynamic data type stores the information generated or acquired by an Express VI. The dynamic data type appears as a dark blue terminal. Most Express VIs accept and/or return the dynamic data type. You can wire the dynamic data type to any indicator or input that accepts numeric, waveform or Boolean data. Wire the dynamic data type to an indicator that can best present the data. Indicators include a graph, chart or numeric indicator.
DATA FLOW PROGRAM
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. For a data flow programming, consider a block diagram shown in Figure 2.14 that adds two numbers and then subtracts 50.00 from the result of the addition. In this case, the block diagram executes from left to right, not because the objects are placed in that order, but because the Subtract function cannot execute until the Add function finishes executing and passes the data to the Subtract function. A node executes only when data are available at all of its input terminals, and it supplies data to its output terminals only when it finishes execution.