11-15-2008 07:20 AM
Hi
I have to store multiple waveforms output that is each 1D array to a single binary file. how do i do this.
i can store 1D array to binary file and retrieve it by reading the binary file and plotting the waveform. but i am not able to store 2D array to the single file. how do store many 1D array in one binary file,
Thank you. Hema
11-15-2008 09:18 AM
Hi Hema,
Are the 1D arrays that you have of different sizes or all with the same size? Depending on this, we could think of ways to accomplish the file saving.
A few things to keep in mind when retrieving data from a binary file is the original data type that was wired to the "Write to Binary File.vi"'s data input, and the representation of the data (i.e. I16, U16, etc.) of the data if it was numeric data.
Once I have an idea on the details of the 1D arrays, I would be able to help out.
Cheers!
Sanka
11-15-2008 09:55 AM
11-15-2008 11:01 AM - edited 11-15-2008 11:02 AM
(We would also need to know your LabVIEW version. If you have a very old version, things would be quite different.)
As Smercurio_fc already mentioned, the option to "prepend array size" would make things much easier here, because then you would read it as a single 2D array.
Here's how that would look like. This is probably the recommended solution, just for simplicity reasons.
Not prepending the size is more useful if you write the data in increments, but later want to read it as one.
11-16-2008 11:26 PM
Hema.
Is your query solved? Do let us know if you have further problems.
Gaurav
11-19-2008 03:11 AM
Hi ,
Thank you all for helping me out.
I was able to read the 2D data in the correct format. i am using LabVIEW 8.6 and i also used the reshape array function to read data.
Thanks. Hema