LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing continous data into Excel

I am very new to LabVIEW. I am using LabVIEW 9.0 to get voltages from a DAQ system. I need to store the raw data in an excel file. I can only get the first second of data into excel. Granted that I am reading 10,000 samples a second, I should be able to store more. I need help creating some kind of code to help me do this. I have tried everything from a producer/consumer loop to messing around with for and while loops. Worst comes to worst I can average the voltages out over a couple of milliseconds and store that data in Excel.

 

Another issue I am having is with graphing in Excel. Is there a way I can export a graph directly from LabVIEW to Excel without using the Excel functions?

 

I am attaching my entire code (I know it is poorly written, but it does the job). Any help would be appreciated. Thank you!!

0 Kudos
Message 1 of 9
(3,456 Views)

Hello

 

"Another issue I am having is with graphing in Excel. Is there a way I can export a graph directly from LabVIEW to Excel without using the Excel functions?"

 

I insert frontpanel graphs directly this way:

 

20435i1B87D87B9DF24CDC

Message 2 of 9
(3,449 Views)

Hey Matthias,

 

How did  you get that to be your ctrl reference? I cannot find the graphs that are on my front panel as a constant..... in other words, what constant did you choose?  Thanks for the quick response!!

0 Kudos
Message 3 of 9
(3,435 Views)

An "excel file" can be as simple as a tab delimited text file with a .xls extension.

 

You can simply dump your raw readings to a file using the 'write to spreadsheet file' vi

 

Since you are taking so many measurement so fast you might want to create an array and use it as a buffer.

 

Then dump the array to a file at regular intervals to prevent the file I/O from slowing down your measurement

========================
=== Engineer Ambiguously ===
========================
Message 4 of 9
(3,423 Views)

@RTSLVU wrote:

 

Since you are taking so many measurement so fast you might want to create an array and use it as a buffer.

 

Then dump the array to a file at regular intervals to prevent the file I/O from slowing down your measurement


Along the same lines, you can also use a queue to queue up data as your I/O gets it and do all your data logging in a separate thread (while loop) by dequeuing the data there. That way any logging is completely separate from the aquisition.

Message 5 of 9
(3,415 Views)

Remember before Excel 2007 you are limitied to 65k rows. Excel 2007 is now limited to 1m rows.

Message 6 of 9
(3,407 Views)

Hello

 

"How did  you get that to be your ctrl reference?"

 

Right click on your frontpanel graph/chart you want to intert and chose "Create - Reference".

Message 7 of 9
(3,377 Views)
0 Kudos
Message 8 of 9
(3,370 Views)

I have been trying to create a enqueue / dequeue loop. This is as good as I can get it. I have looked at many examples, but I cannot figure it out. Can someone help me out? I just am taking two sets of data from  DAQ and storing them into Excel...seemed simple enough at the beggining, but now I cannot figure it out.

 

I am attaching my entire code. The queue loops are on the bottom of the code. One of my bigger problems is figuring out the conditions to stop the while loop.

 

Thank you guys for all your help! I really appreciate it!!

0 Kudos
Message 9 of 9
(3,365 Views)