02-19-2009 10:06 AM
My requirement looks simple. I need to acquire data from 8 analog channels and store in a flat file. I need to acquire data every 5 ms and store the same. This has to go for 10 to 30 days. This is huge data. Latter, I need to retrieve the data based on the date and time specified by the user. The user wants the report with data shown for every 5 ms interval in the specified date / time range. I tried creating a tdms file, i converted the timestamp to string and stored as a column. But though the conversion and the array (using probe) shows the time stamp to the millisecond, the data is stored on intervals of 15 ms. Though there is no data loss in the storage, the TS is not actual. It is happening in the following way
TS Value
10:15:01:100 1
10:15:01:100 2
10:15:01:100 3
.............................
10:15:01:116 15 so on.
Where can the problem be? Can we not store realtime time (to the milisecond) in tdms.
02-19-2009 02:22 PM
First:
Your title mention TDMS, your post mentions flat file, what is it you need?
In case of TDMS it's quite easy, read the data from the DAQ device in a waveform at 200 Hz, store the data into the TDMS file with a duration of 1 hour or something.
You can get the Starttime and samplerate from each channel in a TDMS file quite easy so that shouldn't be a problem.
There is no need to jump through loops (or strings) to store time info in a TDMS file.
The fact you see a 15 ms jump is OS based, the timestamp (as returned by 'Get Current Time') is retrieved from the OS clock which runs at approx. 60 Hz (or 16 ms.)
Ton
02-19-2009 10:09 PM
Thanks sir. Thanks a ton
We did a test by taking timestamp into an array and found that as mentioned. Now one more query ! I am planning to PCI 6254 (DAQ card from NI) to acquire 12 analog channels and 1 High speed count function. Will this suit your aforementioned 200 Hz waveform requirement. As I said earlier, i need data every 5 ms.
Thanks
02-20-2009 01:40 AM
That should work, only for the counter function you will need a seperate task.
The counter task should use the sample clock from the analog input.
In the LabVIEW examples there are some examples to share the clock.
Ton