LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Thoughts on saving data and reports...

I am interested in what the community feels is the best way (and is there a best way) to save test data and generate reports.

 

Generally my testing is slow, no high speed DAQ or streaming data to collect. It boils down to taking measurements and recording them under various conditions. Many tests take hours even days to complete.

 

I started doing LV back in the days when the computers we got for general R&D test use were often unreliable "hand-me-downs" from corporate. At the saime time we had a third party app for our data loggers that would lose everything if the computer crashed before you exported the data. So from my LV beginnings I have been taking measurements, building and formatting text strings with line breaks, tabs, and commas, then immediately writing the report line by line. Just in case the computer crashed I would at least have partial test data...

 

Fast forward to today computers are ubiquitous and more reliable (but we are still running Windows XP) My programs are more complex and i find my code gets ugly real quick building that text string as I go, specially when I have to add to or modify tests.

 

Lately I have been thinking it might be better to just store all the measurements in an array or cluster then format and write the "report" at the end.

 

But I still have that nagging voice in my head saying "what if the computer crashes...?"

 

I attached an example of what I am talking about. This is a small portion of a qualification test that takes about 48 hours to complete. You can see wht I mean about building and writing the report as I go. Fot this little section it sould be easy to write it all at the end, but again it is only a tiny part of a larger test.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 1 of 3
(1,976 Views)

I currently do this two different ways, each uses an array of clusters.  For relatively short tests that can be easily repeated, I wait until the test is complete to convert/write the data to the test record. (usually excel)  For longer tests ( up to 60 days ), I create a parallel process that converts/writes results at pre-determined milestones and/or times that are optimized for the particular test.  Note that some of the functionality from the OpenG Variant Configuration File VIs can be very useful when converting clusters of data to strings.

 

I am also experimenting with .TDMS files.  My next cRIO app will start a new .TDMS log file every x hours.  Will either use the excel plug-in from NI or write my own app to post process the data from the .TDMS file into an Excel report.  

0 Kudos
Message 2 of 3
(1,966 Views)

Hi RTSLVU, 

 

If you are thinking of rebuilding your code to a cleaner and more efficient format I too would suggest the TDMS format.  You can find out a ton of information about writing and reading from a TDMS file here.

 

Basically for your application you could create a TDMS reference at the beginning and append the data to it every so often so that you are continually backing up your data.  Try giving that a read through the link above and even opening up some of the TDMS examples under Help»Find Examples then browse to Fundamentals»File Input and Output and there should be several basic and advanced TDMS examples. 

 

 

Regional Account Manager
NI
0 Kudos
Message 3 of 3
(1,936 Views)