NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Load Test Step VI in SubPanel Of User Interface

I'm trying to get TestStand to load the steps VI in to a subpanel I have in a custom UI.

 

I'm using the following code in the "UI Message Event Callback" to listen for a custom UI message from the executing sequence. The case "10002" then writes the subpanels reference to the TestStand sequence

Capture.PNG

 

In the TestStand sequence, I have a single test step (for testing) that has the following code in it

Capture.PNG

Unless I'm mistaken about the above, I am posting a message (10002) to the UI, waiting for it to execute, obtaining the reference set by the Callback code (FileGlobals.TS_SubPanel), returning it to the type of SubPanel and using the reference to load a VI into.

 

I receive the following error:

Capture.PNG

I'm making an assumption that this issue is to do with how TestStand is handling the SubPanel reference.

 

Is this actually possible to achieve? I've scoured the internet and seen a few people asking about similar topics, but never seen a complete solution. There is an example somewhere that is NI verified, but I couldn't get that to work either.

 

I did have an alternative method that passed the path of the VI that the Sequence File wanted to use for the particular test step to the UI, and successfully managed to load the VI in to the subpanel, but none of the controls worked with the test sequence. Presumably because the sequence context was no longer valid.

 

Any help would be appreciated, I feel this is achievable, or at least should be!

 

Thanks

0 Kudos
Message 1 of 5
(3,368 Views)

Just to start things off, did you follow the example here 

 

I found it very helpful when I was doing a project like this awhile ago.

Message 2 of 5
(3,357 Views)

Thanks DOOJ,

 

I've seen this example and not managed to get this working, but this time I have. I've followed the code that's been done in the UI Message call back and am now in the position where my custom UI will load the VI in to the subpanel!


This is great, but none of the controls work and also TestStand still launches the VI as well (So now I have two of them open, one floating, one in the subpanel. The floating one's controls work correctly).

 

I must be missing some code somewhere that tells TestStand not to load the VI as well?

0 Kudos
Message 3 of 5
(3,338 Views)

It's great you are making progress. Did you look throught the forums? I found the following helpful, then a newer issue looked promising also.

 

https://forums.ni.com/t5/NI-TestStand/Extra-Window-when-using-SubPanel/td-p/2705251

https://forums.ni.com/t5/NI-TestStand/Extra-Window-for-LabVIEW-User-Interface-s-Subpanel/m-p/3649446

There are a few caveats where things don't work right, you may be in one of those.

 

0 Kudos
Message 4 of 5
(3,334 Views)

Usually, when I see issues with the VI appearing outside my subpanel, I have a mismatch between my Interface and my TestStand Adapter.  The two have to match.  If my interface is running as an EXE, the TestStand LabVIEW adapter must be Run Time. 

 

Pulido Technologies LLC

0 Kudos
Message 5 of 5
(3,303 Views)