LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read binary file in LabVIEW 2012

Hi,

 

Have anyoune experienced problems reading binary files in 2012 previously saved in 2010.

As shown on attached image, the same VI is opened in 2010 and 2012 reading the same binary file containing the data structure "ProcessList IN".

 

I suspect it has something to do with the variants ?

 

The error message does help a lot (-;

 

Any ideas ?

 

Kind regards

Kahr

Regards Kahr
Certified LabVIEW Architect
CIM A/S
0 Kudos
Message 1 of 5
(3,231 Views)

Hi Kahr,

Is it possible the error message is useful - that there's actually a path (input) problem?  The path shown doesn't look complete - is there a drive-letter hidden somewhere on the left-end of the path?  If some of the path is hidden, maybe you can resize the path control so the whole path is visible.

 

Cheers.

0 Kudos
Message 2 of 5
(3,163 Views)

Hi

 

If I look at the error message the path does seem right.

 

How does it work if you add in the 

 

Open/Create/Replace File and Close file function around your read binary file function?

 

The error message as your are getting indicates that there is something wrong with the path as 550nm mentions. The reason why the errror message contains multiple error messages is due to an old format of the error messages, so when we had to merge these there were multiple modules using the error code 1, and that is why you also see something with GPIB. We could have removed this but in that case it would have breaked the compatability when upgrading an older application.

 

Br, Anders

0 Kudos
Message 3 of 5
(3,129 Views)

Hi Kahr,

 

"error 1" tells one of the input parameters is wrong: it's either the path or the cluster datatype! The error message only mentions a file path AS AN EXAMPLE!

 

You're using BinaryRead similar to those old Datalog file functions to read a cluster of several data. It has been know that datalog files get tricky when one is using a different LabVIEW version to read them due to changes of internal data representation. Maybe that's the point that hits you now?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(3,121 Views)

Presumably, these file are also generated in LabVIEW. Can you create a simple datafile using the two LabVIEW versions and do a binary comparison.

What kind of objects are in the array of clusters? Can you read it in the newer version if the file is also created in the newer version?

 

Can you attach a simple datafile and your VI?

0 Kudos
Message 5 of 5
(3,112 Views)