Showing results for 
Search instead for 
Did you mean: 

Reading and writing 1-D cluster array (resolved)

EDIT:  In classic and eternal style, 10 minutes after posting the question, I believe I figured out that I just had some missing/incorrect VI flag settings.  Obviously the preceding several hours couldn't illuminate that. -_-

Hi all,


I tried to look around and see if this issue had been addressed.  I found some related threads but nothing has quite resolved it for me yet.

I am trying to write a 1-D array of 17-element clusters to a binary file, and then read it out again from a different subVI.  However, I am either getting error 74s, error 116s, or when it is "successfully" reading without crashing, it is given me gibberish in the output.  The only time it reads successfully is when I pass a "-1" to the Read from Binary File VI, and as I mentioned this results in gibberish.  I do not believe my code is so complicated, so I am wondering where the issue might be.

I've attached jpgs and the related VIs.  For the Control Panel VI where the load is, please don't worry about either the "Run Carbonate" or "Configure Settings" button - this is just something that remains from a different VI that I wrote that I am now adapting for this project.  I am at the moment only worried about the Save and Load functions.

I am writing this in LV 2012.

Many thanks!

0 Kudos
Message 1 of 2

You're flattening the array of clusters with "Prepend Array/String Size" set to True (the default value), which is good. Having this true allows LabVIEW to then unflatten the array of clusters properly.


However, in your read loop, you have "Data includes array or string size?" set to false. So it's flattening the array of clusters with some extra data saying how long the array and strings are, but it's reading it not expecting that extra data, which is causing it to read improperly.


Change the False constant in the "Load Carbonate Prep Settings" to True (or remove it, the default value is true). That's the only thing I changed and I can write/read settings files without any errors.


unflatten string.png

Message 2 of 2