LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Binary File to ASCI File

smercurio_fc,

Your absolutely correct, I'll take a closer look at your response and get a better understanding of your .vi.

Thanks a bunch!

joe

0 Kudos
Message 11 of 14
(822 Views)

smercurio_fc,

The problem I'm seeing is that if the source data is for example:

0x11111111 

0x2

and if I use Labiew to read the binary file and save it to asci, what I get is

0x11111120

0x20000000

 

I use Borland to create the binary file and also use it to verify the binary file and it works, but some how my labview program is not reading the binary file correctly. I do have a Labview program that samples 32-bits from a daq card and writes it to a binary file. Now when I used borland c++ to convert it to asci it works, but not in Labview. I don't understand, the source data is a 32-bit word. Any ideas?

 

joe

0 Kudos
Message 12 of 14
(820 Views)

smercurio_fc,

Hi, I'm learning more, if I change the binary source data to be

0x12345678

0x25

Labview will convert that to

0x78563400

0x25000000

Looks like I have some bytes swapped. I'll keep working on it and hopefully I'll get it.

thanks,

joe

0 Kudos
Message 13 of 14
(818 Views)
What you are seeing is the standard big-endian vs little-endian way that values are written to disk. This is something that you just have to deal with - there's no easy fix for it unless everybody in the whole wide world agrees to use one standard, and that's not going to happen.
0 Kudos
Message 14 of 14
(800 Views)