12-23-2010 04:30 AM
Hi all,
I'm trying to use digital input module as a Frequency counter module. For that I using a proximity (hall effect) sensor to find RPM of a Motor. This sensor will give maximum voltage when there is no metal near to its tip and minimum voltage (0 V) when there is a metal nearby(range is 1mm to 6mm). I have a motor with 4 blades which will come near to my sensor. My program is working fine for lower speed(say Max. 175 Hz) but when the speed increases, it shows wrong values. I used CRO to cross check my output, it is working fine for higher frequencies. What should I do? pls review my logic and let me know how to fix it.
Hardware used, cDAQ 9172 and NI 9435.. software is LabVIEW 8.6.
pls help..
12-23-2010 04:53 AM
Hi there,
This could be due to your sampling frequency not being high enough to minimise the risk of aliasing. What sample rate are you using?
Many thanks,
12-23-2010 05:45 AM
Hi,
The Number of samples to read is 1118 . It is connected as a constant shown in that main VI image, And i tried with a control to change the "Number of samples to read" during runtime, but if i exceed 1118, im getting higher frequency values.
12-23-2010 06:09 AM
Hi again,
The VI you have created doesn't have any sample timing included in it. This means that the VI is trying to acquire 1118 samples as fast as it can over and over.
I have included a link to an example on Digital input sampling below.
http://decibel.ni.com/content/docs/DOC-12376
This sampling rate needs to be a least twice the rate of the highest data rate expected to prevent the signals being misinterpreted (aliasing).
I hope this helps.
12-24-2010 03:15 AM
Hi Liam A,
I tried the example which is suggested by you, but i'm getting an error "External sample clock source must be specified for this application".
I tried to rectify it and came up with an idea to use express VI to acquire samples. This is working fine.:)
Express VI settings:
1. NI 9435 in slot 1 of cDAQ 9172.
2. Digital input-- port input 0
3. Time settings -- Continous samples
4. Samples to Read -- 100k
5. Rate(Hz) - 1
6. Advanced timing
Sample clock rate - External
Clock source -- 100kHz Time base
Active edge -- Rising
I attached the VI.
12-24-2010 03:32 AM
Hi,
I'm glad to hear it is working!
However, i'm not so sure as to whether settings are the best practice in terms of sampling rate... the rate of 1 Hz could cause a problem with higher frequencies.
I have included a further link to provide you with more DIO sampling rate examples if you would like to take this further at some point.
Merry Christmas!
06-28-2011 04:50 PM
Hi there,
Could you please provide me with the VI file of the above Program. Actually I am trying to read signal from my Hall SPeed sensor and I have to display the speed of the wheel on Labview. I am trying to figure it out. It would be really helpful if you can assist me.
Thanks a lot in anticiaption
03-21-2017 04:31 AM
Please could you provide us with the freq count subvi.vi ?
Thank you in advance.