Planning a National Instrument (NI) LabVIEW VI is different than planning other types of computer programs that are
sequential in nature, such as
assembly language and C.
Whereas a flow chart might
work well when planning
sequential programs, they
probably won’t be of much
help when planning a LabVIEW
VI. So, what particular planning
approach works well for
LabVIEW VIs?
First, develop a written
statement or description of
what you want your program to
accomplish, along with a title
and a general program
specification statement.
Second, sketch out what you
would like the front panel or
user interface to look like.
What basic controls, indicators,
charts, etc., will be needed on
the front panel to support the
general program specifications?
These controls and indicators
can then be placed on the front
panel at this point.
Each control or indicator
that is placed on the front panel
usually has an associated function icon that will appear on
the block diagram as well. Some functions — like the
MyRIO I/O functions on the
block diagram — do not have
icons that appear on the front
panel. Following these
suggestions will help you get
your VI started and planned out.
As far as the block diagram
is concerned, when the icons
are placed down with the front
panel controls, they will not be
in any useful placement, order,
or have any connections
between them. The block
diagram format that the original
NI Main VI (that was first
opened in Part 1) uses will work
very well for most VIs that you
will develop (see Figure 3). The
front panel is not shown since it
will only contain the stop
control on it.
This format has a flat
sequence structure with three
frames placed down. The flat
sequence will execute from left
to right. The left or first
sequence is commented as
“Initialize.” The center frame
has a while loop placed in it
COM PUTE R
CONTROL AND
INTERFACING WITH
THE NI MYRIO By David Ward
April 2017 23
Part 5: A
temperature
control
system and
data logger.
Post comments on this article and find
any associated files and/or downloads
at www.nutsvolts.com/magazine/article/
April2017_Computer-Control-with-
NI-MyRIO_Temp-Control-Logger.
The four previous articles have already demonstrated most of the
features that this final project will bring together in a complete
system. Refer to Photos 1 and 2 and Figures 1 and 2. There are a
few new items in this VI (virtual instrument) that were not presented
previously which will be explained in this final installment.
PHOTO 1.
PHOTO 2.