LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run one VI twice at the same time.

I use two eqivalent measurement sets each with individual devices (GPIB). I want to use them from one computer at the same time with the same LabView program, each with independent panel (two instances).
As far as I know it's only possible with "VI-Setup/reentrant execution", but in this case the panel is disabled and programs are strongly limited.
Copy to another name is another possibility, but under development conditions not useful.
Has anybody a more suitable solution.

Thanks in Advance
Sven.
0 Kudos
Message 1 of 6
(3,242 Views)
Pleas see if Jean-Pierre's answer at http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000056400000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=multiple+instances&USEARCHCONTEXT_QUESTION_S=0 will help you
0 Kudos
Message 2 of 6
(3,242 Views)
As long as you rename one of the two VI's there should not be a problem running them simultaneously. (I'm not sure why copying to another name should be a problem in your case) I've done this for years successfully with two SR830 Lockin-amps using the gpib bus at reasonably low speeds. If you're pressing the limits, speed wise, you may need to use a semaphore arrangement, to prevent GPIB errors. I'd suggest just trying the dual vi first....it certainly is simpler!

eric
Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
0 Kudos
Message 3 of 6
(3,242 Views)
> not sure why copying to another name should be a problem in your case

I think the key was his code is "under development."
Making a code change and copying the change (continuously with every tweak) is time consuming.

Les
0 Kudos
Message 4 of 6
(3,242 Views)
Absolutely right, it's possible but not very convenient.
Thank you

Sven
0 Kudos
Message 5 of 6
(3,242 Views)
I can't criticize something that works for you, but there are inherent dangers and costs involved in copying code. The danger is making an update in one place and not another. The cost is in making a copy or updating two VIs instead of one every time you make a change.
I think in the long run, you'll end up saving yourself (and anybody else who supports your code later) work and headache if you create code that's modular and reusable.
I'd reccommend either making the subVI reentrant (using the menu in the subVIs window, goto File >> VI Properties >> Category >> Execution >> Reentrant execution) or using a VIT.
0 Kudos
Message 6 of 6
(3,242 Views)