Example Code

Record Boolean Change Values in LabVIEW

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.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This example VI demonstrates how to This example demonstrates how to register changes in a boolean control on a text file.

 

Description
This example uses an event structure and high-level file I/O LabVIEW APIs to record when a boolean value is changed while the program is running. At any time when a value is changed the time is recorded as well as the current state of the boolean array. This enables the user to keep track of the value change and to check which values were changed at any time. The data can be saved to a spreadsheet that can be opened with Excel or similar spreadsheet software, such as a text editor.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download the attached files to your computer
  2. Open the VI "Record Boolean Change LV2012 NI Verified.vi"
  3. Select a text file in the File Path control
  4. Run the program
  5. Press the buttons on the Array control
  6. Click Stop to stop the VI
  7. Open and observe the data recorded on the text file selected

 

Additional Information or References

VI Block Diagram

Record Boolean Change LV2012 NI Verified.png

 

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

Aaron W.
National Instruments
CLA, CTA and CPI

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