Sign in to follow this  
Followers 0
smichalo

Counter Conversion

7 posts in this topic

Hello I just finished a project where I installed a redlion display that displayed how many pulses/min. Really easy to set up and a nice display. My question is this... On the next machine I plan on installing a touch screen operator interface. Is it possible to get the same pulses I used on the redlion, hook it up to the PLC scale it and display it on the touch screen? I will be using a ML 1000. The pulses will be coming from sensor that detects lugs on a conveyor belt. ( Used for bit shifting ) This is something I am just curious about. The redlion is a cheap solution so it's not a failure if I can't do it Thanks Steve

Share this post


Link to post
Share on other sites
I don't see a frequency input module listed in the ML product line, so it appears that you would need some intermediate device to convert the pulses to an an analog signal. Or, depending on the required accuracy, I guess you could also use timers in your controller and count the pulses with a DC input module. I've never tried that, so who knows how well that would work.

Share this post


Link to post
Share on other sites
Depends on the pulse speeds and your scan rate. If your scan rate is reasonably quick compared to the pulse rate (and length), then connect it to a digital input and count away. If not, then you have to have some extra hardware to do it...a pulse counter or frequency-voltage (or current) converter. Check your scan rate and compare it to the pulse electrical characteristics (how often, how long). Frequently Red Lion and Simpson (another similar company that I've had good luck with) offer a "redirected output" which is often easier to deal with than buying a specialized piece of hardware without a display. In addition, this is notoriously a "difficult" problem, because it is somewhat hard to get a "stable" display. Assuming you passed hardware part, there are two ways to processing it. The first solution is to count pulses over an interval. For instance, use the pulse input to trigger a counter (CTU). Simultaneously, monitor the real time clock minute. At the moment the minute changes, save the counter value as your result and reset the counter. If this is too slow, count over a shorter interval such as every 10 seconds and multiply by 6. As you reduce the time interval, the result will appear to "jump" around more. One way around this is to apply a filter. For instance, output = (last output X 0.75) + (new value X 0.25) is an exponentially weighted filter that generally smooths the output over the last 4 readings. If you want quicker response, the other choice is to count the time from pulse to pulse. In this case, the scan rate really becomes a factor, but essentially you have to capture the time period. If the time period is measured in seconds, 60 / (time interval) = pulses per minute. In any case, getting acceptable response from any of this stuff is notoriously hard. This is one reason that in the world of motion control, they usually resort to high resolution encoders (thousands of pulses per revolution) with high speed hardware counters in order to measure shaft speeds with reasonable accuracy and response speeds.

Share this post


Link to post
Share on other sites
We don't have one major info: what is the speed (frequency)?? Slow speed ( .1 sec error [maybe less] acceptable) -> take a look to the file I send. This is a simple example for a easy way to do the job. Fast speed -> You don't need extra hardware like paulenr said. (sorry paul...) M1100 have one hight speed counter input (HSC). This is more complex to program but really more accurate (up to 20kHz). You can find info on HSC in chapter 5 from this manual http://literature.rockwellautomation.com/i...um001_-en-p.pdf good luck UNTITLED.RSS

Share this post


Link to post
Share on other sites
Oops I correct my file.....this is the correct answer for pulse/min... Sorry UNTITLED_1_.RSS

Share this post


Link to post
Share on other sites
Hello, I have added my reply because the PLC used is a ML1000 and not a ML1100. I have attached a sample program. Edit: Just to clarify the HSC. The ML1000, ML1200 and the ML1100 have (4) High Speed Inputs, Input 0 to 3, but only (1) High Speed Function file. ML1000_Count_Pulse.RSS Edited by swimmy67

Share this post


Link to post
Share on other sites
Hello All Thanks for all your responses. All were very helpful. For this particular application accuracy was not very critical. It was just something I wanted to display to give us an "idea" of what we were running. That being said I did use SLCMAN's solution and it worked well. I got the speed on the panel using that logic. To be honest with you I was just curious if it could be done and once again this forum answered my question. Thanks again Steve

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