hatef Posted September 2, 2021 Report Share Posted September 2, 2021 Recently I find weird bug in LabVIEW . if you try to save a cluster with at least two string side it with using flatten to string vi for saving as a text file, it is ok and you can recall it with unflatten from string vi later, unless you fill at least one of the strings with 13 characters inside it, in this case, unflatten from string not work well and you could not recall data back?!! that is weird Quote Link to comment
Popular Post Francois Normandin Posted September 3, 2021 Popular Post Report Share Posted September 3, 2021 Right-Click on the "Read From Text File" method and unselect "Convert EOL". The number "13" (0xD or Carriage Return) gives it away. If you look at the HEX representation of what you save and what you read from file, you'll notice the 0xD gets converted to 0xA unless you uncheck that box. Tip: If you deal exclusively with HEX/binary data, you might want to save it using byte arrays instead. The result will be the same in your file, but you won't get bitten by hidden config parameters in your node... 3 Quote Link to comment
Popular Post JKSH Posted September 3, 2021 Popular Post Report Share Posted September 3, 2021 40 minutes ago, Francois Normandin said: Right-Click on the "Read From Text File" method and unselect "Convert EOL". Or even better: Replace "Write To Text file"/"Read From Text File" with "Write To Binary File"/"Read From Binary File". The output of "Flatten to String" is not text. (String != Text) 3 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.