Solved! Go to Solution.
Currently I can set the amount of time the data is collected to 30 mins or any other method based on the sample rate and using a loop count function on the for loop. I need to collect data every 20 secs so this seems to work nicely. As for the while loop I was thinking of that, however I am not sure how I'd be able to pull out just the last 30 mins worth of data at any point throughout the test.
You might want to look at the Data Queue PtByPt.vi.
I'll check out that VI here soon thanks! As for the shift registar idea I understand how that would save the data however I am not sure that would fix the problem of giving me the last 30 mins when I press a generate report comand. I almost think I would need to have a continual running array getting data at a sample rate x/min and be able to call on the last x amount of data. Im just not sure if that is possible in LabView.
I am able to get a report every 30 mins if I want to, but the user would be constricted to that chunk of data, and if they wanted to stop a test at lets say 45 mins they would only get data from 30-45 min istead of 15-45 min range
I almost think I would need to have a continual running array getting data at a sample rate x/min and be able to call on the last x amount of data. I'm just not sure if that is possible in LabView.
That you can do with a simple Delete From Array. Just wire in the number of samples into the Length input and you will get the last X samples out of the deleted section output.
Of course, doing it this way (continuously growing array) could lead to the unnecessary usage of a lot of memory.
How fast are you collecting data?
Can't you just set an array to the size of the amount of data points you want and then let it fill up. Then, whenever you want the data you can just pull the data from the array and it will be the last 30 minutes worth of data.