LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Long time logger and waveform graph

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

0 Kudos
Message 1 of 8
(3,124 Views)

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.

========================
=== Engineer Ambiguously ===
========================
Message 2 of 8
(3,118 Views)

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.

 

Message Edited by Izze2000 on 02-19-2010 04:15 AM
0 Kudos
Message 3 of 8
(3,097 Views)

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

0 Kudos
Message 4 of 8
(3,068 Views)

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  

Message Edited by Izze2000 on 02-22-2010 11:53 AM
Message Edited by Izze2000 on 02-22-2010 11:54 AM
0 Kudos
Message 5 of 8
(3,052 Views)

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

Message Edited by RTSLVU on 02-22-2010 09:55 AM
Message Edited by RTSLVU on 02-22-2010 09:55 AM
========================
=== Engineer Ambiguously ===
========================
Message 6 of 8
(3,047 Views)
Instead of a whole series of files, I think it would be much better to use a database. Even something as basic as Access would work better and you can easily do a query based on date/time.
Message 7 of 8
(3,042 Views)

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

0 Kudos
Message 8 of 8
(2,983 Views)