Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamp software triggered continuous AI

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:

 
  1. Is this as simple as reading the time at the point at which I start the master task (I’m using Measurement Studio, so that would be when I call Task.Start())?
  2. I would hope that the on board clock was reliable enough for me to then assume constant time periods between each sample over a 2 hour period – is that a safe assumption?
  3. Ideally, I would prefer to check the timecode data (input through a non-NI card) regularly and be able to assign it to the exact analogue data point taken at that time. I think that I might be able to do this by synchronising a counter output on my master card which I can use to create an output e.g. every second which I could then feed into a capture input on the time card (assuming I monitor for buffer overflow so I can guarantee that I have not lost data). Any comments on this or alternative methods?
 

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.

CAS
0 Kudos
Message 1 of 3
(2,879 Views)

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

Message 2 of 3
(2,832 Views)

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

0 Kudos
Message 3 of 3
(2,829 Views)