Cycles Per Hour

DL06

Member
Join Date
Feb 2006
Location
Canada
Posts
87
Hello all,

Can anyone give me some pointers as to the best way to measure/calculate cylces per hour on a real-time basis. Note that I am using an Automation Direct DL-06DD1 monitoring three machines and communicating via three C-more panels via ethernet.

I have been doing some thinking about this and to me what it boils down to is being able to accurately capture the time between two cycles, then do the appropriate math. The machine runs at about 10,000 cycles per hour which is about 3 times per second.

Am I on the right track if I am thinking of using Mode 40 for this? Capture a pulse, note the time, capture the next pulse, note the time, subtract to get the time difference, then divide 3600 by the number of seconds to get cycles per hour?

How do I go about capturing time 1 and time 2? If I am in an interrupt routine when the next pulse comes it will be missed, correct?

To anyone who has done a rate calculation on this PLC can you tell me if this is reasonable?

Thanks again!
 
Given that the best you'll be able to do in time measurements is hundreths of a second (with a TMRF) consider the readout for these:

32 hundreths = 11250 cph
33 hundreths = 10909 cph
34 hundreths = 10588 cph

Would that level of the display jumping around be acceptable? Maybe you can average the readings using REAL numbers.

It might be better to count cycles over a longer time period then multiply.
 
It will be displayed on the screen for the operator to see the machine speed.

More importantly, it will be used to determine if the machine is running, which will trigger a run timer, which will be used to calculate uptime percentage. Basically if the speed is greater than or equal to XXXX, enable the accumulative timer.

Also, these inputs will be counted to determine and display the number of cycles for the shift.
 
I am not certain I understand but lets see if I have it right.

A simple method would be use a leading edge trigger and count the pulses over a hour...ie use a timer .01 set at 36000. The count is added to another register which gives a total count. Reset timer and start over.

I hope I explained this right, I do not have the DL software on this comp to show it.
Take COUNT accumulator value ADD to V14000 and put result in V14000

Clear V14000 when you want to start the process over.

This is a simple example but maybe it will help. The register I just pulled out of my head but may not be the approriate one to use.

I see my answer is not appropriate for your needs.
 
Last edited:
Plantmetrics, Rockwell's MES/Scada system, does it as follows

1. 10 minute intervals
2. Track the time in run mode for this ten minutes
3. Track the number of cycles produced in ten minutes
4. Compare this to expected output within 10 minutes to generate OEE

Don't worry about capturing an individual cycle - too fast. Get a cycle count every 30-60 seconds and extrapolate.

TM
 
Parts per hour = parts divided by elapsed time in hours.

Thus 10,000 parts divided by 1 hour is 10,000 parts per hour.
Likewise 100 parts divided by 0.01 hours is 10,000 parts per hour, and 10 parts divided by .001 hours (3.6 seconds) is still 10,000 parts per hour.

Tet up a running counter and a running timer - convert the time to hours and make the calculation. When you reach your time or count limits, reset and start over. Watch for divide by zero when resetting the timer.
 
Thanks for your replies everyone. I agree that it would be best to do some averaging, but how do I go about doing a moving average.

Say I simply sample over 10 minute periods, then clear everything and start again. The readings will be very jumpy at the beginning, then steady out as the sample gets larger. After 10 minutes it will be jumpy again and smooth out over 10 minutes.

How do I go about doing more of a moving average, always taking the last ten minutes? I almost need a set of ten accumulators. When the new value is read in every minute, the oldest one pops off. Almost like a bit shift, but with full registers. Is there a simple way to do this (other than manually shifting everything one at a time in the logic)?

I should still use mode 40 as discussed above, right?
 
Last edited:
You could use a FIFO queue as you suggest with ten numbers. Thats probably how I would do it. However, a queue will not render accurate results until all tne registers are populated.

The formula for a running average is ((x - x/r) + y)/r where x is the running average, y is the new sample, and r is the number of samples. A running averaage however is not the same thing as averaging ten samples - a running average has hysterisis for significant single sample anomolies.
 
Last edited:
Have the pulse increment a counter, when ever the counter is greater than zero ,move the initial counter value to a holding register, V500 for example, start a self resetting timer, with a preset of 15 seconds. Everytime the timer times out,
move the current counter value to V501, subtract V500 from V501 and multiply by 240 and store in V502, this will give you the rate per hour. Then move V501 into V500, and wait for the next done bit, then repeat. This will be a more dynamic rate for the operator, and you will have the counter value for actual cycles completed. You will have to implement some way of resetting the counter each shift. When ever V502 is greater than zero, the machine is running. However, you will loose the first 15 seconds of each shift on your uptime timer.
 
How do I go about doing more of a moving average, always taking the last ten minutes? I almost need a set of ten accumulators. When the new value is read in every minute, the oldest one pops off. Almost like a bit shift, but with full registers. Is there a simple way to do this (other than manually shifting everything one at a time in the logic)?

What you do is collect data per second and averge it on each scan. On each second, push the stack down by one location, collect the new data & place it at the top of the stack and average the entire stack. The result x whatever time will give you cycles per minute, hours etc... So if the unit's running for just 30 seconds and cycled just a few times during that 30 seconds you'll still get and average of so many cycles per hour in almost real time.
 

Similar Topics

I've been asked to provide an alarm for if a pump starts too frequently during a given time. The operator should be able to enter X starts per X...
Replies
7
Views
2,588
have a machine that i have been upgrading from a older omron to a allen bradley, and trying to show cycle speed. The machine has a prox switch...
Replies
18
Views
12,037
Hey everyone, I'm back with another question. I am writing a routine for a rollstock packaging machine using an AD DL06 & an EZtouch HMI. The...
Replies
1
Views
2,717
Hello, I was messing around with my HMI and i decided to save some values from the previous cycles so i can see how much efficiently i was...
Replies
12
Views
3,744
Hi, I have all my program in OB1 with FCs and FBs, taking up apporx 45 networks. If I add more program cycles for example 123 and 124. I assume...
Replies
8
Views
3,348
Back
Top Bottom