04-16-2013 10:10 AM
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
04-16-2013 10:22 AM
Can you write it to a TDMS file instead?
http://www.ni.com/white-paper/3727/en
04-16-2013 10:32 AM
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.
04-18-2013 10:55 AM
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
04-18-2013 11:55 AM
Bummer... I guess it was introduced with 8.2? I have to rethink this then.
04-19-2013 09:52 AM
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?
04-19-2013 10:45 AM
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
04-19-2013 11:12 AM
04-24-2013 03:49 PM
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?
04-24-2013 05:12 PM
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.