Example Code

Change Tab Control pages by Refnum in a SubVI

Code and Documents

Attachment

Download All

Overview:

The code attached shows how you can change the "Value" of the Tab Control by reference from a Sub VI. 
Description:

 The Tab Control is visible on the Front Panel of the Main VI.  A Sub VI contains the Explicit Property Node for the Tab Control.  New values being written into the Sub VI will affect the appearance of the Tab Control on the Front Panel of the Main VI.

 

Using Property Nodes, it is possible to change the appearance of Front Panel objects programmatically through code on the Block Diagram during run-time.  When using a Tab Control on the Front Panel, you are able to change the currently visible tab for the User through the available Property Nodes.  The Tab Control is similar to the Enum, in that it shares certain properties with Numeric Controls. Changing the Property for the Tab Control named "Value" during run-time will change the visible tab in focus for the user.


LabVIEW automatically breaks down VIs into different threads, enabling multithreaded, parallel processing.  You can view the CPU usage in the Windows Task Manager on the "Performance" tab. Note: When run, this VI will open the Windows Task Manager. This is okay.
Requirements:

  1. LabVIEW 2012 (or compatible)

Steps to Implement or Execute Code:

  1. Run the VI.
  2. Flick between Tabs.

Additional Information or References:

 Screenshot_1.pngScreenshot_162.png

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

George T.
Senior Applications Engineer
National Instruments UK and Ireland

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

Comments
nurlaila
Member
Member
on

nice. thanks