Example Code

Write to Digital Lines with Configurable Logic Level

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 writing to digital lines with configurable logic level.

Descriptions:
This VI uses Digital Output:Logic Family Property to specify the logic family use for generation. A logic family corresponds to voltage thresholds that are compatible with a group of voltage standards. Refer to the device documentation for information on the logic high and logic low voltages for these logic families.

Requirements:

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


Steps to Implement:

  1. Set the Digital Output Lines at which digital pulses will be output.
  2. Set the logic family to use for generation.
  3. Set the Data to be written to the digital lines.
  4. Run this VI.


Block Diagram Steps:

  1. Creates  a channel to generate digital signals.
  2. Specifies the logic family to use for generation. A logic family corresponds to voltage thresholds that are compatible with a group of voltage standards. Refer to the device documentation for information on the logic high and logic low voltages for these logic families.
  3. Writes a single Boolean sample to a task that contains a digital output channel composed of a single line.
  4. Transitions the task to running state and begin generation.
  5. Clears the task.
  6. 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.**

Mikhail
RF Toolkits, Product Support Engineer
National Instruments

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