07-06-2012 10:14 AM
Something a bit strange going on when I attempt to write data to a binary file. I've replicated the issue in StrangeBinaryFileBehaviour.vi which is attached below...
I'm merely writing two bytes to a binary file yet my hex editor/viewer is telling me I have 6 bytes of data, a screenie of the hex editor dump of the binary file is also attached
Maybe I'm losing the plot and am missing something, forgive it's late on a friday
Strokes
Solved! Go to Solution.
07-06-2012 10:17 AM - edited 07-06-2012 10:19 AM
Wire a FALSE to the "prepend array or string size ...?" terminal. The default is TRUE so you get additional bytes, depending on what you wire.
For a 1D array, you would get 4 additional bytes for the array size (I32) and tha's what you are seeing.
07-06-2012 10:27 AM
@altenbach wrote:
Wire a FALSE to the "prepend array or string size ...?" terminal. The default is TRUE so you get additional bytes, depending on what you wire.
For a 1D array, you would get 4 additional bytes for the array size (I32) and tha's what you are seeing.
I can't tell you how many times that has bit me in the arse. I understand why the default it TRUE, but I have yet to run into a case where I actually wanted it to be TRUE.