LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How read data from *.LB File in LabVIEW?

Hi dear specialist,

 

How I can read data from  *.LB File in LabVIEW?

 

Thanks` Hovo

0 Kudos
Message 1 of 11
(3,678 Views)

What is an lb file? Post a specification and an example.

0 Kudos
Message 2 of 11
(3,662 Views)

*.LB File is kind off a binary file, for example`  myfile.bl , which keeps measurements data

0 Kudos
Message 3 of 11
(3,650 Views)

We can only help you to the extent you are willing to help us help you.

 

With that definition all I can say is open it as datalog file and read a byte at a time.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 11
(3,645 Views)

Corollary question: how would you read it in another programming language, like C? Answer: you have to know the format, since a generic binary file has no format other than the one you define. This would be true in LabVIEW as well, since it is also a programming language.

0 Kudos
Message 5 of 11
(3,631 Views)

Sorry about the 3-Knight lecture but we are just trying to help.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 11
(3,624 Views)

 

Thanks Ben, but when I open it as datalog file` comes following error:

 

Error 71 occurred at Open/Create/Replace Datalog in Simple Temp Datalog Reader.vi

 

Error 71 occurred at Open/Create/Replace Datalog in Simple Temp Datalog Reader.vi

 

Possible reason(s):

LabVIEW:  File datalog type conflict.

C:\Documents and Settings\Home\Desktop\a.lb

 

 

Here is an example of lb file (a.lb), and here is a VI for read datalog file(Simple Temp Datalog Reader.vi)

 

What means this error?

How I can read a byte at a time?

 

0 Kudos
Message 7 of 11
(3,621 Views)

 


@Hovo wrote:

 

What means this error?


 

It means exactly what it says: The format you are specifying for the records does not match the file format. Where did this file come from? Was it generated from a LabVIEW program? If so, you should be able to find the correct format by looking at the code that created the file. If the file was not generated by another LabVIEW program then you need to go back to the source to find out the *exact* file format. Otherwise it's pretty much just a guessing game to try to read it.

 

 


How I can read a byte at a time?


Unless you know the file format this isn't going to help you.

 

0 Kudos
Message 8 of 11
(3,614 Views)

It means you didn't tell the Read File function a datatype that matches what is saved in the file.  You assumed it is a cluster of 3 strings.  Why?

 

Open up the a.lb file in notepad and look at it.  It seems to have some basic header information.  Beyond that are bytes that all seem to be "binary".

 

Where did you get your file from?  Do they have any documentation of the format of the file?  There is no way any of us can guess what the file format is.

0 Kudos
Message 9 of 11
(3,610 Views)

I don't know datatype, but i know, that   *.lb  file content represents in 3 columns and many rows.

 

0 Kudos
Message 10 of 11
(3,577 Views)