LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to write to spreadsheet continously

I'm using DAQ Assistant to register input signals from a load cell. The load cell is sampled by 1 kHz, and I need to save all thoose samples to a spreadsheet file during operation. System usually operates for 0-60 min. Do I have to buffer all values in an array? or....
 
 
Need to save elapsed time, force and one calculated value.
 
 
...thought of using the "write to spreadsheet file.vi" ...

Message Edited by Johan.svensson on 07-13-2006 01:42 AM

0 Kudos
Message 1 of 6
(3,251 Views)

Hi

If you want to use the write to spreadsheet file vi, you have to build an array, which is probably not so good if you get up to 3'600'000 values.

Basically the write to spreasheet file vi just writes characterseparated values to a file. This you can do on your own. Open a file, convert the value aquired, write it and close the file.

 

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 6
(3,236 Views)
Well, I might be able to lower the requirements about sampling frequency...
 
I found that the express block "write to meassurement file" adds values to the file continuously. As I need..
But I want to make changes to the header in the resulting file... how to do?
0 Kudos
Message 3 of 6
(3,225 Views)
If you use the express vi, you just can change the options which are available in the configuration dialog. You could open its front panel and access the lower level vis, but in general you will have overhead.
 
The easiest, fastest and smallest solution is to do it on your own. Create a vi, that writes the correct header and then add data to the file. So you definitely know what's going on ;).
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 4 of 6
(3,221 Views)
Hi,
Here are to example programs where you can write to a text file. The example are doing the same thing exept that one is using DAQ Assistant where you buffer the values in an array and the other example is doing one point acqusition.
Regards,
Caroline Edenholm
Applications Engineer, National Instruments
Download All
0 Kudos
Message 5 of 6
(3,182 Views)
Hello, 
 
here is another solution to your problem. This VI writes to a binary file so the file will not be readable as a *.txt file. The advantage is that the writing to the file goes faster which means that you can have a higher sampling frequency.  I also attach a simple VI to read from the file.
 
Regards
Andreas E
Applications Engineer
National Instruments
Download All
0 Kudos
Message 6 of 6
(3,174 Views)