LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add data in another column instead of appending to the end of the same column?

Hello,

I want to transfer the waveform data from my oscillope to PC, and write it to a file in LabView.

I'm using a for loop. On each iteraon the oscillope gets a new waveform, the PC should read the waveform data, and add it as another column in a file without changing the previous data in the file. My code is like the exemple "Write Excel FIle.vi"(as follows, sorry I can't find an English version right now) if you regard the simulated signal as an oscillope.  

However, in this way the data from the next iteration appends to the same column of the previous data, so I only get one column in my final file. How can I write the data in another column for each iteration? ( Finally I should have 10 columns in my file in this case)

Thanks a lot !

QQ截图20160331101905.png

 
0 Kudos
Message 1 of 3
(3,693 Views)

You can only add stuff in rows.  You can't add stuff by columns.  (The new "columns" are data that needs to be intermixed with existing data.

 

You can only read the entire file, append a new column to the array in memory, then write out the entire new file.

 

Search the forums.  This question has been asked dozens of times before.

0 Kudos
Message 2 of 3
(3,673 Views)

Sorry for bumping.

I encountered the same problem and found this thread appearing at the top of search results, then I figured out a simple solution that might be helpful for LabVIEW beginners like me in the future.

Moving the "Write to Measurement File" VI out of the loop should work.

0 Kudos
Message 3 of 3
(3,126 Views)