03-30-2016 09:27 PM
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 !
03-30-2016 10:36 PM
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.
07-06-2017 10:50 AM
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.