LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read Binary file from other source?

Hello,

I have to analyze some data from other application in LabView. I can get this data in ASCII and transfer it to array (see my other post). Also I can get the same data in binary. So, after I convert ASCII to SGL and look at it,  I was surprized by the fact that my SGL array in LabView looks very similar to the Binary file from other application. Then maybe its better to try to work with binary… But the problem is this binary file is not compiltly the same SGL as I have in LabView. Let me explain. Every number in my SGL array is presented as 4 bytes (correct me if i'm wrong). So if you will look carefully you will note, that difference between my SGL and other binary file is this 4 bytes (underlined) reversed, but sequence is perfectly the same… please take a look and if you  have an idea, let me know,

Vadym

 

I have this binary from other application:

3E 8A 3D 71 41 2E E1 48 C1 8E 51 EC 40 E1 99 9A

 

 

And this is SGL array after transformation from ASCII file:

71 3D 8A 3E 48 E1 2E 41 EC 51 8E C1 9A 99 E1 40

 

So, maybe I can get it directly from binary, it’s looks the same sequence, I just  need to manage this small difference.

 

P.S Just to make it cleare i have same data in ASCII and Binary format. After I convert ASCII to SGL array, I found that it’s looks the same as binary… the idea to work directly with binary without ASCII to SGL array transformation step.

 

Vadym
0 Kudos
Message 1 of 3
(2,764 Views)
 

Hi Vadym

This looks like a Big Endian and Little Endian problem

Goto Labview Help and Enter "Flattened Data" and read that page to find out more .....

https://www.ni.com/docs/en-US/bundle/labview/page/flattened-data.html

Hope this helps you understand better.

David

Seem to be all thumbs today Smiley Very Happy

Message Edited by David Crawford on 01-20-2006 04:49 AM

0 Kudos
Message 2 of 3
(2,755 Views)
 
This mischief will be solved by understanding big endian little endian concept
 
Most of the W32 programs write data in little-endian format
 
look at this discussion where a similiar issue was discussed and answered
 
 
 
0 Kudos
Message 3 of 3
(2,749 Views)