Block Diagram and you should see the block
diagram for this project as in Figure 9.
So, a LabVIEW project will consist of at
least three different windows: the Project View
window; the Front Panel; and the Block
Diagram. The front panel is the user interface
that will allow control of the program, as well
as display information to the user. Normally,
users won’t need to see the block diagram unless they
are the one developing the program. The block
diagram is where the actual “code” or “instructions” for
the program are located. You normally don’t actually
“write” lines of code in LabVIEW but rather graphically
place objects, wire them together, and set their
properties to behave how you want them in order to
satisfy your program’s requirements.
LabVIEW programs are called VIs or virtual
instruments, and always consist of at least one front
panel and one block diagram. You can click on the
“RUN” arrow or icon on the top of either the front
panel or block diagram to compile, deploy, and run the
VI on the MyRIO unit. This Main.vi will chart the three-axis accelerometer as you move the unit around in
different directions.
Let’s make our own VI to turn one of the four
built-in LEDs on when BUTTON0 is
pressed. From the Project View
window, left-click on NI-MyRIO,
then right-click to get the pull-down
options as shown in Figure 10 —
New > VI. You should now see a
new blank front panel and blank
block diagram. Looking at the
Program View window, your new
VI should be called “Untitled 1.” If
you go to either the front panel or
the block diagram, you can select
File > Save As and rename the VI
to something else, such as
demo_1.vi; see Figures 11 and 12.
When first using LabVIEW, it is
helpful to have several pop-up
December 2016 43
FIGURE 9.
FIGURE 8.
FIGURE 7.
FIGURE 6.