Troubleshooting Production Count Tracking by Hour in HMI Shifts

Question:

Greetings, lovely individuals! I am currently working on creating an hourly production table for HMI. I am encountering a challenge in tracking the production count for each hour of my shift. During the morning shift, which runs from 7 am to 3 pm, the parts produced in each hour are assigned to specific elements in an array. Despite thorough testing, the shift hour counter does not seem to be incrementing as expected. I have provided the logic I used for reference, particularly focusing on rung 11: https://ibb.co/kUFg8y (PLC LOGIC). Any assistance in identifying the error would be greatly appreciated. Thank you for your help, and looking forward to your feedback.

Top Replies

I quickly glanced at the time and noticed that 3 pm is equal to 15, not 3. Just to clarify, 3 corresponds to 3 am. Remember, 24-hour time format can sometimes cause confusion, so it's important to understand the difference between morning and afternoon hours.

There seems to be an issue with the logic in the one shot triggering the condition change. The initial condition remains constant during the morning shift, resulting in the NEQ always being true. It only counts once until DATE_TIME.HOUR equals 3 (or 15) for it to count again. Why does the PLC need to track the number of parts produced during the morning shift? The individuals monitoring the parts per hour will already know which shift was responsible for them. Simplifying the logic can be beneficial. Consider a different approach like this: use CTU HOUR_COUNTER if DATE_TIME.HOUR is not equal to the previous hour, then update previous_Hour to DATE_TIME.HOUR. This streamlined logic eliminates the need for a one shot and ensures the second line is always executed, regardless of the first line. Translate this concept to your ladder editor for implementation.

In order to ensure that a certain action only occurs once a day, the condition for triggering the action should involve both sources being equal at a specific time. To properly track the hours of a shift, it's important to capture the previous hour for comparison with the current hour in order to accurately count. To achieve this, consider adding a rung below your counter and moving the Date hour to the Previous Hour. This setup allows for the counting to occur before the previous hour is updated using the NEQ instruction. By implementing these steps, you can effectively manage and track the hours of a shift for better productivity and organization.

The condition in rung 11 is incorrect for incrementing the counter using the NEQ instruction. Even when Date_Time.Hour changes, it will still not be equal to Morning.Shift_End_Hours, preventing the counter from incrementing more than once.

Thank you CWAL61 for your response! I have made the adjustment to shift end hours, changing it to 15 from 3. And I must say, your idea is indeed effective! For testing purposes, I simply used minutes to observe if my counter would increase, and it seems to have worked perfectly. Here is the logic as per your suggestion: [link to image]. Your assistance is greatly appreciated. Thank you!

Hey there! I took a look at your PLC logic and it seems like the problem might be with how your shift hour counter increments time. It's possible that it's not aligning properly with real-world time. One way to solve this could be to use the PLC's real time clock (RTC) as a reference and increment your counter based on that. That way, you're directly tying the production count to the clock hours. You could also consider adding a routine to reset the counter everyday at the start of the shift. Hope that helps!

Hey there! It sounds like you're really diving deep into your HMI project. One common issue with tracking the shift hour could be how the conditions for incrementing the hour counter are set up; sometimes using the wrong trigger or not properly resetting the counter at the beginning of the shift can mess things up. You might want to check if your logic for detecting the shift change is correctly aligned with the actual time or if there’s any overlap causing the increment to not register. Have you considered adding some debug outputs to help verify where it might be stalling? Good luck, and I'm sure you'll figure it out!

Hey there! It sounds like you're tackling a tricky issue with your hourly production table. Have you checked if the hour counter is properly reset at the beginning of each hour or if there might be any conditions preventing it from incrementing? Sometimes, even a small oversight in the timing or logical conditions can throw everything off. If you could share a bit more about the specific logic you've implemented in rung 11, I might be able to help pinpoint the problem. Good luck!

Hey there! I’d be happy to help with your production table issue. It sounds like the hour counter might not be configured correctly to trigger on the hour transition. Have you checked to see if the logic properly detects the change in time and whether the counter resets as it should? Sometimes adding a simple debug output, even if just temporarily, can help isolate where the issue lies. If you can, share a bit more about how the time is being read or the specific conditions that are supposed to trigger the increment—it might jog some ideas! Good luck!

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: 1. Why is the shift hour counter not incrementing as expected in the hourly production table for HMI?

Answer: - The shift hour counter may not be incrementing due to a logic error in the PLC code provided in rung 11. Review the logic closely to identify any issues with how the counter is being incremented.

FAQ: 2. How can I troubleshoot the issue of tracking production count by hour during the morning shift in HMI?

Answer: - To troubleshoot the tracking issue, carefully check the array elements where the parts produced in each hour are being assigned. Ensure that the assignment is correct for each hour of the shift from 7 am to 3 pm.

FAQ: 3. What are some common reasons for production count tracking errors in HMI shifts?

Answer: - Common reasons for tracking errors could include incorrect variable assignments, faulty logic in the PLC code, or issues with the shift hour counter implementation. Double-check all elements involved in the production count tracking process for accuracy.

FAQ: 4. Can you provide guidance on improving the accuracy of hourly production tracking in HMI using PLC logic?

Answer: - To enhance the accuracy of hourly production tracking, consider adding error handling mechanisms, implementing thorough testing procedures, and validating each step of the production count process. Additionally, seek feedback from peers or experts to identify any potential improvements in the logic.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  â†’