<< Chapter < Page | Chapter >> Page > |
Complete the following steps to build a VI that uses the Thermometer VI to read a temperature once every second for aduration of one minute.
thermometer
, located on the
Controls>>Numeric Indicators
palette, on
the front panel. This provides a visual indication ofthe temperature reading.numeric indicator
, located on the
Controls>>Numeric Indicators
palette, on
the front panel. Label this indicator
Seconds
Elapsed
. Right-click the indicator and select
Representation>>I32
from the shortcut
menu.For Loop
, located on the
Functions>>All Functions>>Structures
palette, on
the block diagram. Right-click the
Loop
Count
terminal in the upper left corner of the
For Loop
and select
Create
Constant
from the shortcut menu. Type
60
in the constant to set the
For
Loop
to repeat 60 times.Thermometer
VI on the block
diagram. Select
Functions>>All Functions>>Select a
VI
and navigate to
C:\Exercises\LabVIEW
Basics I\Thermometer.vi
to place the VI. This VI
reads the temperature from the DAQ device. Right-clickthe
Temp Scale
input and select
Create>>Constant
from the shortcut
menu. Use a
False
constant for Fahrenheit
or a
True
constant for Celsius.
(Demo) Thermometer
VI
instead.Wait Until Next ms Multiple
function, located on the
Functions>>All
Functions>>Time&Dialog
palette, on the
block diagram. Right-click the input and select
Create>>Constant
from the shortcut
menu. Enter a value of
1000
to set the wait
to every second.Increment
function, located
on the
Functions>>Arithmetic&Comparison>>Express Numeric
palette, on the
block diagram. This function adds one to theiteration terminal output.Timed Temperature.vi
in the
C:\Exercises\LabVIEW Basics I
directory.While Loop
and stops when you click a stop
button on the front panel.General While Loop.vi
in the
C:\Exercises\LabVIEW Basics I
directory.General While Loop
VI to stop when
the stop button is clicked or when the
While
Loop
reaches a number of iterations specified by a
front panel control.File>>Save As
to save the VI as
Combo While-For Loop.vi
in the
C:\Exercises\LabVIEW Basics I
directory.Notification Switch
Would you like to follow the 'Labview graphical programming' conversation and receive update notifications?