LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to measure RPM using digital I/O

Please tell me how to measure RPM using Digital Input or please give me a code for this.

0 Kudos
Message 1 of 17
(6,360 Views)

Hi Nitin,

              See here

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 2 of 17
(6,357 Views)

Hi Nithin,

               Try to keep similar posts in a single thread

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 3 of 17
(6,352 Views)

@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)

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 17
(6,348 Views)

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.

0 Kudos
Message 5 of 17
(6,339 Views)

I am using NI 9426 module for measuring RPM

0 Kudos
Message 6 of 17
(6,317 Views)

Are you using the 9426 standalone or is it installed in a cDAQ or cRIO chassis?

0 Kudos
Message 7 of 17
(6,312 Views)

9426 is installed in cRIO chassis.

0 Kudos
Message 8 of 17
(6,278 Views)

Please check the code...

0 Kudos
Message 9 of 17
(6,273 Views)

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.

0 Kudos
Message 10 of 17
(6,263 Views)