From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting if vi has been inserted into subpanel

Greetings All!

 

Supaneling advanced topic

 

Question?

Can you detect if a subpanel has a vi loaded into it?

Can you detect if a vi has been loaded into a subpanel?

 

Setup:

I have a 5 tab application.

Each tab has a subpanel for a different vi.

Some of the vi's create a pop up of other vi's

SOooo......when the tab is selected the vi is inserted into the vi, when another tab is selected, it will uninsert the appropriate subpanel vi's.

 

Problem, The uninsert and insert are active every single loop, and it turns out they are processor/time hogs and are delaying the program by about 400-700 ms.  I have to have a way to detect if the subpanel reference has a vi connected to it or not, because I can't have the insert vi, and remove vi method iterated each time.

 

 

 

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 1 of 7
(2,562 Views)

I would add another parallel loop with an event structure to handle the tab's Value Change event.


"Should be" isn't "Is" -Jay
Message 2 of 7
(2,561 Views)

What value is changing when the subpanel has a vi added or removed?  If I know that i can just add in a feedback node with a comparison statement

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 3 of 7
(2,557 Views)

I think Jeff is trying to tell you to have a separate loop and an event structure that handles whatever events you have going on that tell a VI to be inserted or removed from a subpanel, whether that is a tab control value change event or something else.

0 Kudos
Message 4 of 7
(2,549 Views)

Using a feedback loop to monitor the change in the tab worked to control the subpanel loading or unloading.

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 5 of 7
(2,524 Views)

Both those methods work for my purposes, so i'm satisfied for the moment, but for the purposes of the thread, neither of them detect whether the vi is inserted into the panel or not.  Maybe a future version of LabVIEW will have the feature "Is panel loaded" in which case this thread will have a real solution.

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 6 of 7
(2,521 Views)

You're always welcome to post your feature ideas on the NI Idea Exchange!

http://forums.ni.com/t5/NI-Idea-Exchange/ct-p/ideas

 

You can see user ideas that were implemented in LV 2010 here:

https://decibel.ni.com/content/docs/DOC-11919

Tom L.
0 Kudos
Message 7 of 7
(2,506 Views)