LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running vi in multiple subpanels

Solved!
Go to solution

I am trying to create an application in which I can run a vi in two subpanels simultaneously. The only way I have been able to get it to work is by saving the vi as a template, .vit. Are there any concerns I should have in using a vit instead of a vi in my application? Is there any other way of running a vi in two subpanels at the same time?  Thanks

0 Kudos
Message 1 of 12
(8,429 Views)

Hello Dray,

 

Using template VI's should not be a problem instead of using .vi files. There is however another way to do it using Reentrant VI's. These can can the same VI in multiple instances, simultaneously. I have found an article which explains in detail how to use both reentrant VI's and template VI's. I hope this helps with your application.

 

Regards

David B
Applications Engineer
National Instruments UK
Message 2 of 12
(8,417 Views)

Do you want the two subpanels to be indendent of each other or are you trying to have two subpanels of the same VI. That is effectively trying to have two front panels for the same VI. Reentrant VIs or VI templates will let you do the first option. If you are trying to accomplish the second I don't think that is possible.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 3 of 12
(8,405 Views)

I do want the subpanels to operate independantly.  When I've tried to use a reentrant vi I get error 1145 because  the vi is already running in one of the panels.  Works fine if I use a template vi. 

0 Kudos
Message 4 of 12
(8,393 Views)

For the reentrant VI do you have it configure to share the memory or for it to be loaded independently. This is under the execution properties for the VI. You may want to set it so they don't share the clone.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 5 of 12
(8,388 Views)

I have it set to Preallocate clone for each instance, is that correct?

0 Kudos
Message 6 of 12
(8,380 Views)

Yes, that should be the correct setting.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 7 of 12
(8,374 Views)

Still get 1145 error.   Like I said earlier it works in the file in saved as a .vit, so I guess i will just run it that way.  Thanks for  the help.

0 Kudos
Message 8 of 12
(8,370 Views)

Dray, 

 

The reason you are getting the 1145 error is because the subpanel is already open. The soultion actually is to use a VI template, which I know is how you said you got it working. To understand why this is so, please refer to this article. 

 

Hope this helps!

 

Katie 

Katie Collette
National Instruments
0 Kudos
Message 9 of 12
(8,328 Views)
Solution
Accepted by topic author Dray

It is possible to run the reentrant VI in two subpanels.  You have to open the VI reference with options set to 8.  Do this twice to get two references and place them into the subpanels.

 

 

Message 10 of 12
(8,322 Views)