02-18-2010 04:08 PM
Hi all!
Sorry if this has been up before but i could not find it.
I working on a .vi that should sample and log ~20 (let say) temperatures each 30 seconds, which means 120 x 24 x 20 = 57600 samples per day
.
Then i need to have a graphic presentation including time stamp of the samples/log for
* each day
* each week
* each months
* each year
The requirement is also to have the 'each day' graphic presentation in realtime.
My current plan is to store the samples in a "day array" with time stamp and present it via a Waveform grap where i include the timestamp.
Then each 24h (let say midnight) i store each array in a file.
My problem arises how to read all those 'day arrayes' from file and how to present it into weeks, months and years?
Any idea here or a better way to solve the 'problem' is very welcome!
cheers
02-18-2010 04:24 PM
Having done several long term tests with months and years worth of data my self I recomend.
Save your data directly to a spreadsheet file with a timestamp for eash data "scan".
Create a new file every day
Use Excel or your favorite spreadsheet program for data analysis and presentation.
02-19-2010 04:14 AM - edited 02-19-2010 04:15 AM
Hi RTSLVU and thanks!
Well i was 'afraid' that you would suggest to use an external spreadsheet as a viewer.
I was hoping to only use LW displaying the data as well since i do not need to do much data processing and would like to stick to one programming interface (i.e. LW).
But i'm stumbling how to read all those 'day arrays' from multiple files.
02-22-2010 03:17 AM
Hi Izze2000
Like RTSLVU I would recommend writing the data to file as you go along and creating a new file each day. This way you don't loose the data if something goes wrong and you need to keep less data in memory.
I'm not sure what you mean by "Each Day", is that the data from the last 24h? If so you can use display the data in a graph as it is acquired in parallell with writing it to file. As for the analysis you can always read a file back again when you start a new one and do the analysis you need then instead of keeping the data in memory the whole time.
Best Regards
David
NISW
02-22-2010 11:50 AM - edited 02-22-2010 11:54 AM
Hi David and thanks!
Yes that is exactly what I'm doing right now.
My .vi is measuring the temperatures and I'm writing them tab separated to 24h files called:
.
.
Temperatures_Sunday_February_21_2010.txt
Temperatures_Monday_February_22_2010.txt
.
.
Currently my biggest headache is to make a vi that can read let say the last month all ~30 24h dumps and aggregate all readings into a plot.
I believe it should be easy, but for some reason all my attempts gets pretty messy.
Any input here is welcome!
Cheers
02-22-2010 11:54 AM - edited 02-22-2010 11:55 AM
Show us your code...
But in general you should be using the write to spreadsheet vi to save your data, either as a CSV or standard (TAB delimited) .xls file
Then you can use read from spreadsheet to read the saved files back into a vi to aggregate the readings into a plot since the readfrom spreadcheet vi outputs an 2D array
02-22-2010 12:11 PM
02-28-2010 02:28 PM
RTSLVU and Dennis Thanks!
RTSLVU ok i followed your advice and now use the spreadsheet vi as you mentioned, looks good!
Dennis, you are most pobably right that a database is the best thing here. Unfortunately for this project i do not have time to look into database (i have never worked with it), but if i do a similar project in the future i would be interested to look more into it.
Do you or anyone else have more info where i can find a 'database for dummies'?
cheers