Help - Search - Members - Calendar
Full Version: Counter Conversion
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
smichalo
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
cshaley
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.
paulengr
QUOTE(smichalo @ Jun 17 2007, 03:39 PM) [snapback]55603[/snapback]
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


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.

slcman
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
slcman
Oops

I correct my file.....this is the correct answer for pulse/min...

Sorry

swimmy67
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.
smichalo
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.