LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing matrix's additional info in binary file

Hi all,

My binary file containts raw data from the inputs of the acquisition system.
But before all that, I am trying to write some specific information organized in a matrix. I normally build the array and just write it to the binary file.
When I see the information in the file, after I convert the bin file to text, the data is in desorder due to the fact that the matrix came with data about the number of rows(R) and columns(C) besides its content.
Instead of having
R C
A11 A12
A21 A22
D11 D12 D13
D21 D22 D23
.....

I have
R C A11
A12 A21 A22
D11 D12 D13
...
or even worse when the matrix data(A) or the acquired data (D) are more numerous.

I tried to insert the CR+LF character but this spoils worse the aspect and values in the text file.
Is it me that doesn't write correctly the binary file ( I use a slightly modified version of the ContAcq&Graph Voltage) or is it the conversion (done by the example Saved Graph acquired data.VI) that provides this sort of arrangement?
Do you know how could I solve this issue?

Thank you very much,
Dana
0 Kudos
Message 1 of 4
(2,945 Views)
I recommend posting whatever code you have.
 
You mention "matrix".  Are you talking about the matrix construct present under the arrays and matrices pallette?  Do you mean an array?  Is this some general term you are using to describe how you put together your data?  How are you building these things into the file?
 
Could it be that you have selected prepend array or string size in the Write to Binary file (the default is true) and you are not accounting for that when you read it back in and convert to text?
0 Kudos
Message 2 of 4
(2,934 Views)
Hi, i am from NI Support Team, and I would also suggest you to post your example code, so
we have the chance to understand your questions better.

Marco Brauner NIG
0 Kudos
Message 3 of 4
(2,891 Views)
Hi Ravens Fan,

I solved the problem; as you said , I should have disable the ' prepend array or string size' property in the Write to Binary file .
Thank you  a lot.
Dana
0 Kudos
Message 4 of 4
(2,870 Views)