Example Code

LabVIEW / Measurement I/O / NI-DAQmx / VI / NI USB-6002 / DAQ / Multifunction Device / Digital Input (DI)

Code and Documents

Attachment

Overview

In digital input mode, the user has to select the lines/port through DAQmx Global Channel to get digital output. The input of 3.3 V is given by analog output port to digital input port, so that lines/port indicator goes high.

 

Description

 There are 13 lines of digital I/O and can be operated as all simultaneously. These lines are divided into 3 ports, port 0 with 8 lines, port 1 with 4 line, and port 2 with 1 line.

Hardware and Software Requirements

 NI USB-6002, LabVIEW

Steps to Implement or Execute Code

 1. Connect USB-6002 through USB port.

 2. Connect external DC of 3.3 V with respect to Digital Input Ground (DI GND).

 3. Download NI-DAQmx 18.0.0, Execute sample code "USB6002-DI-port" and run it.

 4. Monitor the subsequent DI line status, High / Low. 

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

Contributors