Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

9401 counter issues

Solved!
Go to solution

I am attempting to measure motor shaft rpm using a proximity sensor and a cDAQ-9174 with an NI 9401 module in slot 4.  The output from the proximity sensor switches from 0V to approx 4.25V.  The measurment frequency is expected to range from close to 1 Hz up to approximately 500 Hz. I hooked the signal to pin 16 and the COM to pin 1.  When I choose ctr0, the measured value changes drastically, as shown in the attachd counter chart image.  I checked my signal by hooking it to a NI 9205 and using an oscilloscope VI, as shown in the attached image.  This shows exactly what I would expect for frequency and amplitude.  What could be the problem when trying to use the counter?  I have also tried this in MAX and get the same strange results.

 

Thanks,
Matt

Download All
0 Kudos
Message 1 of 7
(9,288 Views)
Solution
Accepted by topic author ELDMATT

Have you tried using one of the examples? Specifically, could you try Hardware Input and Output -> DAQmx -> Counter Input -> Counter - Read Pulse Width and Frequency (On Demand).vi.

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 2 of 7
(9,274 Views)

Is it possible that the signal crosses the digital threshold slowly enough that you are getting multiple counts on every nominal edge?  Your oscilloscope image is useless for detecting slow transitions. You need to sample at MHz rates to see the edges effectively.  Some digital devices including counters can respond to noise or slowly varying inputs as though a high frequency burst appeared at the input.

 

Lynn

0 Kudos
Message 3 of 7
(9,236 Views)

It appears the problem was due to noise in the signal.  I was able to resolve this issue by acquiring the signal as a digital input rather than a counter input.  The digital signal was then converted back to an analog signal using the Digital to Analog.vi.  I was then able to make use of the Extract Tone.vi to get the frequency of the signal.

 

Thanks to Craig H. for his help solving this issue.

0 Kudos
Message 4 of 7
(9,228 Views)

Hi,

I had same problem that you face previously but I use NI 9421 module. And I follow your instruction to capture the data by using the Digital to analog but I could not hook the line from DAQ assist to that waveform. 


@ELDMATT wrote:

It appears the problem was due to noise in the signal.  I was able to resolve this issue by acquiring the signal as a digital input rather than a counter input.  The digital signal was then converted back to an analog signal using the Digital to Analog.vi.  I was then able to make use of the Extract Tone.vi to get the frequency of the signal.

 

Thanks to Craig H. for his help solving this issue.




0 Kudos
Message 5 of 7
(8,664 Views)
hey i am using same proximity sensor with connection to 14,16 and 1 pins of NI 9401.From test panel i checked sensor getting supply but when i run my labview program sensors light turns off and unnamed task error coming.Please help me.
Thanks
0 Kudos
Message 6 of 7
(7,779 Views)

Hello.

 

Can you include more information about your sensor and the error message you are getting? (a print screen would be great). Also, as this forum was already set as "Solved", I would strongly recommend you to post this on a new thread (you can of course add a link to this one).

 

 

Camilo V.
National Instruments
0 Kudos
Message 7 of 7
(7,752 Views)