From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Reading Digital Output Lines without External Connections.

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Data Acquisition (DAQ)

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview:
Demonstrates on reading the values written by the Digital Output lines without external connections.

Requirements:
1. LabVIEW 2012 or compatible.
2. NI-DAQmx 15.5.1 or compatible.

Steps to Implement or Execute Code:
  1. Select Digital Output Lines to test.
  2. Customize the number of elements in the Write array (data) equal to the number of lines specified. Else, error will be prompted up.
  3. Run this VI.
  4.  Verify that the values written equals to the read values.


Block Diagram Steps:

  1. Creates a Digital Output channel to generate digital signals.
  2. Writes a single sample to the digital output line(s).
  3. Reads the sample written.
  4. Clears the task and displays any error occurs.
 
Front Panel.PNG
 
Block Diagram.PNG
 
**This document has been updated to meet the current required format for the NI Code Exchange.**

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