LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can queue transmit large volumn of data, or better use function global instead



turbot wrote:

So far as I know the queue is just a data structure, but the function global is have memory allocated


I'm not sure what you mean by that. Any piece of data in LabVIEW needs to have memory allocated for it. In some cases, the compiler is smart enough to reuse an existing buffer instead of allocating a new one. Both queues and functional globals can reuse existing buffers, but it depends on what you actually do with them.

___________________
Try to take over the world!
0 Kudos
Message 11 of 13
(544 Views)
In this application, the data will come(en queue) from different vi, and may go(de queue) to one or more vis, somehow like a buffer. The which is more fit to use. Thanks.
0 Kudos
Message 12 of 13
(525 Views)
You can only dequeue an element once (the reason the memory is reused is because it's guaranteed to only have one copy). If your design is OK with having each element available in only one place, then use a queue. Otherwise, you will need another method.
 
You should note that a functional global will not create an extra copy only if the data is kept inside it. In any case, your questions are a bit hard to understand. If you have anything specific in mind, you should post your code and show us in the code what you want to do.

___________________
Try to take over the world!
0 Kudos
Message 13 of 13
(518 Views)