LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read binary file 10 bytes at a time

Solved!
Go to solution
Solution
Accepted by r_te

I took the liberty of fixing your VI.  Here are some notes.

  1. You don't have to set the file position before performing a read.  When you read data, the position increments on its own.
  2. There's no need to close the file just to open it up again.
  3. With the previous points in mind, after reading the record size, set the file position to the first record.  Then inside of the FOR loop, just read that data.

Saved in 9.0

 

NOTE:  It's not exactly complete.  It is reading all of the data 1 channel at a time.  Currently, the indicators will be overwritten with each new channel.  I'll leave how you want to handle that up to you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 11 of 15
(1,208 Views)

the y-scale doesn't look correct. They are supposed to be amplitudes in the range of 0-5v.

If I get the dll for this, would it help? would it be easier to fetch the data in labview?

0 Kudos
Message 12 of 15
(1,200 Views)

Your problem is likely an Endianess issue.  There should be an input on the Read From Binary File to edit this.  Play with the different settings until you get something that makes sense.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 15
(1,185 Views)

tried doing that.. no effect

0 Kudos
Message 14 of 15
(1,177 Views)

I changed the representation to U8 Smiley Happy

0 Kudos
Message 15 of 15
(1,166 Views)