LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 74 in unflatten to string

Hi,
 
The attached VI opens a file in read\write mode. If the file doesnt exist it creates a file. The next time when the vi is run the created file is read. If the file already exists then it only reads the file. The data is a cluster which is converted to binary using flatten to string function and then written to the file using write binary file function. When I read back the file, I get the error 74.
 
My observation :  The flatten to string output is different from what it is written to the file. Some special character is added to the starting of the file.
 
But i dont face any problem when i replace the read binary file or write binary file with the read text file and write text file respectively.
 
Regards
Gopal
0 Kudos
Message 1 of 2
(6,209 Views)
The "Write to Binary File" VI has an input "prepend array or string size". Wire a False to this input and your VI will work as expected.

Side note: You seem to be relying on the "Automatic Error Handling" in LabVIEW. I would recommend not doing this, and following the convention of having an error in/error out cluster for VIs. In your VI any error that gets generated is not being passed out.
Message 2 of 2
(6,196 Views)