Example Code

Log Value Changes of All Front Panel Controls to a File or Database using 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

Description

1. Overview
This VI logs all value changes in its front panel controls to a file.

 

2. Description
Use this example to learn a way to log all changes to front panel values and log these to disk. This is accomplished using the VI Server, dynamic event registration, variants and property nodes. Use the case structure to define how to interpret the variant value of each control, so that the formatting is correct in your log file.
Dynamic event registration allows you to use VI Server references, such as Application, VI, or Control, to specify at run time the objects for which you want LabVIEW to generate events.

 

3. Requirements

NI LabVIEW Base Development System 2012 or compatible.

 

4. Steps to Implement or Execute Code

  1. Download and Run the VI.
  2. Change the values of the controls multiple times.
  3. Click the Stop button to stop the VI.
  4. Look for the log file in the VI's directory.
  5. Change controls in the front panel and add the control class for each different one in the case structure, so that LabVIEW can interpret them according to your needs.

 

5. Additional Information or References

Log Changes in Controls Screenshot.PNG

 

 

 

**The code for this example has been edited to meet the new Community Example Style Guidelines.**

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

Comments
NI-hilator
Member
Member
on

Thanks for the great example!  It doesn't seem to catch events for controls inside the tab control.  Any thoughts?