Exercise 2: Acquire a Signal from a Simulated Digital-to-Analog (D/A) Conversion
Overview
Building on the previous exercise, this exercise focuses on acquiring a simulated signal and displaying the signal on a graph. Because you are working in a hardware-limited environment, assume that your signal has already been converted from a digital signal to an analog signal. As such, use the Simulated Signal VI to acquire your signal.
Figure 1. Completed Exercise 2
- This exercise uses the front panel built in Exercise 1 – Quickly Create a Custom User Interface for Your D/A Conversion Application.
- If you closed your VI earlier, open Exercise 1.vi to continue.
- Select File » Save As…, select Substitute copy for original, and click Continue…
- Name the VI as Exercise 2.vi and click OK.
- Now add an Express VI to acquire the simulated signal from the D/A converted. You can do this in one step using the Simulate Signal Express VI.
- To begin designing the block diagram, navigate to Window » Show Block Diagram.
- Right-click on the block diagram and select Express » Input » Simulate Sig.

Figure 2. Simulate Signal Express VI
- Place the Simulate Signal Express VI on the block diagram.
- On the resulting configuration dialog, check the Add Noise checkbox. Leave everything else at the default setting.
Figure 3. Configure Simulate Signal Express VI
- Click OK to close the dialog and save changes.
- Left-click the Sine with Uniform output of the Simulate Signal Express VI and then left-click the input connector of the Analog Signal graph. This process is known as wiring two VIs together.
- Wire the output of the Signal Amplitude control to the Amplitude input of the Simulate Signal Express VI.
The block diagram should now resemble Figure 4. Check to make sure that your VI is free from errors by checking that the Run arrow is not broken.
Figure 4. Completed Block Diagram
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 highlights the error on the block diagram so that you can find and fix it. - Save your VI by selecting File » Save.
- Return to the front panel by clicking Window » Show Front Panel.
- Click the Run button to verify that the VI is working properly. A sine wave on the graph should be displayed.

Figure 5. Sine Wave on Graph
- Return to the block diagram and click on the Highlight Execution
button. This turns on a debugging functionality that animates VI execution to illustrate the data flow. - Click on the Run button and see how the data flows from terminal to terminal.
- Click on the Highlight Execution button again to turn it off.
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/).
