Jump to content

Reading a Binary File containing Cluster Data


Recommended Posts

Hi,

 

I created a Binary Data file that stores cluster data. It is a cluster of 3 element..

 

1. Unsigned byte - 8 bit integer

2. Double - 64bit real

3. Double - 64bit real

 

This cluster of 3 elemetes is actually represented in the form of a waveform graph w.r.t time which I saved as a Binary File...

(For the .dat file click here http://www.mediafire.com/?u4c1y9iho2b5qoe )

 

Now I want to read this binary file in labview and display it in the form of a graph.

 

I cannot post the VI for creating the binary file because It requires Control system, Fuzzy toolbox but here are the parameters I used

 

Byte Order - Little Endian

 

See the attachment for my try for reading the binary file... Please help me with the reading of the .dat file I linked above

 

If there is anything I have to tell, let me know

 

Thanks

read.vi

Link to comment

The "Data Type" terminal in the read defines what the data type out will be.  You wired a constant of a string with the value of 0.  This tells the read VI that the data in the file is a string.  You should wire your cluster to the data type terminal, then the output will be that cluster.

 

EDIT: Also if you wire a -1 to the count terminal it read the whole file.  When I ran you VI it gave an end of file error so they way you were calculating the remaining bytes was incorrect.

Edited by hooovahh
Link to comment
Yup.

What hoover said.

 

attachicon.gifread.vi

Sorry if this is off topic but this is the second time you have called me by my name (sorta) do I know you?  How do you know me by my name?  And not that it bothers me but could you please refer to me as "hooovahh" (or hoovah if you don't count the correct number of letters) other members may only know me by my alias and I think it was be easier if we referred to each other by our internet names.

Link to comment
Sorry if this is off topic but this is the second time you have called me by my name (sorta) do I know you?  How do you know me by my name?  And not that it bothers me but could you please refer to me as "hooovahh" (or hoovah if you don't count the correct number of letters) other members may only know me by my alias and I think it was be easier if we referred to each other by our internet names.

Nope. Don't know you or what your real name is (a hoover is a vacuum cleaner over here and in everyday usage). It was, and always will be a typo (apologies).

 

My handle, however, IS my real name. (I don't care how you spell it and even I get it wrong sometimes whilst typing. Luckily I rarely refer to myself in the third person ;) )

Edited by ShaunR
Link to comment
Nope. Don't know you or what your real name is (a hoover is a vacuum cleaner over here and in everyday usage). It was, and always will be a typo (apologies).

 

My handle, however, IS my real name. (I don't care how you spell it and even I get it wrong sometimes whilst typing. Luckily I rarely refer to myself in the third person ;) )

Oh my apologies.  A Hoover is a vacuum in the states as well.  However when I say my name is Hoover people some times ask "How do you spell that, like the vacuum?" I say "No like the president".

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.