LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inability to run VIs in more than one sub panel

Hello,

 

I have a VI that contains a tab control with 8 tabs. Under each tab, I have placed a sub panel. I need to a separate VI in each sub panel simultaneously.

Using Open VI reference function and without any options,I have Invoked Nodes to Run VI and then insert respective VIs in unique sub panels.

 

Apart from a single VI running under a single tab, I am unable to see any of the other VIs running in all other tabs. Error Indicator shows No Error.

 

Could someone please tell me how to run multiple VIs, each in a unique sub panel, but under the same tab control?

I failed to execute a separate VI under a sub-panel that was even placed OUTSIDE the tab control...

 

Thanks in advance.

0 Kudos
Message 1 of 9
(2,007 Views)

Hi

 

Could you show some code? We might have a look at what you are doing. Then, it would help us understand the issue and look for solutions.

 

It is a bit difficult to imagine the code and guess the problem.

 

Btw.. I use a single sub panel control and run multiple VIs in parallel and show only the VI which belongs to the tab page selection. all other VIs run in the background.

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 2 of 9
(2,000 Views)

Hello Freelance_LV,

 

Thanks for your response.

 

Please find the snapshots of the Front Panel and corresponding Block Diagram of the sample code I intended to use (in Labview 12).

 

As you said, I too, was able to switch (insert-remove-re-insert) VIs to execute from a single sub-panel when required.

 

However, in this instance, I need to run 8 different VIs in 8 sub-panels simultaneously. Its so that my customer can look at different VIs for different tab selections at any point of time, and at the same time. Sadly, only 1 sub-panel VI seems to be running while the others arent, even though the logic for opening-running-inserting VIs for all sub-panels are the same...

 

Download All
0 Kudos
Message 3 of 9
(1,987 Views)

You need to insert the vi first and then run it.

You can also have it in a for loop like this: http://forums.ni.com/t5/LabVIEW/Many-Sub-panels-to-call-same-VI/m-p/2397410#M742676


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 4 of 9
(1,973 Views)

Hello .aCe. ,

 

Thanks for your response.

 

Could you explain your suggestion? Would it be that running a VI before inserting it could cause unpredictable behavior during insertion (what with the VI already in an execution state)? The Help on Insert VI stated that the VI would be inserted without any change in state. But whether it matters if the VI was previously running or not, was not really hinted at anywhere in the documentation..

 

I went ahead and modified the flow as guided. However, the results remain unchanged.

In fact these 8 VIs that I plan on embedding are exactly similar in logic,i.e., they continuously update respective tables based on some global variables.

*** A puzzling observation is that, using a dummy VI (containing a table and a boolean with no logic other than checking for a STOP condition in a while loop) and a table VI, I was able to successfully insert these 2 VIs into 2 sub-panels and get them running simultaneously!!..It is only when I use atleast 2 table VIs, that I'm failing to execute them on different sub-panels...

 

0 Kudos
Message 5 of 9
(1,964 Views)

If you are using a common sub-vi inside any of your "insert VIs", then that sub-vi and any sub-vis of that must be set to reentrant.

 

If the sub-vi is NOT reentrant the first "insert VI" that is started will load the sub-vi and the other "insert VIs" will wait for the sub-vi. This would make them appear to be not executing; they are actually waiting for their turn to use the sub-vi.

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 6 of 9
(1,952 Views)

Hello Phillip Brooks,

 

Thanks for that input. However, none of my sub-VIs are invoked by any other VIs, nor do they contain common VIs.

 

Regardless, I changed the VI properties of all 8 sub-VIs (table VIs in my case) and checked for both Shared Clone Re-entrant as well as Preallocated Clone Re-entrant execution. In both cases, results remained unchanged. Other than the first sub-VI in the first sub-panel, none of the other sub-VIs in the remaining sub-panels were executing. I checked the execution states for all 8 sub-VIs and found only the first one in RUN..others were IDLE..

 

Please find attached all the VIs required to build this test project. Code was made in Labview 2012. Would love to know what I am doing wrong..

0 Kudos
Message 7 of 9
(1,921 Views)

Is it any difference if you insert before you run?

(From a code structure you can make an array of the subpanel refs instead of that 2nd case structure)

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 9
(1,906 Views)

Hi

 

could you post the code in LV 2010?

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 9 of 9
(1,875 Views)