Example Code

"Admin Mode" with references and property nodes in LabVIEW

Code and Documents

Attachment

Overview:
This project is an example showing the use of references and property nodes to create what I like to call an "Admin Mode" in a parent VI.
Description:

When properly placed into a calling VI, it enables the user to toggle the scrollbars and window resizing on and off and allows the user to reset the front panel's scroll position to the origin.

 

This is useful when code is being used while it is also being continuously developed, specifically in instances where code is built into an executable for distribution. The programmer can place indicators (that can help with debugging) offscreen where they will not confuse operators and technicians using the program. If a bug is found, the programmer can toggle "Admin Mode," resize or scroll down to the hidden indicators, and figure out what went wrong.

Requirements:

  • LabVIEW 2012 (or compatible)

Steps to Implement or Execute Code:

  1. Run the VI.
  2. Press F6 to toggle the Scrollbars and the ability to resize the VI window.
  3. Press F5 to return the VI to the origin (default is 0,0).

 Additional Information or References:

This subVI is placed inside an event structure inside the VI that needs the "Admin Mode." The programmer can easily change the toggle keys by changing the two cases in the subVI. They are currently set for F5 = reset front panel to origin and F6 = toggle scrollbars and ability to resize the front panel.Screenshot_1.png

 

Screenshot_2.png

 

Screenshot_3.png

 

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