NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand VI into SubPanel

I've been trying to integrate a Sub Panel into my UI.  The reason is that for developers and debugging, we use the sequence editor, but the operator interface is a custom UI.  For a parallel model, we have a custom UI to run the sockets.  I want that UI to load into a sub panel on the operator UI but when running in sequence editor, just launch the VI.

 

My problem is with the sub panels.  I thought I had this working but it turns out I was doing things in a certain order that allowed it to work within the sequence editor.  What I was doing was launching the UI when in the sequence editor.  I would then close it, open a separate VI (for test purposes) that had a subpanel that would open the UI and it ran fine.  I ran into problems when trying to integrate this into the main UI (ie not using sequence editor at all).  The main UI would start the parallel model.  I found the path to the parallel UI using RunState.Engine.FindFile().  I then try to load that file into the subpanel.  The front panel loads but the VI isn't running.

 

I started experimenting with just a basic VI and basic subpanel and noticed some things that are probably causing me problems.  There are two images attached here.  The No Path indicated shows that first time the sequence is run.  The VI call to it's own path doesn't return anything.  But the next time I call the sequence, the path is there.  I also noticed that if the VI is already open, the VI path is there.

 

What I need is a reference to the VI that TestStand opens so that I can load that into a sub panel.  Looks like just using the path doesn't work.  Is there a way to get the actual VI reference for a step executed in TestStand so I can use that to load the VI into a sub panel?

Download All
0 Kudos
Message 1 of 10
(4,450 Views)

Hi Sir Mutt,

 

I was able to find another similar thread on using Sub Panels in TestStand. There is a link to an example written in C that may be helpful. 

 

Regards,

KyleP
Applications Engineer
National Instruments
0 Kudos
Message 2 of 10
(4,412 Views)

Hi Kyle,

 

Thanks for the response.  I think these are similar to what I'm trying to do but not quite the same.  Really, my main issue is getting a reference to the VI that is running.  I want to launch a VI, get a reference to it (that is valid), send that to my UI via a UIMessage or perhaps telling the UI that the reference is available to retrieve, then have the UI load that VI into a subpanel.  The reason I say "that is valid" is that it seems that if I just try to use the path to the VI, the subpanel loads the VI but it isn't the one the TestStand has running.  So I need a reference to the VI that is running so I can load that into the subpanel.  If I can get that, I shouldn't have any problem getting that to my UI to load the subpanel.

 

Thanks

0 Kudos
Message 3 of 10
(4,401 Views)

I still need a solution to gettinga  subpanel in my Operator Interface.  If running from the Sequence Editor and the user wants to run a parallel test, it will launch a LabVIEW OI specifically for parallel testing.  But if running from the main Operator Interface, I want to launch the parallel GUI from TestStand and have it loaded as a sub panel in the main OI.  

 

I can get a reference to the VI and load it into a sub panel, but the VI isn't running.  It is like it loaded a separate instance.  The parallel GUI is running somewhere in the background because when I try to exit things are still running and I end up crashing LabVIEW.  I tried saving a reference to the parallel GUI to a TestStand variable as a type of Interface then getting that variable in the main GUI but when I convert the variant to a VI refnum type, it says it is an empty refnum, even though the variant has a value that looks valid.

 

Not sure if these are more LabVIEW questions???  Is there a way to cross link this post to that forum?

0 Kudos
Message 4 of 10
(4,339 Views)

Hi Sir Mutt,

 

I'll see if I can replicate something to get what you're after. If you're sending a reference to the VI file through your UI message without giving it any reference to the instance, than I can see where you're running into this problem. Are you passing the sequence context at any part of your code?

 

I would probably leave this as a TestStand question, although the lines do blur from time to time.

 

Cheers,

KyleP
Applications Engineer
National Instruments
0 Kudos
Message 5 of 10
(4,327 Views)

The Main Operator Interface is where the sub panel is to load.  I do not have the sequence context there.  I've looked for ways to find it via the API but haven't found that, but I don't know if that would really help.  The main problem is the sub panel.

0 Kudos
Message 6 of 10
(4,314 Views)

Hi Sir Mutt,

 

While I was looking into this a bit more, I did happen to come across an example titled "Dynamic Subpanel in a TestStand User Interface" which seems to do what you're looking for. Specifically, you might want to look at Callback.vi in TestExec.llb which implements the sub panel. Let me know if this is helpful for you.

 

Cheers,

KyleP
Applications Engineer
National Instruments
0 Kudos
Message 7 of 10
(4,294 Views)

This certainly looks promising.  It doesn't look much different from what I've been trying but there are some subtleties that may be the fix.  Hopefully I'll get to a point where I can try this soon.  Thanks.

Message 8 of 10
(4,267 Views)

Did you get this working?  I am having the same issues.  I also have the issue where the VI's front panel opens in a new window along with the the subpanel even though I have specifically unchecked those boxes in the VI properties.  This is a awesome feature if I can get it to work.

0 Kudos
Message 9 of 10
(3,910 Views)

No, we went a different route.  I don't think I ever got the subpanel to work properly.

0 Kudos
Message 10 of 10
(3,895 Views)