07-06-2016 12:54 PM
I have a LabVIEW operator interface that runs fine in the LabVIEW development environment, but when I try and build it into an executable the LabVIEW adapter for the steps running in TestStand seems to be a different instance than the LabVIEW that launched TestStand. Is there a way to point TestStand to the LabVIEW adapter within the LabVIEW executable so that the steps run in the same instance that the EXE that launched LabVIEW is in? Has anyone else seen this issue? Does my question even make sense?
07-07-2016 07:44 AM
Your question makes sense. For example, a functional global variable created in your OI isn't accessible by TestStand. I don't think there's a way to point TestStand to the OI LabVIEW adapter (probably because the interface could be in a number of different languages that aren't LabVIEW).
If your need is to create some form of communication between your OI and TestStand, you could have TestStand send UI Messages and the interface can respond by setting TestStand variables.
I have also found that some operator interface features (such as subpanels) require that the TestStand LabVIEW adapter must match the interface (i.e. both must be LabVIEW development or both must be run time).
07-07-2016 10:32 AM
Thanks for the reply. Unfortunately changing to a messaging based approach would require a significant amount of rework. I am currently pursuing an approach where I have a dummy OI that does nothing but start the TestStand sequence, then I have a TestStand step launch my actual OI.
07-07-2016 10:34 AM - last edited on 08-08-2024 03:33 PM by Content Cleaner
The behavior you are referring to is related to the concept of LabVIEW Application Instances, which is basically the idea that LabVIEW can execute VIs within independent instances. As pulidotech mentioned, this often comes into play when trying to use FGVs or subpanels in LabVIEW.
Within TestStand, one of the main things that affects the application instance is whether the LabVIEW adapter is executing VIs in the context of a LabVIEW project--if you specify a LabVIEW project in the step settings, that VI will be executed in the context of that project, which is a separate application instance from VIs that do not have a LabVIEW project specified in the step settings.
You can always tell what application instance a VI is executing in by looking at the bottom status bar of the VI front panel window. It will display the name of the application instance, which is typically either 'Main Application Instance" or the name of the LabVIEW project, if the VI is being executed in the context of a project.
You can find a lot more information about this here: https://www.ni.com/en/support/documentation/supplemental/13/how-teststand-interacts-with-labview-app...
Hope it helps!