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.
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.
02-10-2012 01:31 PM
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.
02-10-2012 02:30 PM
I would add another parallel loop with an event structure to handle the tab's Value Change event.
02-10-2012 02:33 PM
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
02-10-2012 03:26 PM
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.
02-13-2012 04:00 PM
Using a feedback loop to monitor the change in the tab worked to control the subpanel loading or unloading.
02-13-2012 04:02 PM
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.
02-14-2012 06:02 PM
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