 hotshot
		
			hotshot
		
		
		
		
		
		
		
		
	
			08-02-2010 10:05 AM
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!!
 Matthias_H
		
			Matthias_H
		
		
		
		
		
		
		
		
	
			08-02-2010 10:12 AM
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:
08-02-2010 11:41 AM
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!!
 RTSLVU
		
			RTSLVU
		
		
		
		
		
		
		
		
	
			08-02-2010 12:41 PM - edited 08-02-2010 12:41 PM
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
 GregFreeman
		
			GregFreeman
		
		
		 
		
		
		
		
		
	
			08-02-2010 12:54 PM
@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.
 Joseph_Loo
		
			Joseph_Loo
		
		
		
		
		
		
		
		
	
			08-02-2010 12:59 PM
Remember before Excel 2007 you are limitied to 65k rows. Excel 2007 is now limited to 1m rows.
 Matthias_H
		
			Matthias_H
		
		
		
		
		
		
		
		
	
			08-03-2010 03:01 AM
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".
 krivan
		
			krivan
		
		
		
		
		
		
		
		
	
			08-03-2010 03:44 AM
Hi,
have a look here:
http://forums.ni.com/t5/LabVIEW/Speed-up-data-transfer-from-Excel/m-p/1196045#M515443
Krivan
08-03-2010 06:29 AM
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!!