LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to replace extra local variables

Solved!
Go to solution

DFGray,

Can you provide, or point to, a demo showing how to use New Data Value Reference to communicate between two loops?

Thanks.

Richard






0 Kudos
Message 21 of 29
(2,303 Views)

From the LabVIEW 2009 help:

You also can use a data value reference to store data without creating extra data copies. Data value references are slightly more efficient than queues but have no timeout options. Instead of transferring data to a queue, you can create a reference to data and pass around the reference. To operate on the data, use the In Place Element structure. The Data Value Reference Read / Write Element border node accepts a data value reference as an input, allows you to operate on the data within the In Place Element structure, and replaces that data in the original memory space.

 

Attached a small example.

 

hope this helps,

Norbert

 

[Edit]: Correction done in example.... 

Message Edited by Norbert B on 08-21-2009 02:55 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 22 of 29
(2,285 Views)

Information about the Data Value Reference is also already on the forums, please see this link 

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 23 of 29
(2,268 Views)
Very nice, thanks Norbert. Smiley Happy
Richard






0 Kudos
Message 24 of 29
(2,256 Views)

hello Mr.Patha,

i also had the same situation, please guide me, thank you

zainudin

 

here is my vi

 

0 Kudos
Message 25 of 29
(2,103 Views)
i'm sorry, subvi for the main vi
0 Kudos
Message 26 of 29
(2,099 Views)
here another link to main vi
Download All
0 Kudos
Message 27 of 29
(2,081 Views)
0 Kudos
Message 28 of 29
(2,079 Views)

Zainudin,

 

The way to get around using local or global variables changes depending on how you're using them. If you're using them to pass data, then the posts by DFGray should explain the options.

 

If you're using them for control of your application, then the best approach will probably be a state machine. You can also use a cluster with all of your settings and pass it through a shift register to the different loops. 

Jared S.
Applications Engineering
National Instruments
0 Kudos
Message 29 of 29
(2,051 Views)