LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading a Binary File containing Cluster Data

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

 

0 Kudos
Message 1 of 6
(3,599 Views)

Seems to me that if you tell it to be a string, it's going to be a string.  😉

 

Try hooking up the actual cluster as the data type.  (I just made a copy of the indicator and changed it to a control for a quick and dirty test.)

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 6
(3,594 Views)

Could you pls ellaborate billko... I followed labview example where the data out is double, I followed similar steps but in my VI its a string...Do I need to do some sort of unflattening etc ?

 

I'm not sure,if you could elaborate I would be very thankful..

0 Kudos
Message 3 of 6
(3,589 Views)

Sure thing.  Here's what I did:

 

Note that the control would probably be better as as a constant.  It was left as a control for clarity.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 6
(3,577 Views)

Thank you billko,

 

the attachment was in 2012, however I figured out how to work on the data type problem...

 

Here is another problem...When I display the graph the range is limited to the last 1000 points on the X-Axis, Where as I want the complete data to be read and displayed

(Starting from time (x) = 0 till last point of the x-axis)

 

Pls send the attachment file in LV2011

 

Thanks again 🙂

0 Kudos
Message 5 of 6
(3,559 Views)

Hi mega,

 

either switch autoscaling on - or use a real graph instead of a chart (with a history of 1000 points...)!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(3,548 Views)