08-29-2008 05:43 AM
In my application I am acquiring a number of analogue inputs from multiple boards that I am synchronizing over the RTSI bus. The acquisition is started by a software trigger and carries on for up to two hours until stopped by the user via the software. Data is acquired at a constant frequency using the card’s onboard clock.
I need to accurately timestamp my data as the PC on which it is running is using a timecode signal used to maintain consistent time information between several systems. My questions are:
It may turn out that this is actually quite a trivial problem if the answers to 1. and 2. above are ‘yes’. I am just a little wary, after reading about the time information created for the waveform type, that there might be more to it.
Thanks for any help.
CAS09-09-2008 03:29 AM
Hi CAS,
To clarify a bit,
1) Yes you can aquire the timestamp at the start of the task. but should you wish you could also obtin the timestamp from anywhere within your aquisition and theninterpolate back using the interval time of the samples and the number of samples aquired, to obtain the start time of the aquisition.
2) It isfine to assume a reasonable accuracy over the two hours. There will inevitibly some jitter in the system, the amount of jitter on a card is stated in the cards specifications manual.
3)The data collected will be in the form of an array of doubles, if you would like a timestamp for each element of data, you would have to create an array of the same size where the value of each element of data is:
Interval time of sample * the index of the array element.
Hope this helps.
Regards,
Steve
09-09-2008 04:23 AM
Dear Steve,
Thank you for your reply. What I am trying to do is get a very accurate time stamp in a system where I am acquiring analogue inputs at about 60kHz. The time source is a highly accurate time code signal and I want to tie this in directly to all data samples. I am happy that I can do this by reading the time when the acquisition starts but I need to do this very accurately (i.e. to us accuracy). I think that, via software, the most accurate I can get is when I start my task. I will be acquiring continuously and so my callback function will run periodically but I cannot take a time reading in the callback function as I do not know exactly what data point I am acquiring at that moment.
After looking at my time code card information, it looks like I can feed the analogue input start trigger to an input on that card and latch the time at that exact moment. I think this will be the most accurate method.
Thanks again,
Cheryl