LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic load n..vi´s from template and connect it

Hi there!

Maybe someone could give me a hint or tell me the "best" way to solve my problem.

I wrote a vi template. This VIT hase 4 inputs and two outputs.
IN
1D array with double values.
3x1D array with bool values.
OUT
one double value
one bool value

This should represent an Objekt witch handeles,
unlimited "analog input + state value" and
"digital input + state value".

The user configures this through a simple TABLE.
One TABLE for AIN and one for DIN each row represents
one Input Channel.

The user gives each channel a maximum and minimum
value and one weighting value from 0 to 1 or 1 to 0.
The Output value represents also a value between 0 and 1.
this output hase an status value too.
So far my "objekt" works correct.

The problem witch makes my head ache.
Can i load "unlimited" "objects" ,free then AND
make connections between this dynamic loaded vis.
I would like to be able to connect the output e.g. from
OBJ1 and OBJ2 to the input of OBJ3 like a fast forward
chain.Load a vi dynamically from a template is no
problem, but the managment and handling loaded vis, (how much in memory,
get reference connect to other etc. etc.)

happy about every hint....
0 Kudos
Message 1 of 5
(2,888 Views)
hi MrSieb,

I'm sorry, but I think I don't really understand your problem...
you want to place your template VI, one by one in a chain and connect them in row?
do you've got a screenshot of what you wanna do? or do you already get an error message?

greets!
0 Kudos
Message 2 of 5
(2,867 Views)
You can communicate between VIs either via a Queue (named queues are cool) or via VI server.

Assuming you can give VI1 a reference to VI2, VI1 can use VI server to set control values in VI2 and so on. Alternately, you can simply use a QUEUE-based approach where each VI waits for data from a named QUEUE. The trick is naming the QUEUES so that the correct order is followed. The easiest is to launch the VI templates with an index number and then have a standard QUEUE name with a string + index number as the queue name. Thus, waiting for QUEUE(n-1) will make the VI instance wait for the data from the previous VI. Of course you need logic to make sure the first VI doesn't wait for data from QUEUE-1.....

This way you'll have all instances of the VIs in memory, with each subsequent VI containing different data.

If you're looking for pure functionality, why don't you just stick a VI in a loop with a shift indicator? I^m assuming your code is more academic in nature?

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 3 of 5
(2,863 Views)
>> I'm assuming your code is more academic in nature?

Yes, this is correct at the moment it is just an idea 🙂
I attach a drawing whitch should show how i like to connect my objects.
The hint, using named queues is very great.
0 Kudos
Message 4 of 5
(2,845 Views)
Aha, thanks for the picture.

I have a good idea what you're doing now. Good luck with the coding.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 5 of 5
(2,837 Views)