For demonstration purposes, this article creates a software-timed 5Hz sine wave generation task using USB-6363 in LabVIEW.
1. Launch LabVIEW and navigate to
Help>>
Find Examples.
2. On the NI Example Finder window, navigate to
Hardware Input and Output>>
DAQmx>>
Analog Output>>
Voltage – On Demand Output VI.
3. Open the VI.
4. Modify the block diagram of the VI, as shown in diagram below.
Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.
5. Double click the
Simulate Signal Express vi. A window will pop up.
6. Configure the settings as below:
- Signal type: Sine
- Frequency (Hz): 5
- Samples per second (Hz): 50
- Number of samples: 1
- Select Simulate acquisition timing
- Note:
- To properly represent the signal's shape, the update rate used should be at least 10 times greater than the signal frequency.
- For software-timed generation task, only single sample can be outputted at a time.
- For software-timed generation task, the rate may be inaccurate due to the code's performance, Operating System and hardware setup. You are not recommended to use update rate greater than 500Hz.
7. Configure the channel settings such as channel name, maximum voltage and minimum voltage.
8. Run the VI.