Error -201314 Counter Sample Clock Buffered Pulse Measurements

Updated Aug 2, 2018

Reported In

Driver

  • NI-DAQmx

Issue Details

  • Why do I get error -201314 when running Counter Pulse Measurements?
  • How can I fix error -201314?
  • Why does error -201314 occur sometimes?
  • I am measuring pulse width and getting error -201314

Solution

There are two conditions that need to be met to avoid this error and successfully make a Sample Clocked Buffered Pulse Measurement. 

1. The first sample clock pulse must come after the first cycle of the input pulse signal has finished. The reason for this is that the sample clock pulse causes DAQmx to request the last pulse measurement and a single pulse has not yet finished. 

2. Also there cannot be two sample clock pulses within one cycle of the input signal. To avoid this you can set the sample clock frequency to half of the input signal frequency.
 
Figure 1: Sample Clocked Buffered Pulse-Width Measurement
 
Also if you just want the pulse measurement when it is available you can use Implicit Buffered Pulse Measurement instead. This will use the signal itself as the indication of when a pulse measurement needs to be conveyed to the user. 

Additional Information

Note that pulse measurements are only supported by NI X-Series and 2nd generation NI CompactDAQ devices. This error does not apply to the NI 9361 module.

For LabVIEW 2011 and prior examples, you can go to Help » Find Examples...  to open up the Example Finder. Then navigate to Hardware Input and Output » DAQmx » Counter Measurements » Period or Pulse Width. For Sample Clocked Timing, choose Meas Pulse Width-Buffered-Sample Clock-Cont. For Implicit Timing, choose Meas Pulse Width-Buffered-Cont.

For LabVIEW 2012 and later examples, open up the Example Finder and navigate to Hardware Input and Output » DAQmx » Counter Input » Counter - Read Pulse Width and Frequency (Continuous).vi. To switch from Implicit to Sample Clock timing, just change the polymorphic Timing VI to Sample Clock and specify a Clock Source and a Rate.


Please reference Chapter 7 - Counters of the X Series User Manual for further references on pulse measurements.

WAS THIS ARTICLE HELPFUL?

Not Helpful