Overview
Learn how to display frequency domain data from a simulated DSA device.
This tutorial was designed for the LabVIEW Online Evaluation Environment. This tutorial will work on any Windows PC that has both the NI-Scope driver and LabVIEW installed.

Figure 1 Completed Exercise 2 Font Panel
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 Dynamic Signal Acquisition Device
If you are working within the LabVIEW Online Evaluation Environment, a simulated Dynamic Signal Analyzer has been already simulated for you. You can skip this section and begin the tutorial at the Creating the Graphical User Interface section. If you are completing this tutorial from a personal computer, follow the steps below to simulate a Dynamic Signal Analyzer.
-
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.
-
Under the My System tree, right-click Devices and Interfaces and select Create New.
-
Under NI-DAQmx Device, select NI-DAQmx Simulated Device and press OK.
-
Expand the Dynamic Signal Acquisition tree, select NI PCI-5152, and press OK. The PCI-5152 is an 8-bit high-speed National Instruments digitizer.
-
Ensure the NI PCI-5152 is visible under NI-DAQmx Devices. It should have a yellow card icon, representing a simulated device.
Creating the Graphical User Interface
-
In the Getting Started windows, click File » New VI.
-
If the Context Help window is not visible, press the <Ctrl-H> keys to display the window.
-
To begin designing the front panel, you will create two indicators will show the frequency and amplitude of the signal you acquire.
-
Place two graphs on the front panel to display the acquired signal and the FFT result.
-
Right-click on the front panel and select Graph » Waveform Graph.

Figure 2 Waveform Graph
Important: Make sure to select the Waveform Graph and not the Waveform Chart. They are sometimes confused because the icons look similar.
-
Change the label of the graph from Waveform Graph to Input Signal.
-
Right-click on the front panel and select Graph » Waveform Graph.
-
Change the label of the graph from Waveform Graph to FFT.
-
Right-click on the Waveform Graph labeled FFT and select Properties to edit the properties of the waveform graph. The properties will allow us to edit the scales of the graph.
-
From the resulting dialog, select the Scales tab.
-
Choose Time (X-Axis) from the first drop down menu in the Scales tab.
-
Change the Name to Frequency.
-
Uncheck Autoscale and set the Minimum and Maximum input fields to be 0 and 5E+6, respectively. The resulting Properties dialog should look like the screenshot below.

Figure 3 Filter Response Graph Properties for X-axis
-
Click OK to save your changes.
-
-
Arrange the controls, indicators and graphs so that the front panel looks similar to the image below.

Figure 4 Completed Front Panel
Display Simulated Acquisition using the NI-SCOPE Express VI
- Now you will add an Express VI to acquire the simulated signal from the handheld device’s audio output. We can do this in one step using the NI-SCOPE Simulated Acquisition Express VI.
- To begin designing the block diagram, press the <Ctrl-E> keys.
- Right-click on the block diagram, and select Express » Input » NI-SCOPE

Figure 5 NI Scope Express VI
- Place the NI-SCOPE Express VI on the block diagram.
- On the resulting configuration dialog, configure the values as shown in the figure below. All of the other values are left on their default setting. Be sure that channel 0 is highlighted in the Channels box when making these changes.
Configuration Option
Value
Channel 0
Checked
Channel 1
Unchecked
Range (V)
10
Offset (V)
5
Sample Rate (S/s)
10M
Record Length
1k

Figure 6 Configure NI-SCOPE Express
- Select the Trigger tab.
- On the resulting configuration dialog, configure Max Time (s) to be 0.1. All of the other values should be left at their default setting.
- Click OK to close the dialog and save changes.
- Left-click the Signal output of the NI-SCOPE Express VI and then right-click the input connector of the Input Signal graph. This process is known as wiring two VIs together.
- Select File » Save and save your VI as Analyze.vi in an easily accessible location.
Add an FFT to Display Frequency Domain Data from DSA Device
- To perform an FFT, we will add an Express VI.
- Right-click on the block diagram and select Express » Signal Analysis » Spectral Measurements. The Spectral Measurements Express VI will generate an FFT based on the simulated output from out Handheld device.

Figure 7 Spectral Measurements Express VI
- Place the Spectral Measurements Express VI to the right of the NI-Scope Express VI.
- On the resulting configuration dialog, leave everything at the default settings and click OK.
- Wire the Signals output on the NI-SCOPE Express VI to the Signals input connector of the Spectral Measurements Express VI.
- Wire the FFT – (RMS) output from the Spectral Measurements Express VI to the FFT graph.
The block diagram should resemble the image below. Check to make sure that your VI is free from errors by checking that the Run arrow is not broken.
If the Run arrow is broken
, indicating an error, click on it to see the list of errors. If you double-click on the error in the resulting Error List window, a moving dashed outline called a marquee will highlight the error on the block diagram so that you can find and fix it.
Figure 8 Completed block diagram
- Right-click on the block diagram and select Express » Signal Analysis » Spectral Measurements. The Spectral Measurements Express VI will generate an FFT based on the simulated output from out Handheld device.
- Save the VI.
- Now, Run the VI.
- Switch to the Front Panel.
- Click the Run button. Run the VI several times.
Reader Comments | Submit a comment »
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/).
