Showing results for 
Search instead for 
Did you mean: 

Using PXIe-6345 to read frequency

I have a very simple setup where I have a PXIe-6345 that I'm trying to use to read frequency... more specifically, I'm trying to read the tachometer of a 4-wire computer fan (around 50-150Hz depending on speed).  I'm having a hard time finding any vi examples or which pin to connect to on the terminal block.  Any ideas?  

0 Kudos
Message 1 of 4

Hi oknice92,


I think the LabVIEW example finder would be useful to you in this situation. The vi I recommend starting out with can be found by opening LabVIEW and navigating to:


Help >> Find Examples… >> Hardware Input and Output >> DAQmx >> Counter Input >> Counter – Read Pulse Width and Frequency (Continuous).vi


You should look up a spec sheet for the fan you are using, too. Assuming the tachometer pulse height is a large enough voltage, using a counter should work. Some fans use a different number of pulses to represent a revolution of the fan, check this and adjust the code accordingly. As far as which pin to connect, refer to the specifications manual (page 18) for the device pinout to find the appropriate PFI lines.


NI 6345 Device Specifications


Hope this helps!


Sam R.
Message 2 of 4

Thanks for the reply.  I'm using "Counter - Read Pulse Width and Frequency (On Demand).vi" which I found in that examples directory and it's not working correctly.  I've attached the tach wireto "PFI0" which I am also using as the frequency input terminal in the VI and I am using "ctr0" in the corresponding slot as the counter.  When I run this VI in frequency setting (min freq set for 2, max freq set for 300) I get "Error -200474 occured at Counter - Read Pulse Width and Frequency (On Demand).vi", "Specified operation did not complete, because the specified timeout expired".  I've tried changing the timeout and I still get this error.


Is it possible that the frequency input is not detecting my signal?  At the lowest RPM, my fan is about 50Hz and 0.8V peak and at the highest RPM my fan is about 140Hz and 2.3V peak.  Are these voltages to low for the coutner to detect?  

0 Kudos
Message 3 of 4

Quick& Dirty: Use a small capacitor and wire it to the line-in of your soundcard.

read the wfrm, pipe it into the tone detection vi ..... FREQUENCY 😄

Greetings from Germany

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

0 Kudos
Message 4 of 4