LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data exchange between loops in different vi's

hello,

in the top level vi of my application i've got a daq.
data from the daq is needed in a low level vi.
both vi's are controled with queues.

the problem is that i solve the data exchange with a global variable.

i there any other solution to avoid global variables.

markus
0 Kudos
Message 1 of 5
(2,395 Views)
You can also exchange the data with queues. Since version 6.1 or 7.0 you can define a queue to handle any datatype. I have a command queue and a response queue for each pair of independent VIs which must exchange data, commands, or status. The command queue often passes a cluster with and enum (the command) and a string or numeric with parameters. The datatype of the response queue depends on what needs to be returned. Sometimes it is a clsuter with a status enum and a data variable. Works fine. No globals.

Lynn
0 Kudos
Message 2 of 5
(2,387 Views)
If you have LabVIEW 8.0, you could use the new "Shared variable" 🙂
0 Kudos
Message 3 of 5
(2,381 Views)

here

http://forums.ni.com/ni/board/message?board.id=170&message.id=163697

we come up with multiple ways Smiley Happy

 

Hey, has this already been noted for the FAQ?

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 5
(2,364 Views)


@WeberM wrote:
hello,

in the top level vi of my application i've got a daq.


Another hint: If your daq is somehow timecritical it is always a good solution to not run it in the top level vi IF your toplevel vi also has the GUI . More about threats and the UI threat  in the KB.

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 5
(2,358 Views)