Average nos passing in 1 minute.

Jasonsam

Member
Join Date
Jan 2012
Location
singapore
Posts
1
Hello, I'm seeking advice. I need to claculate and display a running average for the number of items passing by on a conveyor. The input is simply "on" when an item passes. I need to calculate the average rate over the past minute.

Thanks.
 
You can do that with most any PLC or modern HMI.
Look up the math features of your unit and integrate them into the formula that gives the correct answer.
 
sorry couldnt help my self

Please let us know which PLC you are using - and any other relevant info

welcome to the forum
 
Jason,
1. Use a Timer to time up to 1 minute.
2. Use a Counter to count a part each time the Input goes on.
3. At the end of 1 minute, move the Counter value to a memory word called "Parts per Minute".
4. Now reset the counter and the timer to 0, then restart the timer.

If you want to get an average rate in less than 1 minute, then set the timer to some lower number (15 seconds maybe), then multiply your total accumulated count by 4 to convert it back to parts per minute.

If you want to get an average rate in 5 seconds, then set the timer to 5 seconds, then multiply your total total accumulated count by 12 to convert it back to parts per minute.
 
Last edited:
Welcome to the forum.


Another way is a running average that updates every 15 seconds but tracks parts over a full minute.

Use a 15 second timer and count the parts that go by during the 15 second interval. At the end of each time period

part_count[4] = part_count[3]
Part_count[3] = part_count[2]
part_count[2= = part_count[1]
part_count[1] = count of parts from interval.

Average = part_count[1] + part_count[2] + part_count[3] + part_count[4]

This can be adapted to as many update periods as you wish by expanding the array and changing the time interval accordingly.

Search the forum for running average to find other threads and even some coded program examples of ways to do it.
 

Similar Topics

Does this instruction calculate values during a single scan, or does it require number of scans based on element count in the array? For Example...
Replies
3
Views
113
I am working on a program in Cscape to take a pulse input from a flow meter and output an average of the last 5 minutes of flow and total flow to...
Replies
1
Views
573
I am storing values into an array. I am wanting to find an average of the highs and an average of the lows. Something like this... After 50...
Replies
36
Views
8,842
I need to keep a running pass/fail yield of the previous 5,000 parts produced. I have used this formula before to calculate average: AvgValue =...
Replies
6
Views
2,152
is it possible to capture a value while its constantly changing then taking its highest reading? I have a nozzle that sprays for 10 seconds. I...
Replies
14
Views
3,436
Back
Top Bottom