LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Binary Data

I have written some C programs for signal processing. I need to adapt
these programs to accept binary data acquired by a colleague using
Labview.

The colleague mentions that the data is a 2-D array with a time column
and an amplitude column. Furthermore, the the data is stored in 64-bit
IEEE double precision format.

Can anyone tell me how to read this data format into a C program?

Thank you.

Sincerely, Tom Irvine
tomirvine@aol.com


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 1 of 3
(4,767 Views)
> I have written some C programs for signal processing. I need to adapt
> these programs to accept binary data acquired by a colleague using
> Labview.
>
> The colleague mentions that the data is a 2-D array with a time column
> and an amplitude column. Furthermore, the the data is stored in 64-bit
> IEEE double precision format.
>
> Can anyone tell me how to read this data format into a C program?
>

I'm assuming that this is for the PC. In that case, the main, and
pretty much the only stumbling block will be the fact that LV saves
binary data as big endian rather than little endian. The rest of the
data formats are described in the CIN reference manual or the Code
Interface Reference Manual, something like that.

Basically, the data in the file will be interlea
ved, and at the
beginning of the file there will be some int32's that describe the
dimension sizes, Nx2.

If you can open the file with a hex editor, you can figure it out
real quick.

Greg McKaskle
0 Kudos
Message 2 of 3
(4,766 Views)
In article <823irg$inb$1@nnrp1.deja.com>,
tomirvine@aol.com wrote:
> I have written some C programs for signal processing. I need to adapt
> these programs to accept binary data acquired by a colleague using
> Labview.
>
> The colleague mentions that the data is a 2-D array with a time column
> and an amplitude column. Furthermore, the the data is stored in
64-bit
> IEEE double precision format.
>
> Can anyone tell me how to read this data format into a C program?
>
> Thank you.
>

you could read your data and convert them into the standard 2D array.
The 2D array can be as a input of your CIN.

Of course you need to know the saving format of your partener's file.
Then, if I were you, I would just simply use the I/O function in Labview
--open, read, close..plu
s a while loop to index your read data to a 2D
array... the loop will end by the EOF. Note that you need to "read"
your data is dbl-precision by specifying the "data stream type"
parameter as double-precision data. (Simply right-click the "data stream
type" input and click the "creat constant" in the pop-up menu).

It's simple and neat. I've done several this kind of work..even some
with complex data structure.

Luck,

-
G. Chen
Ph.D. Candidate
Ohio Univeristy, Athens, OH
Nothing can dim the light which shines from within.
--


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 3 of 3
(4,765 Views)