LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a data Buffer similar to Chart Histroy in LabView ?

Dear all,

Is there a data Buffer similar to Chart Histroy in LabView ?  Which I can store a large amount of data without worrying about memory & overflow ? I don't want to display original data, I want to process data in the buffer, then discard the original data. Do I necessarily need to use Chart?

I  don't want to display original data because I want to save time to do other processing and make output more "real-time".

Maybe " Initilize Array" can do that? any one has examples?  or is there similar functions in Labview as " Malloc" in C/C++?
0 Kudos
Message 1 of 5
(2,911 Views)
Take a look at using a queue or a fifo.
0 Kudos
Message 2 of 5
(2,903 Views)
I would agree with unclebump about using queues.  There are several very good examples in the Example Finder (Help » Find Examples, search for queue) about these sets of functions and how to use them.  Let us know if you have any questions!

Thanks!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 3 of 5
(2,892 Views)

But one of the things that the Chart History buffer handles is to act like a circular buffer, overwriting old stale data as new data comes in.  As far as I've been able to determine, Queues can't do that.  Instead, a queue will either grow its size and write the new data into the new space or else it will ignore the new data and return an error.  I haven't found an option that lets you leave the queue at the same size and overwrite the oldest data with the new data coming in.

In the past I've used LabVIEW RT where the RTFIFO offers such an option, and I don't understand why queues don't support it.  I'll grant that the default behavior for a queue should be NOT to overwrite, but an explicit option would be very useful.

Probably an even better wishlist item would be a new set of functions called Circular Buffer.  Underneath, it could be implemented similarly to either Queues or RTFIFO's.  Additional accessor functions would be provided to allow random access rather than purely sequential access.  The ability to request an array of elements rather than a single one at a time should also be supported.

In the meantime, someone on this forum posted a tip a few weeks ago.  He (she?) would create a subvi that used an actual Waveform Chart as the circular buffer.  The extra trick was to hide the chart on so there wouldn't be slowdowns to draw the chart data n the front panel.   Ah yes, see the response by rpursley8 in this thread.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 5
(2,871 Views)
Kevin,

Gary Johnson's book, LabVIEW Graphical Programming, McGraw-Hill, 1994, included a circular buffer VI using an uninitialized shift register. I found a copy that I had modified slightly and have attached it.

Lynn
0 Kudos
Message 5 of 5
(2,864 Views)