Example Code

Write Analog Values to File When Inside Specified Window

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 program reads from two analog channels simultaneously. 

  

Description

It uses the first analog channel as a "log channel" that reads important data. It uses the second analog channel as a "window channel" and checks to see if the window channel value falls within a user specified range. If the window value is in range, the important data from the log channel is written to a file. This is intended to demonstrate how an analog window could be created for a channel that is not the channel of interest.

 

Requirements

Software

  • LabVIEW 2012 or compatible
  • NI-DAQmx 9.5.5 or compatible

Hardware

  • NI Multifunction DAQ Device with at least one counter

Steps to Implement or Execute Code

1. Design a file path
2.Use the create virtual channel drop down box to select the log channel and window channel by control clicking the two.
3. Run the VI
4.Observe the results in the text file after stopping it.

 

Additional Information or References

 

搜狗截图17年01月07日1435_3.png

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

Matt J - NI Tools Network

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