| LabVIEW programs are known as VIs because they imitate real instruments
only that they are Virtual Instruments. VIs have three parts: the front
panel, block
diagram and the icon/connector.
The following are the front panel and block diagram windows. Notice
that they have identical menu bar and tools icons except that for front
panel there is a Controls menu whilst for block diagram there is a Functions
menu. Controls menu contributes to controls
and indicators,
they represent the input parameters and output values respectively. Functions
menu contributes to functions.
You can also get the Controls or Functions menu by clicking the right button
of the mouse anywhere inside the windows.
Front Panel & Block DiagramAt the LabVIEW window below, try clicking your mouse on the menu bar at 'windows' and swap between front panel and block diagram. Notice the difference of Control menu and Function menu.
Control - Function - IndicatorThe next diagram shows a simple VI that does comparison between two numbers. You can try it by putting two numbers into the 'digital control' at front panel and then run it by pressing the 'run button'. The LED(indicator) will light up if Num1 > Num2 is true. Observe the control and indicator in the block diagram carefully. The digital control(input) has thick border. The boolean indicator(output) has thin border. Also take a look at the wiring. The orange wire passes floating point number and the dotted wire passes boolean data. When wiring make sure there is no dashed wire (bad wiring).
A quick exampleConstruct a program that adds two numbers and returns the result. You can try it first or go straight to the solution by clicking
|