07-16-2010 08:24 AM
Hello
I have a data acquisition application which uses a analog Input PCI-Hardware.
With this hardware I sample different channels and display them in diagramms
In "overview" operation I sample 4 channels and display them in 4 diagramms.
So for every channel I have a fourth of the maximum sampling rate.
In "zoom" operation I only sample one channel (with max sampling rate of the hardware)
and display the data in the selected channel (the other channels are igored in zoom mode)
My idea is to launch different VIs depending on the mode (overview, zooom).
I could imagine, that a good approach to perfom this task is calling different VIs
from the main programm.
Unfortunately I do not understand how to pass parameters to/from the VI if I call them
using the nodes "open VI reference", "call by reference" and "close VI reference".
I tried to understand the Labview "Dynamic Load Example" but it's too complicated for me.
Can someone give me a simple example for dynamically loading VIs or are there any white papers
or nugets about this subject?
Solved! Go to Solution.
07-16-2010 08:31 AM
How about an image of how I do it?
Another approach would use the Invoke Node Call by Reference where you can pass values to and recieve results back the same way a normal sub-VI call works.
I hope that helps,
Ben
07-16-2010 08:40 AM
As shown in Bens example, you need the Val.Set and Val.Get and RunVI methods. OpenG has some wrappers of these methods, which might make it easier for you to use them. There was also a nugget by Damien/DFGray. You can find a list of his nuggets in the breakpoint forum.
Felix
07-16-2010 08:45 AM - edited 07-16-2010 08:46 AM
Hi! To pass data to/from dynamically loaded vi, you have many option (other than accessing controls via Vi server):
- Global variables (used wisely...)
- Functional globals
- Queues
- Notifiers (especially good for one-to-many data transfer)
...
Marco
07-16-2010 08:52 AM
Here is the link to the nugget I mentioned:
Dr-Damien-s-Development-Running-Top-Level-VIs-V-A-String-Server
Note that this is the last(?) of 5 post on this topic. You might want to start with the first one.
Felix
07-17-2010 02:28 AM
Hello Ben,
thank's for the info. I will do some tests, to see if it helps to solve my problem. I keep you posted.
07-17-2010 02:29 AM
also thank's to you Felix. I have to study the nuget and keep you also posted
07-17-2010 02:50 AM
Hello, I tried to follow the link unfortunately it does not work. Any hint how to find Dr. Damiens nugets?
07-17-2010 03:38 AM
There is one additional http:/ in the link above. Here it comes again (hopefully it works):
Felix
07-17-2010 03:50 AM
Hi Ben,
unfortunately your proposal does not help me, because I do not understand the diagramm. I have not too much experience with Labview, have a german version of Labview and cannot find the following symbols of your drawing:
Active Name (with the glaces), Active Obj Refnum. Can you plaese sende the picture once again with descrition of symbols displayed, so that I can reprogramm and investigate the example? Thank's