Back to Browse

LabVIEW - Loading a Front Panel in a Subpanel Control

4.6K views
May 27, 2021
7:16

Loading a Front Panel in a Subpanel Control We can use the subpanel control to display the front panel of another VI on the front panel of the current VI. For example, we can use a subpanel control to design a user interface that behaves like a wizard. Add the Back and Next buttons to the front panel of the top-level VI and use a subpanel control to load different front panels for each step of the wizard. Follow these steps to load a front panel in a subpanel control. Add a subpanel control to the front panel. LabVIEW creates an Invoke Node on the block diagram with the Insert VI method selected. Add the Open VI Reference function to the left of the Invoke Node on the block diagram. Wire the path of the VI whose front panel we want to load to the vi path input of the Open VI Reference function. Right-click the vi reference output of the Open VI Reference function and select Create - Method for VI Class - Run VI from the shortcut menu and add the Invoke Node that appears on the cursor to the right of the Open VI Reference function. Wire the vi reference output of the Open VI Reference function to the vi reference input of the Run VI method. Right-click the Wait Until Done input of the Run VI method and select Create - Constant from the shortcut menu to create a Boolean constant with a value of FALSE. Wire the vi reference output of the Run VI method to the VI Ref input of the Insert VI method. Add a While Loop to the right of the Insert VI method. In the While Loop, right-click the conditional terminal and select Create Control from the shortcut menu to create a stop button. Add the Wait Until Next ms Multiple function inside the While Loop and wire a numeric constant to the millisecond multiple input. Specify the number of milliseconds we want to lapse when the VI runs. Add the Close Reference function to the right of the While Loop. Wire the vi reference output of the Run VI method through the While Loop and to the reference input of the Close Reference function. Wire all error in and error out terminals on the block diagram. We can also use the SubPanel properties and methods to modify subpanel controls programmatically. Watch the entire LabVIEW tutorial series here; https://www.youtube.com/watch?v=Sr0xYsHHYUo&list=PL741D36B501D4AC78 Watch the entire TestStand video learning series here; https://www.youtube.com/watch?v=8w2S80ZrwHQ&list=PLOO4qYU7-Ve4MgIJvFb7QPvCgQbTzlrhj Get more LabVIEW Tutorials for free!!! https://www.youtube.com/channel/UCXzPblvs3_HorutUt8oQ-tA?sub_confirmation=1 #labview #labviewtutorial #labviewsubpanelcontrol

Download

0 formats

No download links available.

LabVIEW - Loading a Front Panel in a Subpanel Control | NatokHD