Why Can't I Choose the Internal Clock in DAQmx Counter Input Example Programs?

Updated Nov 17, 2017

Reported In

Hardware

  • PCI-6602

Software

  • LabVIEW 2017 Full

Driver

  • NI-DAQmx

Issue Details

  • I want to acquire buffered signals from three quadrature encoders and translate those signals into angular positions
  • I'm using one of LabVIEW's counter input example VI, and it requires providing an external clock
    • Eg. Read Encoder (Continuous Clock) VI
  • I do not have an external clock signal, so I want to use an internal clock

Solution

We can internally generate our own clock with a counter:
  • Open LabVIEW's Example Finder
  • Open the example in Hardware Input and Output >> DAQmx >> Counter Output >> Counter - Continuous Output VI
  • Specify one of your DAQ device's internal counters.  For example, if you are using ctr0 for your encoder measurement, use ctr1 for output.


We can then reference this internal clock in our original counter input example VI:
  • Set that counter's internal output as the Sample Clock Source


Note: You will need to start the pulse train generation before starting the counter measurement

Additional Information

  • Counter tasks do not have an internal sample clock available
  • Generating a pulse train from a counter and using it as a sample clock is known as correlating signals.

WAS THIS ARTICLE HELPFUL?

Not Helpful