LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array problems

hi

i have a data array coming out from my system which is running an infinite loop
anybody know how to get the latest n samples and store it in another array?
the array has to be n sample long
0 Kudos
Message 1 of 2
(2,479 Views)
If i got your question correct,i guess, you need to construct a circular buffer. This can be done using array functions. You can think of circular buffer as an array which stores a fixed number of data points(latest n samples). It works on principle of FIFO. Elements are added from the top of array and when the size is achieved, the first element that was added gets removed from the bottom of buffer. So you need to write a logic to acomplish this. Unfortunately at present i do not have an example handy. I hope you will be able to construct it yourself.

All the Best !
0 Kudos
Message 2 of 2
(2,471 Views)