10-14-2011 06:27 AM
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
Solved! Go to Solution.
10-14-2011 07:11 AM
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
10-14-2011 09:04 AM
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.
10-14-2011 10:20 AM
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.
10-14-2011 10:33 AM
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.
10-14-2011 11:40 AM
I have it set to Preallocate clone for each instance, is that correct?
10-14-2011 12:00 PM
Yes, that should be the correct setting.
10-14-2011 12:52 PM
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.
10-17-2011 09:44 AM
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
10-17-2011 10:17 AM - edited 10-17-2011 10:22 AM
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.