LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get timestamps in PCI-e6612

I am doing an random non-uniform signal acquisition and i need timestamp for when every rising edge occurs ? Any idea how to do that I am using PCI-e-661

 

0 Kudos
Message 1 of 3
(90 Views)

There are two ways:

  1. Software-timed, easy: Use DAQmx Change Detection Event Registration and save the timestamp from the PC in the event structure.
  2. Hardware-timed, more complicated: Use a hardware-timed sample clocked task. You would need to generate a sample clock from a counter then route it to an edge counter task. See Method 1 in Synchronizing Two Counter Tasks in NI-DAQmx. Then perform data analysis to retrieve the timestamp at which the count increases.
-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
Message 2 of 3
(40 Views)

A third way:

 

3. Use "Implicit Timing" to do a buffered period measurement task, sensitive to rising edges.  On your device, the first rising edge will represent relative time=0.  The first period measurement happens at the second rising edge.

    For N rising edges, you will capture N-1 periods.  Your relative timestamps for those periods are just a cumulative sum of all the periods.  And you also know that by definition of how the hardware works, the first rising edge occurred at relative time = 0.

    If you want a full time-of-day timestamp, the best you can do is query the time-of-day immediately after the first period measurement.  Then subtract off the first period to establish the absolute time at the first rising edge.  Here's an incomplete illustration of what I mean using a Finite acquisition for simplicity:

 

Kevin_Price_0-1750289741404.png

 

 

- Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 3 of 3
(21 Views)