LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to store data for 60 minutes

How do I store array data for 60 minutes and delete the first 1st data on 61st minute. This is a continous process but I need to have only last 60 mins data.I am using Labview Basic 6.0. If some one has a VI, kindly pass it on. This is my first VI.
0 Kudos
Message 1 of 2
(2,470 Views)
You need to use a while loop (to continue to take measurements) with shift registers, and an array (to store results). The shift registers on the loop are needed to update the array and other parameters from one loop iteration to the next. The basic idea is to replace one array element every time you want to store the data. The index of the array element to be replaced will be circular: it will start at 0, then increment until it reaches the last element you want to store, then revert back to 0.
Here's a simple example in LabView 6.0. For demo purposes, the Current Measurement is just a front panel control. In your real application, you'll have to replace the control in the loop with your measurement function. Make sure that you place the measurement fu
nction in the loop so a new measurement is made every time you want to record new data. If you place it outside the loop, you'll only take one reading and you'll always store the same value.
You could extend this example by replacing the simple Results array with a cluster array: include the Results and the time the Results were taken.
Message 2 of 2
(2,470 Views)