How Do I Use the NI myDAQ Counter?

Updated Nov 14, 2017

Reported In

Hardware

  • myDAQ Student Kit

Issue Details

  • I am trying to do a counter measurement with a myDAQ, how can I do this?
  • Can I do counter measurements on a myDAQ?
  • How do I connect my signal to my myDAQ for a counter measurement? 

Solution

The myDAQ has one onboard counter that can be used for counter measurement functions. The counter can be accessed by using DIO 0, 1, 2, and 3 to interface with the counter lines of the counter chip. 

See table below for the lines used by the counter and what each correlates to. 
 
NI myDAQ SignalProgrammable Function Interface (PFI)Counter/Timer SignalQuadrature Encoder Signal
DIO 0PFI 0CTR 0 SOURCEA
DIO 1PFI 1CTR 0 GATEZ
DIO 2PFI 2CTR 0 AUXB
DIO 3PFI 3CTR 0 OUTN/A
DIO 4PFI 4FREQ OUTN/A

 

Additional Information

The NI myDAQ counter can be used for nine different counter tasks. These tasks include:
  • Taking an edge count 
  • Measuring frequency 
  • Measuring period
  • Measuring pulse width
  • Measuring two-edge seperation
  • Measuring position from a linear encoder
  • Measuring position from an angular encoder
  • Generating a pulse output
Each of these tasks will require different inputs to be connected to the input terminals of the counter. 

If you are using the DAQ assistant you will be able to see which inputs need to be used, as seen in the image below. The example uses the Edge Count Task type.
 

WAS THIS ARTICLE HELPFUL?

Not Helpful