03-22-2006 01:00 PM
03-22-2006 01:21 PM
03-23-2006 08:44 AM
Hi pen,
With 2 channels at 200 KHz for 10 minutes I calculate: 2 * 200,000 * 60 * 10 = 240,000,000 samples. If each sample were stored as an unscaled I16, that would result in 480 MBytes on disk, which is roughly what you are used to. Certainly with large amounts of data like this saving unscaled integers makes sense. If you are using DAQmx, you have the option in your buffer read to request the raw integer values and stream those straight to disk, and you can get the scaling information from your DAQmx task and write those into the TDM header. An alternative approach is to request SGL data from DAQmx and stream the scaled data to disk-- this would result in a 960 MByte file for the same 10 minute run. You might also want to consider streaming each channel to a separate binary file.
But I hear from the AEs that you actually want to stream at these rates for several hours and you want to segment your binary files into separate time slice files, so that no one file gets too large. All of this is possible, but the fancier your requirements the more complicated the code will be which accomplishes that.
Please clarify exactly what you need to do, and we can help you with the LabVIEW code which will create dense binary files that load quickly in DIAdem. It would also be very useful to know what you want to do with the data in DIAdem afterwards-- always graph the whole run? Only graph a small time slice of the run? Apply data reduction to graph every 50th point for the whole run?
Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-23-2006 12:49 PM
Hi, Brad:
Thanks a lot!
What I want to do is to stream at 200k for several hours and save the data in a group of files. Each file is for about 10 mins to prevent large files. As you suggest, the data stored in each file should be unscaled I16, so each file will be about 480 MB.
After that, I will load each files to DIAdem, graph all of them, and try to locate the signal (each signal could be in the length of miliseconds) that I needed. Then I want to export only these signals into ASCII format so that I can draw pictures to present to other people.
Sometimes there will be serveral thousands interesting signals in 3 hours' data. So I want to use Labview to read all the files and pick up these signals out and save only these signals into one file and then perform ananlysing.
I am a graduate in Physics, really not an expert in software. Currently, I use "save to measurement file" function in the Labview, select TDM binary format, and get 800 MB file size in only 1 min. And It will take about the same time to open it in DIAdem. If I swith windows and come back to the graphs, it will take that time again to refresh it. It is not efficient.
Thanks again!
03-24-2006 12:29 PM
03-24-2006 08:10 PM
03-27-2006 10:23 AM
Hi pen,
Here's the code I have. In it you'll see how to read out the scaling information from the DAQmx task and also how to create a TDM header file for that binary file so that DIAdem can read it in. This application was designed to stream all the binary data to 1 interleaved file, so it is not exactly what you're looking for, but if you're willing to wade in and make edits you could morph it into what you want. I'd like to make the edits myself, as what you're doing will undoubtedly be something others are interested in also. However, I definitely can't get to it in the next few days and also can't give you a definite timeline as my in-box is very full now, so I thought I'd just shoot you the code I would have started with in case you want to use it in your efforts.
Note that DIAdem will load the resulting TDM file much faster if you can keep track of the maximum and minimum values for each channel and write the "minimum", "maximum", and "monotony" channel properties in the TDM header file (set "monotony" = "not monotone"). Even more important if you are using DIAdem 10 is to try using the "Register data..." loading option instead of loading all the data values into RAM. That way for huge data sets DIAdem will simply use the existing data file in-place as DIAdem-managed virtual memory.
Check out the TDM Header Writer VI application note at:
http://zone.ni.com/devzone/conceptd.nsf/webmain/117CB3D512ED96928625707B004DC4E9
And download the example code I would have started with at:
(look at the "\Examples\DAQmx Streaming.llb" file)
Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-28-2006 01:22 PM
03-29-2006 12:28 PM
07-12-2006 08:58 AM