09-04-2012 10:37 PM
Please tell me how to measure RPM using Digital Input or please give me a code for this.
09-04-2012 10:56 PM
Hi Nitin,
See here
09-04-2012 11:09 PM
Hi Nithin,
Try to keep similar posts in a single thread
09-04-2012 11:19 PM
@Nitin Bhandari wrote:
Please tell me how to measure RPM using Digital Input or please give me a code for this.
It depends on the Hardware. You have to count the number of pulses in your case it will be High/Low occurrence make a logic to find count this and depending in the number of pulses you will get a complete rotation make the scaling. With this you can monitor the speed but controlling would be tough with the digital input (Correct me if I am wrong)
09-05-2012 01:11 AM - edited 09-05-2012 01:15 AM
You probably aren't going to find anyone to just give you code. Especially because you don't specify the hardware you're using. Doing this on FPGA is different than using DAQmx to do it. With FPGA you count pulses over a specified time. Using boolean logic from the digital DI node is a common way but there are others. (if you are using FPGA I can draw up an example, but I believe there is one on NIs website if you search google for it),. Then, if you want, you can run the data through an IIR filter, especially if you have a low resolution or slow moving encoder. Either of these conditions can result in very large difference of RPM even if the actual speed is not varying much (if you need an example why I can provide more detail, but some simple math calculating RPM should explain this. Obviously lower resolution will giv eyou less accurate results).
If you use DAQmx you can set up a frequency task and it will return the number of pulses in a specified time frame; then you can convert this to RPM based on your encoder resolution and take the same steps of running it through a filter to smooth it out if need be.
09-05-2012 07:47 AM
I am using NI 9426 module for measuring RPM
09-05-2012 08:57 AM
Are you using the 9426 standalone or is it installed in a cDAQ or cRIO chassis?
09-06-2012 03:44 AM
9426 is installed in cRIO chassis.
09-06-2012 03:49 AM
Please check the code...
09-06-2012 06:57 AM
Nitin,
Sorry, but I'm running LV2010SP1 and unable to run your code. The best way to get an accurate freq measurement is to utilize the FGPA in your cRIO. There is an example for this that ships with LV that demonstrates how to do this.