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 5
(270 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 5
(220 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 5
(201 Views)

Thankyou for your reply, i am using implicit timing function only . But i want to do Edge counting (with timestamp of each edge ) not period measurement. how can i achieve that?

0 Kudos
Message 4 of 5
(163 Views)

Exactly like I showed.  Did you try the code?   It produces an array of timestamps, one for each edge.  The size of the array is your total count of edges. 

 

Period measurement isn't the destination, but it *is* the path that gets you there.

 

 

-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.
0 Kudos
Message 5 of 5
(150 Views)