|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
I've been trying to use a hall effect sensor and a magnet to measure pulsed from a spinning wheel. But the cRio seems to not respond fast enough to pick up all the pulses. I started clean, and still the problem remains. Has anyone else had this problem? I need help.
|
|
#2
|
||||
|
||||
|
Re: Digital input lag!
Rather than using a DigitalInput, I recommend using a Counter instead. It counts up all of the pulses coming from a DIO for you in the FPGA.
In C++, the RPM can be found with "60.0/GetPeriod()" where GetPeriod() is a function in the Counter class which returns the time between pulses in seconds. If there is more than one pulse per revolution, you would use "60.0/(pulsesPerRev * GetPeriod())". That's the general idea, but the implementation varies depending on which language you are using. |
|
#3
|
||||
|
||||
|
Re: Digital input lag!
Quote:
If you're planning to use this rpm for some type of control loop, you may notice that the reported speed seems to fluctuate. If this happens you can make the FPGA average the last couple of samples to get a better reading. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|