LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to display a binary file

Hello,

I am working on creating program that lets me display data I've collected and stored in a binary file. Here is the code (+pic of the program) for collecting and storing the data. Data will be recorded on multiple channels (possibly 4 channels). The program I've attached can display the data in real time as data is being collected. My issue is just to call back all the data and display it in a graph that shows all the data from all channels. I'm stuck on creating this display program. Any help would be greatly appreciated.

Thank you

Download All
0 Kudos
Message 1 of 17
(3,065 Views)

Can you write it to a TDMS file instead?

 

http://www.ni.com/white-paper/3727/en

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.
Message 2 of 17
(3,055 Views)

I would use the Stream to TDMS option for DAQmx.  If you go into the LabVIEW Example Finder and do a search for "TDMS Logging", you will see a few examples for DAQmx on how to set this up.  It is very easy to do and works great.  And then to view the data later, there is a TDMS Viewer VI in the File I/O->TDMS palette.


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 3 of 17
(3,048 Views)

Thank you very much to billko and crossrulz. Very useful information. TDMS format seems to be the best option since I will need to access the data I'm recording for analysis and review. However, I don't think the Labview I am using is up to date and may not have the TDMS palette. I believe I'm using Labview 7.1, which is really old. I'm going to try to get the new version, but if I cant and must work with a binary file, do you have any suggestion on how I could display that type of file on a graph? Thank you

0 Kudos
Message 4 of 17
(3,003 Views)

Bummer...  I guess it was introduced with 8.2?  I have to rethink this then.

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.
Message 5 of 17
(2,995 Views)

I believe so Bill. I'm still working to see if I can get a newer version of Labview to make it easier. I would still like to be able to work with the binary file to display the data. I was also thinking of saving the data into an ascii file, since I could use Excel or MatLab with such files. Not sure about size limitations with ascii files though, since there's going to be a lot of data recorded. Do you think this is plausible?

0 Kudos
Message 6 of 17
(2,965 Views)

The way that data is stored in disk in LabVIEW is documented.  Check out the waveform datatype in this help file.

 

I had a fairly indepth discussion about this with someone who wanted to use this to do a 'random access' read of the variant attributes of a waveform, without loading the whole thing.

 

It's fairly deep in the grass, but then again you are dealing with 1's and 0's Smiley Wink


Regards,

Peter D

Message 7 of 17
(2,953 Views)

The last post in the thread I mention has an Excel file with the binary makeup of a waveform.  It may be worth taking a look at that - or you could unbundle the components and log seperately, would make it a little easier to decompose.


Regards,

Peter D

Message 8 of 17
(2,944 Views)

Thank you Peter for replying back. I read about the waveform data type and I think I understand some of it, but it's still quite confusing to me. I understand the code for the datatype, but I'm unclear about how I can use that information to recall the data I'm recording for analysis. I'm still very new with Labview, so a lot of this is confusing for me. I'm sorry about that and I really appreciate everyone staying patient with me. I mentioned in an ealier post about saving to an ascii file. Do you think this could work?

0 Kudos
Message 9 of 17
(2,905 Views)

Have you tried breaking the data apart before writing to file? Iterate through the 1D waveform, iterate through the samples, etc. It might be slower, though.

Message 10 of 17
(2,896 Views)