To download NI software, including the products shown below, visit ni.com/downloads.
The visibility of LabVIEW code modules in a TestStand sequence is largely dictated by the "Show VI Front Panel When Called" option in the Step Settings pane. Even then, with this selection enabled, the called VI displays in its own window. This example shows how VI code module front panels can be embedded into the TestStand user interface.
In LabVIEW, a subpanel control can be used to show the front panel of a VI within another VI. If a subpanel is included on the front panel of a user interface, we can populate it with the presently executing code module so long as it is indeed a LabVIEW VI. This example illustrates how to display the front panel of a VI when the necessary conditions are met:
The example uses the trace UI Message to notify the User interface before each step executes. When notified, an event callback VI determines whether the next code module is a LabVIEW VI and if it has "Show VI Front Panel When Called" enabled. if these conditions are met, the User Interface populates the subpanel with a reference to the code module VI.
The callback also checks if the VI is loaded in the context of a LabVIEW project, and loads the soccesponding application reference, so thta the proper instance of the VI is displayed in the sub panel.
Since this example uses the trace UI message, the enable tracing setting must be enabled in the station options for this example to function correctly. If performance is a concern, ensure that the tracing speed is set to the fastest to minimize the performance impact.
The following scenarios will still result in the execution of the LabVIEW code module in its own window:
Dynamic Subpanel - TS2019.zip
TestStand 2019 or compatible
LabVIEW 2020 (if using the ADE adapter configuration in TestStand).
Dynamic Subpanel - TS2016.zip
TestStand 2016 or compatible
LabVIEW 2016 (if using the ADE adapter configuration in TestStand).
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.