Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Aug 17, 2007


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Acquire High Speed Analog Signals

6 ratings | 3.83 out of 5
Read in | Print | PDF

Overview

Learn how to simulate a National Instruments data acquisition device using the Measurement & Automation Explorer and display simulated acquisition using the DAQ Express VI.

This tutorial was designed for the LabVIEW Online Evaluation Environment, but can be used on an Windows PC with NI-DAQmx and LabVIEW installed.

Figure 1 Completed Exercise 1

A front panel (shown in figure 1) is where you will design the user interface. The front panel contains the user controls and indicators that allow the user to interface with the application. No programming is included on the front panel.

Creating a Simulated Data Acquisition Device

If you are working from the LabVIEW Online Evaluation Environment, a simulated data acquisition device has already been created for you.  You can skip to the Display Simulated Acquisition using the DAQ Express VI below.  If you are doing this on a personal computer, use the steps below to create a simulated data acquisition device.

  1. Launch Measurement & Automation Explorer by selecting Start » All Programs » Measurement & Automation. Measurement & Automation Explorer provides access to National Instruments products such a data acquisition devices and GPIB cards.
  2. Under the My System tree, right-click Devices and Interfaces and select Create New.
  3. Under NI-DAQmx Device, select NI-DAQmx Simulated Device and press OK.
  4. Expand the M Series DAQ tree, select NI PCI-6259, and press OK. The PCI-6259 is a 16-bit, 32 analog input high-accuracy National Instruments data acquisition card.
  5. Ensure the NI PCI-6259 is visible under NI-DAQmx Devices. It should have a yellow card icon, representing a simulated device as seen in Figure 2.

Figure 2 Simulated PCI-6259

Display Simulated Acquisition using the DAQ Express VI

  1. In the Getting Started windows, click File » New VI.
  2. If the Context Help window is not visible, press the <Ctrl-H> keys to display the window.
  3. Display the block diagram by pressing the <Ctrl-E> keys.
  4. Right-click the block diagram to open the Functions palette and click the Search button to search for the DAQ Assistant.
  5. Click and drag the link from the search results page onto the block diagram. The Create New Express Task dialog box should appear as seen in Figure 3, allowing you to select the measurement type for your task.

    Create New Express Task.JPG

    Figure 3 Create New Express Task dialog box

  6. Select Acquire Signals » Analog Input » Voltage. The simulated PCI-6259 should appear with a list of Supported Physical Channels.
  7. Choose ai0 and click Finish to bring up the DAQ Assistant dialog box, as seen in Figure 4.

    DAQ Assistant.JPG

    Figure 4 DAQ Assistant dialog box

  8. The DAQ Assistant dialog box allows you to customize your data acquisition without programming. Change the Acquisition Mode to Continuous Samples and increase the Samples to Read and Rate (Hz) to 10,000. Press OK to finalize your configuration.
  9. While dynamically building the VI, the DAQ Assistant will attempt to create a while loop automatically. Press Yes to confirm auto loop creation.
  10. The block diagram now contains our data acquisition code. To create a graphical indicator for the fron panel, right-click the data output of the DAQ Assistant and select Create » Graph Indicator.
  11. On the front panel, right-click the Waveform Graph indicator and select Properties from the shortcut menu. The Graph Properties dialog box appears.
  12. On the Scales page, select Time (X-Axis) from the top pull-down menu. Remove the checkmark from the Autoscale checkbox.
  13. Enter 0.0 in the Minimum text box and 1.0 in the Maximum text box.
  14. select Amplitude (Y-Axis) from the top pull-down menu. Remove the checkmark from the Autoscale checkbox.
  15. Enter -10.0 in the Minimum text box and 10.0 in the Maximum text box.
  16. Click the OK button to save the configuration and close the Graph Properties dialog box.
  17. Select File » Save and save your VI as Acquire.vi in an easily accessible location.
  18. Run the VI. The stop (F) button will stop the VI execution when pressed.

Auto Loop Creation.JPG

The simulated signal is a 1 kHz sine wave. The front panel should appear as in Figure 5.

Running Acquire.JPG

Figure 5 Running Acquire VI

 

  
6 ratings | 3.83 out of 5
Read in | Print | PDF

Reader Comments | Submit a comment »

Simulated Frequency 1Hz not 1kHz
The frequency of the simulated signal is stated as 1kHz in this document. The actual frequency obtained in practise is 1Hz which is as shown in Figure 5.
- Nov 13, 2007

Simulated Frequency 1Hz not 1kHz
The frequency of the simulated signal is stated as 1kHz in this document. The actual frequency obtained in practise is 1Hz which is as shown in Figure 5.
- Oct 25, 2007

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).