LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform to excel with shifting columns

Solved!
Go to solution

Hi,

Im using a USB-6212 to sample voltage variations with 100 kS/s and reading out the same amount per iteration in a while loop. I want to save all the data in an csv sheet with all the samples per iteration divided into single columns, so the line number in the sheet will equal the iteration number. As it is now the vi saves all 100k samples per iteration in one single cell with some wierd symbol to separate the data values (so im getting 1 x number of iterations instead of 100k x number of iterations in the sheet). I guess i need to implement some change column thingie between the samples and then save them but I havent figured it out yet. Anyone willing to provide some assistance with my issue? Many thanks in advance!

 

Best regards

Andreas 

0 Kudos
Message 1 of 9
(4,090 Views)
Here is what I think you are trying to do. I have a few warning if you decide to use this the way it is. The longer it runs the bigger the file and the longer it takes to write. It will eventually take longer to write the file than it take to take the data and the program will start missing data. You should use a consumer producer programming style. One loop takes the data the other writes the data to the file.
Tim
GHSP
0 Kudos
Message 2 of 9
(4,068 Views)

Nuclear, you will not be able to have 100K values in separated columns in Excel since the maximum number of columns possible in Excel is 256 (and the max number of rows is 65536).

 

Ben

0 Kudos
Message 3 of 9
(4,061 Views)
That is not true for Office 2007
Tim
GHSP
0 Kudos
Message 4 of 9
(4,056 Views)

Thanks, it's good to know. But still you will have to transpose or change the amount of data since the limits for Excel 2007 are 1,048,576 rows by 16,384 columns.

 

http://office.microsoft.com/en-us/excel/HP100738491033.aspx?pid=CH101030621033

 

Ben

0 Kudos
Message 5 of 9
(4,052 Views)

Thanks guys for the replies. Ouch I didnt know about the limited amount of rows and such in Excel. But really the csv sheet was just really the first thing that popped into my head. The layout was just to make it easy to see that the vi works. I can just as well write to a normal txt document with all the data just straight down. But then Im back with the problems with proper delimiters between samples I guess? And I would need a BIG delimiter between iterations so I can distinguish between iterations. I think I can deal with it if someone can tell me how to get rid of the wierd square symbol separating samples in the same iteration. Oh btw aeastet Im not on a LabVIEW computer right now so I havent checked your vi yet but thanks!

 

//Andreas

0 Kudos
Message 6 of 9
(4,024 Views)

Hi aestet,

could you please send the vi compatible with LV 8.5?

 

Regards

Andreas

0 Kudos
Message 7 of 9
(4,000 Views)
Solution
Accepted by topic author Nuclear
Here you go
Tim
GHSP
0 Kudos
Message 8 of 9
(3,989 Views)

Great, thanks!

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