LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

generating reports?

Hi,
I'am building a system that uses Strain guages to meassure a force continuously during a period of 1 hour at the most. The front panel layout is finished and so is the signal processing. I use the DAQmx to collect samples with a sample frequency of 100 Hz, samples to read:10. Values are then presented on the front panel.
 
My problem:
When I push a button in front panel the program should start to save every sample together with elapsed time date a few other computed values, to a file that can be opened as spreadsheet. I also want to generate a header that stores a couple of "environmental properties".
 
To do this I've tried all sorts of text/spreadsheet file tools... but never got it to do just as I like.
 
So here's my question: Does anyone have a great example that solves my problem... I'd be really happy to look at VI's that does something like this or something close... or just reporting in general.
 
Thanks..
/ Johan
0 Kudos
Message 1 of 6
(2,556 Views)
Instead of someone posting some generic example, why don't you post and example of exactly how you want the file to look like. Using Write to File for the header and Write to Spreadsheet File for the data is done all of the time so it would help to see what you've done so far and what you need to change.
0 Kudos
Message 2 of 6
(2,536 Views)

Hello!

 

Good point by Dennis, it is way easier for all of us to provide answers and present ideas when we can actually see how the application looks like or in this case how the final file should look like.

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 3 of 6
(2,511 Views)

Ok, good point...

Here is an example of how I want the report to look. (opened in MS excel or another spreadsheet reading program)

So far I've been able to generate the header, by constructing a string that I send to "write to text file". My plan is to use the "write to text file" during operation. But from what I understand I need to buffer all samples in an array that afterwards is transformed using "Array to spreadsheet string", before sent to "write to text file" ???

Am I on the ringt way? If so... how do I buffer in an array?

 

 

0 Kudos
Message 4 of 6
(2,490 Views)

Hello,

Here is a small exemple program that might help you. You can enter the text for the header in the front panel and you get two columns in the created file. The first one is the time (s) and the second the measured analog value. Ýou can of course do changes depending on how you want the file to look like.

Regards,
Caroline Edenholm
Applications Engineer, National Instruments
0 Kudos
Message 5 of 6
(2,458 Views)

Thanks Caroline,

Your example was very helpful.

0 Kudos
Message 6 of 6
(2,429 Views)