LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading and writing binary files to arrays.

Hello raitexas,

 

Definitely take to heart what Ravens Fan has posted, and here is another piece of simple example code that may help point you in the right direction. Using Replace Array subset you can pick the index of the bits you want to flip, or use random number generator to pick a certain number of values to index randomly. The false constant then changes them to zero. If you have any questions, let me know.

 

Deb

 

National Instruments
Applications Engineer

 

 

 

 

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 11 of 13
(776 Views)

Hi Deb,

 

Thanks for providing the figure of the VI. However, I had some trouble with this approach. I read the binary file into an array of Booleans, and wrote the same array to another binary file. However, I find that, the output file is not the same as the input file. I tried with both big endian and little endian, but the problem still persists. Please let me know what you think about this.

 

Regards,

Debarati.

0 Kudos
Message 12 of 13
(736 Views)

Post your latest VI and an example data file so we can see what you are doing and try it for ourselves.

0 Kudos
Message 13 of 13
(727 Views)