Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

counter source and gate configuration & timestamping

Hi,
 
I was loooking for advice on setting the terminals for a counter's Gate and Source.
I'm using an M-series PCI-6221 under DAQmx 8.3. I'm programming in C++.
 
I got some good advice in a previous thread (Multifunction DAQ | timestamping asynchronous digital inputs) about setting up a timestamping operation. Essentially, I connect a clock to the Source terminal of the counter, and the signal I want to timestamp to the Gate terminal.
 
What I'm not clear on is what are the functions that: 1) set the terminal pin for the Gate, and 2) set the terminal pin for the Source, and 3)
When I utilize  DAQmxCfgSampClockTiming(taskHandle, "100kHzTimebase", ...) will this by default route the 100kHzTimebase to the default terminal for a Counting Edges operation?
 
I'm interested in routing the internal 100kHzTimebase to the Counter Source terminal, and the PFI4(=Ctr1 Gate) to the Coutner Gate. 
 
Thanks for any suggestions.
0 Kudos
Message 1 of 4
(4,630 Views)
Hi,

The terminal pin for Gate and Source are fixed on the Data Acquistion card. You can find out which pins are the gate and source in Measurement and Automation Explorer (Right click on the device >> Device Pin Outs)

When you are configuring a counting application it is best to use Implicit timing instead. This will route your 20MHz clock by default.

Hope this helps!
Abhinav T.
Applications Engineering
National Instruments India

LabVIEW Introduction Course - Six Hours
Getting Started with NI-DAQmx
Measurement Fundamentals
0 Kudos
Message 2 of 4
(4,614 Views)

Hi,

Thanks for the information with regards to my problem. Correct me if I'm wrong, but timestamping is not a purely counting application. The TTL inputs need to be assigned an arrival time (or the state of a counter) with respect to the start of a task. So I think there needs to be a steadily increasing clock signal to specify this value.

So with regards to timestamping is Implicit timing appropriate?

Thanks for the input.

0 Kudos
Message 3 of 4
(4,608 Views)
Hi,

There is a discussion forum post here that provides information about timestamping using a counter input.  It discusses the use of implicit timing for a period or frequency measurement task in order to obtain timestamps.

Regards,
Andrew W
National Instruments
0 Kudos
Message 4 of 4
(4,581 Views)