LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Operator Interface Randomly occuring: Cannot insert VI in a subpanel control because VI is already open.

Windows 11 Enterprise

Labview 2022

TestStand 2021

 

Migrating old code from NI2010 to NI2022.

 

I did not write this stuff and am coming up to speed with LabVIEW and TestStand.

I have built the OI from the original source in NI2022 and it works (yay!).  However...

There are multiple front panels that are inserted into the parent front panel in this OI.  Sometimes everything works as expected with those sub panels staying in the parent front panel.  Randomly, a randomly "selected" front panel pops up in front of the parent OI front panel and I get an error pop up that says "LabVIEW: Cannot insert VI in a subpanel control because VI is already open."  It has an OK button and gives no other information.

 

Clearly this is some kind of timing issue because on occasion, it does not happen during the testing.  Usually only one sub-panel does this, on rare occasion, more than one will.  Something is obviously different in NI2022 or it could be this is a side effect of this code being run on a computer that is 10 years newer and much, much faster than the old ones.

 

Can some kind soul give me a pointer to where I should look to correct this?  Then I can go through the OI learnings to see where I can correct the issue.

 

be well,

DLC

0 Kudos
Message 1 of 3
(143 Views)

It will probably be an invoke node that looks like one of these:

Kyle97330_0-1770167618917.png

This is a short NI reference on what it might look like in its surrounding environment:

https://www.ni.com/docs/en-US/bundle/labview/page/loading-a-front-panel-in-a-subpanel-control.html

 

The "easy" way to fix it would be to add a delay right before the "Insert VI" call.  The proper way would be to find the code that closes the VI earlier and make sure that the "Insert VI" doesn't run until after it finishes, or you could add code to force-close the window before the insertion... something like this:

Kyle97330_1-1770167985397.png

 

0 Kudos
Message 2 of 3
(105 Views)

@Kyle97330 wrote:

It will probably be an invoke node that looks like one of these:

Kyle97330_0-1770167618917.png

This is a short NI reference on what it might look like in its surrounding environment:

https://www.ni.com/docs/en-US/bundle/labview/page/loading-a-front-panel-in-a-subpanel-control.html

 

The "easy" way to fix it would be to add a delay right before the "Insert VI" call.  The proper way would be to find the code that closes the VI earlier and make sure that the "Insert VI" doesn't run until after it finishes, or you could add code to force-close the window before the insertion... something like this:

Kyle97330_1-1770167985397.png

 


Thanks for the pointer.  What makes my code interesting is that it isn't a LabVIEW project, the OI calls TestStand with a particular test sequence which then calls LabVIEW VIs for the tests.  The majority of the VIs in the OI project, which is distinct from the test project, are prefaced "Simple OI", which leaves me to believe it is just a hack of the NI demo OI program.  I don't see any of those sub panel VIs in the code.  The sequence file is fed to an Invoke Method for SequenceFileViewMgr.  I don't have any way to insert a delay or close a reference.

(screen grab of the highest level of this setup)

OI_Interface.png

 

be well,

DLC

0 Kudos
Message 3 of 3
(66 Views)