LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does it hurt to have a subpanel VI change its execution state?

Typically, when I insert a VI into a subpanel, that VI is running continuously until the top level VI shuts down. I was wondering, though, if it would hurt to call the subpanel VI like a normal "run-once" subvi, called continuously in a loop by the parent VI.

 

The attached VIs provide a very simple example.

 

subpanel.png

 

The code runs without errors, but I am wondering if there might be some caveats that I have not yet encountered. The subpanel VI will be changing execution state (running/idle) regularly; will that cause any problems, say, if I compiled it into an executable?

 

I realize that there are plenty of other ways to acheive this functionality--the most obvious of which is to put the indicators in the parent VI and wire them as outputs from the subvi--but please humor me. I'm asking this mostly out of general curiosity. Plus, when you have a VI with a very large number of controls/indicators, the LV compiler can be slow to save the VI, so there would be *some* benefit in pushing the indicators down to subVIs.

Download All
0 Kudos
Message 1 of 2
(2,130 Views)

Does it hurt to have a subpanel VI change its execution state?  Dosen't hurt a bit!  You will notice a slight performance hit from the sub.vi call overhead but really- this shoudn't be noticable (without looking at vi meterics)


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 2
(2,129 Views)