Example Code

Selective Logging and Displaying of Faults

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 code shows how a case structure can be used to selectively save some data to a file, or append it to an array.

 

Description

This code shows how a case structure can be used to selectively save some data to a file, or append it to an array.  This is useful for if you'd like to do some simple text file logging, and you'd also like the faults to be displayed to a user.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

 

Steps to Implement or Execute Code

  1. Input the value of Current Pressure, if the pressure gets above 120, a fault will be logged.
  2. Run the VI to see the results. 

 

Additional Information or References 

Front Panel

log front panel.png

 

VI Snippet

1.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.