Example Code

Triggering Analog Voltage Output with Analog Input Voltage Window Using LabVIEW with DAQmx

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
This code shows how to trigger an analog voltage output with an analog voltage input range.


Description

This function is accomplished by using two simultaneous while loops each running a continuous DAQmx task. The top loop is the input task and when the input value falls within a range it uses a case structure to set the "Voltage output" local variable. The bottom loop is the output task and it is continuously outputting a voltage which can be set by the front panel or by the logic in the input loop.

Requirements

  • LabVIEW 2012 (or compatible)
  • DAQmx 9.5.5 (or compatible)

Steps to Implement or Execute Code

  1. Select the physical channels and set proper parameters.
  2. Run the VI.

 

Additional Information or References
VI Snippet

235.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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