LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File I/O question

I need to have several versions of file storage for a very long term
test I'll be performing. The reqirement is this. Just for an example.
I'm storing numbers in a spread sheet format once a minute. I'm
looking for a way to update a file to include just the last 60 minutes
of data. So any time I acess the file I know I'm only getting info
from the last 60 minutes regardless of when I acess the file. I guess
this is sort of a FIFO application. Once there is 60 minutes of data
the oldest data gets erased and the newest written. How can Labview
perform this operation.

I'll also want to expand this to possibly a days worth or a weeks
worth.

Any ideas

THANK YOU
0 Kudos
Message 1 of 5
(3,054 Views)
Inside your application, I would store the last 60 samples in a memory-vi (a vi with an un-initialised shift register). This concept is explained in other answers relating similar questions.
I would then re-write the log-file every minute.
The logfile is just a spreadsheet write of the memory-vi data.
Use the same name, but make a copy just in case the computer crashes if you are in between deleting and writing the new file.
0 Kudos
Message 2 of 5
(3,054 Views)
You could save the data along with a timestamp in a simple text file.There is no need to erase some data.
Then you could write a vi that reads the file, pick a time interval(year, month,days, weeks, hrs,sec etc..) and dispaly the results.

good luck

guindon_jp@hotmail.com
0 Kudos
Message 3 of 5
(3,054 Views)
JPG wrote in message news:<506500000005000000CE6D0000-1017707437000@exchange.ni.com>...
> You could save the data along with a timestamp in a simple text
> file.There is no need to erase some data.
> Then you could write a vi that reads the file, pick a time
> interval(year, month,days, weeks, hrs,sec etc..) and dispaly the
> results.
>
> good luck
>
> guindon_jp@hotmail.com

I really need to be able to get to the data in blocks..It's important
to be able to go to a file or files and know it is current data so
analysis can be done. I plan on storing all my data in text files with
time stamps and headers. But as I said i need to have the ability to
grab the last days or weeks or months worth anytime necessary, or have
files that store data i
n those amounts but always be up to date
0 Kudos
Message 4 of 5
(3,054 Views)
Are you familiar with the time functions of Labview?
They are located in the time and dialog palette under the main function palette. You can use those when saving your data to a file. They can also be used when reading back the data to fit your requirements.

guindon_jp@hotmail.com
0 Kudos
Message 5 of 5
(3,054 Views)