LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

counter setup guidelines

Hello,

 

I need to setup counters on a PCI-6634E or USB-6251 (customer choice) to count encoder pulses from spindles running at a wide range of RPMs. 

 

I'm currently using DAQmxCreateCIFreqChan() which allows me to setup the counters Measurement Method to DAQmx_Val_LowFreq1Ctr , DAQmx_Val_HighFreq2Ctr or DAQmx_Val_LargeRng2Ctr .

 

There is also a Measurement Time argument to the function.  The help says it only applies to the DAQmx_Val_HighFreq2Ctr method, but I suspect it applies to other methods as well.

 

These selections seem vague to me and I need some guidance as to how they apply to DAQ modules with different characteristics. 

 

I can make the counters work OK for a specific RPM and encoder but switching to the other DAQ module or to another RPM or encoder often leads to timeout errors.  I think if I could understand what is meant by "HighFreq" or "LargeRng" I might be able to make better decisions about what counter mode to select for a given situation.

 

Is there a document that I haven't found that explains this?

 

Thanks

0 Kudos
Message 1 of 5
(3,558 Views)
Correction, the E series card is a PCI-6034E
0 Kudos
Message 2 of 5
(3,548 Views)
There aren't specific definitions for what is considered "low-frequency" or "high-frequency", however, what you choose will effect how much Quantization Error you see.  For more information, and for the parameters, I would recommend looking at the DAQmx Help page on this.  It can be found by going to Start»All Programs»National Instruments»NI-DAQ»NI-DAQmx C-Reference Help, then search for Quantization Error.  This should give you a better idea of what is really meant by "high frequency" or "large range". 
0 Kudos
Message 3 of 5
(3,530 Views)

Thanks, that is much of what I was looking for.

 

I still have some questions about the timebase when using the High Frequency Two Counter (DAQmx_Val_HighFreq2Ctr ) method.  Does the function argument named "Measurement_Time" automatically select a timebase and count value to achieve the value of the argument?  If so, why all the warnings about overrunning the counter.  If not, how do I control or select the timebase and count values?  . 

0 Kudos
Message 4 of 5
(3,489 Views)
Hey! I would recommend you take a look at the example code in the C help.  It can be found in the same location as the C Reference Help File under Text Based Support»Visual Basic 200X and that should open an explorer window, and you should navigate to Counter»Measure Digital Frequency»MeasDigFreqBuffCont_LargeRange2Ctr.
Doug Farrell
Solutions Marketing - Automotive
National Instruments

National Instruments Automotive Solutions
0 Kudos
Message 5 of 5
(3,464 Views)