Programming instructions

Chapter 21 Common SCXI Applications
LabVIEW Data Acquisition Basics Manual 21-8
©
National Instruments Corporation
Figure 21-3.
Measuring Temperature Sensors Using the Acquire and Average VI
After determining the average amplifier offset and cold-junction
compensation, you can acquire data using the Intermediate VIs as shown in
Figure 21-4. This example continually acquires data until an error occurs or
the user stops the execution of the VI. In order to perform continuous,
hardware-timed acquisition, you need to set up a buffer. In this case, the
buffer is 10 times the number of points acquired for each channel. Before
you initiate the acquisition with the AI Start VI, you need to set up the
binary-to-voltage scaling constants by using the Scaling Constant Tuner
VI. This VI, which you can find in
Functions»Data Acquisition»Signal
Conditioning
, passes the amplifier offset to the DAQ driver so that
LabVIEW accounts for the amplifier offset as the AI Read VI retrieves the
data. After the compensated voltage data from the AI Read VI is averaged,
the voltage values are converted to temperature and linearized by using the
Convert Thermocouple Reading VI in
Functions»Data Acquisition»
Signal Conditioning
. After completing the acquisition, remember to
always clear the acquisition by using the AI Clear VI.