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.
Is there a way to get the source code for the guidll.dll so it can be recompiled for 64-bit applications?
In the 2014 version:
Any chance of getting these issues fixed? I'd like to see an example of making this work.
I was trying to run this example, but the same issues as above are occurring. Is there a corrected example anywhere?
Hello, any ideas why the actual FP pops is a separate window all the time (and is just not shown in the subpanel?)
This example works when running from source code. However, it DOES NOT work if running the EXE. When running the EXE, the VI does not show up in the sub panel when it is supposed to. It is displayed in a pop up window.
How can this be fixed?
I tried LabVIEW 2019 with TestStand 2022 and with LabVIEW 2020 and TestStand 2022.
I would like to edit my previous comment, the example does work from an EXE if the LabVIEW Adapter is set to runtime. It does state this in the description but I missed that.
However, any VI's in callback sequences will not automatically show up unless an expression is added to the callback sequence in the step before the VI call.
RunState.Thread.PostUIMessageEx(UIMsg_UserMessageBase +0, 0, "", Nothing, True)
The Callback VI must then be configured to handle UIMsg_UserMessageBase +0, which is basically a copy of what happens for message code 4. (Or add UIMsg_UserMessageBase +0 to the case selection.)