LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to use WriteFile+ to append a header to a file

I'me having quite a time with what I thought would be a simple operation. I'm logging data on 3 channels and saving to a file every time through a loop. When I am done, I want to add some header information to the top of the file (number of rows, columns, sample rate)...

To do this, I start by writing a dummy array in a new file, then begin logging... I'm using the Write File+ [Sgl].vi to do my writing. At the end, I exit the loop and write the array again at the top with the actual values.

The problem is that it somehow rotates the array when it saves it. I want the header values in rows in the firswt column, then the data are in 4 columns for as many rows as necessary below that... instead, the WriteFile.v
i puts my header in the first row... since I have more header cells than data columns, it drops some... I've watched what actually gets passed to Write File, and it looks exactly right, but when I go to read it back, it has saved the data in one row.

Any suggestions?

Thanks in advance...
mike
0 Kudos
Message 1 of 2
(2,425 Views)
well I can only guess since you did not post your vi. If you are taking an array and putting it into the write file and it is putting it all on one line the that means it has no delimiter, you need to run it through a vi called array to spreadsheet string.vi try this and see if it solves your problem. If it does not then post some code in version 7.0 and I will look at it and figure out what is going on.


Joe



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 2 of 2
(2,425 Views)