01-09-2012 03:24 AM
I am trying to read a binary data as flattened. The file was saved as labview class that contained Array of waveforms and some other data. When I read the file with Read from binary file vi with class attached to data type, data is correct. But when I read data as flattened something strange happened (see attached image). The top two graphs shows correct data and the bottom two graphs shows partially correct data. When writing a code to read flattened data I followed instruction on http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/how_labview_stores_data_in_memory/ and http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/flattened_data/.
The most strange think is that there is discrepancy around 1,4 s (marked with red), but samples before and after match.
I have no idea what am I doing wrong.
I have LV2011.
Application is also attached.
Solved! Go to Solution.
01-09-2012 06:15 AM
Assuming that you your decoding of the binary data is correct (i.e. that you have the data structure of the serialized class figured out) the problem is probably that you are not reading it as binary data, you are reading it as text using the read text file function....Change the file read fucntion to the binary one.
01-09-2012 06:51 AM
Thank you very much!
01-09-2012 07:07 AM
Good catch! You have very accurate eyes
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus