Are you looking for a method to exclude specific numbers from a running average in a PLC 5000 system? I need to calculate the "average cases per minute" while disregarding instances when zero cases were received in a minute. Consider using a Function Analysis Logic (FAL) approach to achieve this. I have already configured an array and am currently utilizing the AVE function as a temporary solution. Your insights are greatly appreciated. Thank you.
To calculate an average, you typically need two things: the total sum of values and the number of values. While an FAL can easily calculate the sum of an array, it may not assist in counting the non-zero entries. There are various methods to accomplish this task; one straightforward approach is to iterate through the array and increment a counter for each non-zero value found.
Does it not seem illogical that if there are no incoming cases, the number of cases per minute would diminish? One potential solution could be to update the average only when the line is in motion to avoid factoring in any gaps in the line.
To enhance your efficiency, set a one-minute timer by creating an array. Once the timer elapses, if the array contains at least two members, utilize either AVE or FAL to calculate the average. If the array is empty, no action is required.
Peter Nachtwey pointed out the confusion in the question regarding a reduction in cases per minute when no cases are being produced. One possible solution suggested is to only update the average when the production line is in motion, although this may result in empty spaces being included in the average. While I also considered factoring in 0 values, I was instructed not to include times when no cases are produced for an entire minute. The elevator and conveyors, responsible for bringing cases and monitoring production respectively, are connected to different PLCs and operate in separate domains. This limits the possibility of communication between the two systems, making it difficult to determine when production has stopped on the other end as a solution.
In order to calculate the average of array elements, run a one-minute timer and create an array. If the array is empty at the end of the timer, take no action. If there are two or more elements in the array, use either AVE or FAL to compute the average. Consider keeping track of the number of times the calculation ignores zeros to adjust the length of AVE. The one-minute timer is already in progress.
While the AVE function does offer a temporary solution, it may not necessarily result in the most accurate average for your specific case. For a more refined method, I would suggest exploring the FAL instruction coupled with a FLL (Fill) instruction. Hereβs how: Create a secondary array to only store the minutes where cases are greater than zero, then run the FAL instruction. To manage the secondary array size, use an incremental counter, incremented only on non-zero cases. You can reset this counter after you get your value - this will allow you to maintain a running average excluding the zeros. Check the PLC 5000 manual for specific implementation.
You could definitely leverage the Function Analysis Logic (FAL) to filter out zeros when calculating your average cases per minute. Consider implementing a conditional check within your FAL loop that only includes non-zero values in the running total and count of instances. This way, your average calculation will be based solely on the minutes with actual cases, which should give you a more accurate representation of your performance. You might also want to explore using a separate data structure to hold valid case counts if you're not already doing soβit could simplify the averaging logic. Good luck with your setup!
It sounds like you're on the right track with the FAL approach! To exclude the zero cases from your average, you could create a secondary array to store only the non-zero values and then calculate the average from that array instead. This way, the AVE function won't consider the zero entries, giving you a more accurate representation of cases per minute. You might also want to track the count of non-zero entries to avoid dividing by zero when you calculate the average. Let me know if you need help with the implementation!
β Work Order Management
β Asset Tracking
β Preventive Maintenance
β Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: 1. How can I exclude specific numbers from a running average in a PLC 5000 system? - One method to exclude specific numbers from a running average in a PLC 5000 system is by utilizing a Function Analysis Logic (FAL) approach. This approach allows you to customize the calculation process to exclude specific values, such as zero cases received in a minute.
Answer: - To calculate the "average cases per minute" while excluding instances when zero cases were received, you can consider implementing a custom logic using Function Analysis Logic (FAL) in your PLC 5000 system. This approach will help you achieve the desired calculation without including the zero values in the average.
Answer: - Yes, you can utilize the AVE function as a temporary solution to calculate the running average in your PLC 5000 system. However, for excluding specific numbers like zero cases received in a minute from the average calculation, implementing a Function Analysis Logic (FAL) approach would be more effective and provide greater customization options.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.