LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading binary double floats from an old data file

I am learning LV and I have been trying to write a routine to read and
display an old binary data file as a tutorial. The file was written in C in
a MS DOS program. I can get all the integer and string data from the header
but I am stuck with the double precision float values. The integers have to
be byte swapped (no problem) but the dfs are not cooperating. I tried
flattening them and rotating the string, etc. Converting from big-endian to
little-endian was easy in C but I can't seem to come up with a LV way.
Any suggestions.

Thanks
0 Kudos
Message 1 of 4
(2,582 Views)
"D. Wipf" wrote:

> I am learning LV and I have been trying to write a routine to read and
> display an old binary data file as a tutorial. The file was written in C in
> a MS DOS program. I can get all the integer and string data from the header
> but I am stuck with the double precision float values. The integers have to
> be byte swapped (no problem) but the dfs are not cooperating. I tried
> flattening them and rotating the string, etc. Converting from big-endian to
> little-endian was easy in C but I can't seem to come up with a LV way.
> Any suggestions.
>
> Thanks

I believe the procedure must also involve the "Swap Words" for Doubles.
Kevin Kent
0 Kudos
Message 2 of 4
(2,582 Views)
The following piece of code should do want you wwant:

[Image]

-Franz

D. Wipf schrieb:

> I am learning LV and I have been trying to write a routine to read and
> display an old binary data file as a tutorial. The file was written in C in
> a MS DOS program. I can get all the integer and string data from the header
> but I am stuck with the double precision float values. The integers have to
> be byte swapped (no problem) but the dfs are not cooperating. I tried
> flattening them and rotating the string, etc. Converting from big-endian to
> little-endian was easy in C but I can't seem to come up with a LV way.
> Any suggestions.
>
> Thanks
0 Kudos
Message 3 of 4
(2,582 Views)
Sorry, it should 'do what you want'..........
0 Kudos
Message 4 of 4
(2,582 Views)