Example Code

How To Monitor User Interface Events Programmatically in LabVIEW With Parallel Loops

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 simple code suggest a solution to monitor and update program's indicators on events registered on the user interface.


Description:

This simple code suggest a solution to monitor and update program's indicators on events registered on the user interface. Due to the fact Event Structure in LabVIEW freezes the loop structure in which is inserted, it d0esn't allow to use other code inside the same loop. A parallel loop architecture can avoid this situation. The code registers 'resize panel' and 'close panel?' events and counts the number of actions.


Requirements: LabVIEW 2012 (or compatible).


Steps to Implement or Execute Code:

1. Run the VI.

2. Operate on the panel window by resizing the window or closing it.

3. A numerical indicator on the Front Panel counts the user's actions on the panel window.

4. To stop the application press the 'STOP' button.


Additional Information or References: 

 

How To Monitor User Interface Events Programmatically in LabVIEW With Parallel Loops FP.png

 

How To Monitor User Interface Events Programmatically in LabVIEW With Parallel Loops BD.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.