LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unwanted data at EOF after a binary write.

Hi,
I need to write a binary file, which must be identical to a binary file created by another program.
 
I start by Open/Create/Replace File, with "write only" and "replace or create" set.
Then I run a loop with "Write to Binary File", w/ big endian order, "prepend array or string size == F", file data given as refnum.
In the end I close the file.
 
The problem is that at the end of the file I have a bit of data (9 bytes) that are not supposed to be there.
I am assuming these bytes are placed there by LabVIEW, in the same way leaving "prepend array or string size" to the default T will give some data at the start of the file.
 
Is this the case - and how can I get rid of this data?
0 Kudos
Message 1 of 3
(2,541 Views)
I don't think it is placed there by the open close routine, what are those bytes?
And how do you write your value (screenshot of the code?)

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 3
(2,536 Views)
Hi Rod,

how do you supply the data to write? Do you really do this by refnum?
If so, you maybe use some 'flatten to string' mechanism and thus prepending some bytes (type description)!

Please provide some source code, it's much easier then to give advice...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(2,529 Views)