Summary: In this exercise, the objective is to acquire an analog signal using a DAQ device. Complete the following steps to build a VI that measures the voltage that the temperature sensor on the DAQ Signal Accessory outputs. The temperature sensor outputs a voltage proportional to the temperature. The sensor is hard-wired to channel 0 of the DAQ device.
![]() |
Meter, located on the
Controls>>Numeric Indicators palette,
on the front panel. Configure the meter scale for
0.0 to 0.4. Use the Labeling tool to double-click
10.0 and type 0.4. You might need to enlarge the
meter to display the scale as shown in the example.
Vertical Toggle Switch, located
on the Controls>>Buttons & Switches
palette, on the front panel. Configure the toggle
switch to a default value of False and
a mechanical action of Latch When
Pressed.
Off and
On, using the Labeling
tool.
![]() |
DAQ Assistant Express
VI located on the Functions>>Input
palette, on the block diagram. Configure this
VI to read an analog input channel and return the
voltage.
Analog Input>>Voltage for
the measurement to make.
Dev1>>ai0 for the physical
channel.
Finish button.
Analog Input Voltage Task
dialog box appears. Configure the Task
Timing to Acquire 1 Sample.
OK button to close the
Analog Input Voltage Task
Configuration dialog box. This saves the
settings specified for the task in the DAQ
Assistant Express VI.
Place the 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. Type 100 in the constant to cause
the loop to execute every 100 ms.
Place the Unbundle by
Name function, located on the
Functions>>All Functions>>Cluster
palette, on the block diagram. Use this function to
access the status from the error
cluster.
Place the Or
function, located on the Functions>>Arithmetic
& Comparison>>Express Boolean palette, on
the block diagram. This function stops the loop if
an error occurs or the user clicks the power switch
on the front panel.
Voltmeter.vi in the
C:\Exercises\LabVIEW Basics I
directory. You will use this VI later in the course.
The temperature sensor on the DAQ Signal Accessory outputs
the voltage in degrees Celsius, scaled by 100. In order to
convert the voltage into degrees Celsius, it is necessary
to multiply the voltage by 100. You could multiply the
output of the DAQ Assistant Express VI by 100, or
configure the DAQ Assistant Express VI to automatically
scale the voltage. Using the capabilities that exist
within the VI reduces block diagram clutter.
DAQ Assistant to display
the Analog Input Voltage Task Configuration
dialog box.
Create New in the Custom
Scaling pull-down menu.
Linear and name the scale
temperature. Click the Finish
button.
slope to 100 and the Scaled
Units to Celsius.
OK button to close the dialog
box.
Analog Input Voltage Task
Configuration dialog box, set the minimum input
range to 0, set the maximum input range to
100, and click the OK button
to return to the block diagram.
"A full introductory course on programming with LabVIEW."