LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 116 at Unflatten from string.....

Hi I want to save and load the control values of the tab pages I am getting the following error

"Error 116 occurred at Unflatten From String     

      Unflatten or byte stream read operation failed due to corrupt, unexpected, or truncated data."

  the attached is the VI can anyone tell me what is wrong ….thank you
0 Kudos
Message 1 of 4
(4,324 Views)
The data is converted in a text write function, use binary read and writes instead and make sure you wire False to the prepend array size terminal.
Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 2 of 4
(4,317 Views)

All that you need to do is right-click on the Read from Text File and Write to Text File functions and uncheck "Convert EOL".

 

Other comments:

  • You should not hard-code the path inside the VI. Either place a front panel control to specify the path (perhaps with a default value set), or generate the path so that it is relative to the VI (such as being in the same directory as the VI).
  • You are not wiring all your errors through so some errors can be lost.
  • You do not need to have the VI open a reference to itself. If you delete the Open VI Reference function the code will still work.
Message 3 of 4
(4,307 Views)
Ah! So that's where that option was hiding!
I knew it had to be there somewhere but I couldn't see it.
Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 4 of 4
(4,298 Views)