Example Code

LabVIEW / Measurement I/O / NI-DAQmx / VI / NI USB-6002 / DAQ / Multifunction Device / Analog Output (AC, 100Hz, max)

Code and Documents

Attachment

Overview

 Analog Output mode allows user to use the DAQ device as a normal function generator with the options to select the frequency and amplitude. The user needs to select the DAQmx Global Channel for output. Then output is generated on oscilloscope through hardware ports.

 

Description

Analog Output mode, follows the same configuration as Analog Input. USB-6002 has two ports and one common ground. It also has trigger option from PFI0 and PFI1 ports.

Hardware and Software Requirements

 NI USB-6002, LabVIEW

Steps to Implement or Execute Code

 1. Connect USB-6002 through USB port.

 2. Download NI-DAQmx 18.0.0, Execute sample code "USB6002-AO(100 Hz)" and run it.

 3. Connect the oscilloscope through AO port. Enter the frequency and amplitude.

 4. Monitor the waveform on oscilloscope.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors