LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I store the previous data elements in labview

Hello,

    

    I am using PXI1042Q chassis with 8106 microcontroller and PXI 6289 DAQ cards. I am implementing a real time system where we acquire data point-by-point.  I would like to know if there is any way that I can store previous 500 sample points. I know that shift registers can be used to store values from previous cycles. It seems impractical to insert 500 shift registers in to system. Is there any way to store the previous 500 samples?

 

Thanks,

kartik 

0 Kudos
Message 1 of 4
(2,791 Views)

Well, you would use an array in a shift register and append your data using "built array".

 

For better memory performance, you would use a fixed size=500 array and replace the oldest element with the newest at each iteration. Keep track of the current element index with another shift regsiter.

 

Or wrap it all into an action engine. 😄

0 Kudos
Message 2 of 4
(2,787 Views)
A shift register may contain all labview datatypes. Not just numeric. So you can have a 1 shif tregister containing 500 data points.


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 4
(2,786 Views)

altenbach wrote:

For better memory performance, you would use a fixed size=500 array and replace the oldest element with the newest at each iteration. Keep track of the current element index with another shift regsiter.


Here is an old example tha keeps the last 10 values in a size=10 shift register and calculates the mean.

 

Modify as needed.

 

Information about action engines can be found here.

 

There is also the "collector express VI". Since it uses dynamic data, it's probably more demanding on resources.

Message 4 of 4
(2,779 Views)