LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A question about the best way to impliment a circular buffer with a sectional recall of data.

I have an application where I am needing to record up to 7 signals of up to 200 samples per-signal per-iteration. I will need to maintain a buffer of the last 200 interations, and will need to periodically call the last 20 iterations for display purposes. I was considering using a circular buffer for this, with two integer values acting as pointers to the current iteration as well as current -20. Problem is, while the replace array subset lets me quickly update the buffer in a circular manner, when it comes time to read back the last 20 iterations, the need to handle the end of array aspect of the circular buffer requires that I use a for loop and essentially build
the array subset I need, which takes a fairly long period of time.
The other method I've looked at is faster in my testcase vi, and is done using insert and delete array subsets, where the first 20 rows is the subset I need for display, problem is, will this actually be faster when I use it in the actual program, since it makes heavier use of memory management than the prior design.
My question is, is there a way to use the replace array subset, and manage to wrap around the end array for the 20 item subset that I need that is faster than the method I've already designed?

I've attached my two testcase vi's. to give a better idea of what I am looking for.
Jon D
Certified LabVIEW Developer.
Download All
0 Kudos
Message 1 of 3
(2,935 Views)
Can you post your code in V6.0 format?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 3
(2,935 Views)
Certainly. Also, I made a mistake with the originals, Circbuf1 is the insert-delete method, not CircBuf2 and vice versa.
Jon D
Certified LabVIEW Developer.
Download All
0 Kudos
Message 3 of 3
(2,935 Views)