Sign in to follow this  
Followers 0
Guest DHR

Read RPM

6 posts in this topic

Does anyone have a way that I can capture the instantaneous RPM of an air motor as it ramps up? I need a virtually constant numerical indication of RPM. I am using a CPM2-C controler with CX programmer. I have a sensor mounted that gives me a pulse every 180 degrees of rotation. The air motor is accelerating and when it reaches 3500 RPM I need to energise a valve. Previously this machine had an externall tachometer that gave a signal when RPMs were reached. I need to do away with that tach. This problem seems like it should be easily solved, however it is escaping me so far. Any sugestions?

Share this post


Link to post
Share on other sites
You will need to count pulses over a period of time to determine the speed. You can then compare the number of pulses with a constant to switch an output. You will have to be very careful to make sure that the pulse width is long enough for the PLC to pick up every one. The pulse width needs to be at least twice the length of the longest scan time to not miss pulses. Do you know what your pulse width is at maximum speed? My guess is that it is way to short for your application, but I have been wrong before. Do the calculations. It is much easier to use a proprietary device that gives you a 4-20ma input into the PLC. You can then just do a compare statement to turn your output on. Edited by BobB

Share this post


Link to post
Share on other sites
Hoping this could help you... The attached file, it's a Cpm2_c manual's page about the Maximum frequency detection. Ciao, Mike

Share this post


Link to post
Share on other sites
Bob and anyone interested, This plc has high speed inputs capable of dealing with 20khz. That is plenty quick enough for my needs. My process is presently @ 3500 rpm, but lets give it a capability up to 5000 rpm. That would be 10, 000 pulses per min. Divide by 60 gives us a maximum of 84 pulses per second. If I look at this in 100 millisecond intervals I get a maximum number of 8.4 pulses. That just isnt enough data. 0 to 5000 RPM is going to become a number from 0 - 8.4. With only whole digits to work with that gives me a maximum resolution of 625. I could identify 0, 625, 1250, 1875, 2500, 3125, 3750, 4375, and 5000 rpm, but nothing in between.

Share this post


Link to post
Share on other sites
I haven't got much time right now, but what you need to do is use the scheduled interrupt subroutine and set it for a fixed update time. Grab the counter, do the math, reset the counter and quit the subroutine. Done it many times. Will try and post code this weekend.

Share this post


Link to post
Share on other sites
Frequency measurement using the Interval Timer and Interrupt counter: This program uses the interval timer interrupt to capture the number of pulses that have been counted in 1 second. Courtesy Omron's Interrupt Guru Ed Allen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0