Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamp of Externally Triggered Signal Using PCIe-6351

Solved!
Go to solution

Hi,

 

I'm using a PCIe-6351 to acquire externally triggered data.  My block diagram looks almost exactly like this link in section A. Posttriggered Acquisition with a Digital Start Trigger:

 http://www.ni.com/white-paper/4329/en

As you can see it's a pretty straightforward acquisition.  My trigger signal is on PFI0 and it is supposed to occur at regular intervals.  However, I've begun to suspect that it varies in time.  For example, if it's supposed to occur every 2 milliseconds it may vary from 1.9 to 2.1 milliseconds.  Is it possible for DAQmx to record the time at which each trigger occurs?  I realize that it won't be synchronized with the PC time, but as long as I can have a timestamp for each trigger I can subtract each individual time from the time of the first trigger to get the time between triggers.

Thanks!

 

Steve

0 Kudos
Message 1 of 6
(3,194 Views)

Something you can try is to use the ‘Write to Measurement File’ VI and do the timestamp not for the trigger but for the data that you acquire every time the trigger occurs.

Mr.O
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,177 Views)
Solution
Accepted by topic author Steve_G
Mr. O, Thanks for the reply. My system is set up to acquire many data points at a relatively fast rate, so I buffer them on the DAQ card and only upload them to the PC after the acquisition is complete. My understanding is that the Write to Measurement File vi will only put a timestamp each time it writes to the file - not for each individual data point. Is that correct? Steve
0 Kudos
Message 3 of 6
(3,174 Views)
Thanks. I'll try posting this this in the main Labview discussion forum. Steve
0 Kudos
Message 4 of 6
(3,150 Views)

Steve,

 

There is no timestamp ability built into the AI timing controller on your 6351.  However, if you have a spare counter on the device, you should be able to use this to timestamp your sample clocks.  I would recommend that you set up the counter to do an implicit buffered period measurement, and set the input terminal to be /DevX/ai/SampleClock.  As you suspect, this will not be in sync with your PC's clock, however it should give you a good measurement of the time between each sample clock.

 

Hope that helps,

Dan

0 Kudos
Message 5 of 6
(3,146 Views)

Dan,

 

That worked perfectly.  Thanks for the great idea.

 

Steve

0 Kudos
Message 6 of 6
(3,115 Views)