2
\$\begingroup\$

(First Post Here)

Something I want to look into adding to a production process is being able to recognize the same failure (that's in a pattern) and having the machine give an alarm once it sees the pattern occurring. All programming is done on Rockwell devices (Allen Bradley.)

In the simplest way to explain this, we have a rotary table that puts bottle caps/corks on glass bottles. There are 8 "capper heads" that perform this function. Currently, we have a reoccurring issue where the one single capper head continuously holds these caps, doesn't release them, and these caps build up inside it and break the glass bottles. Now, obviously solution here is FIX THE CAPPER HEAD, but clearly, we can't manage that, so I've been asked to create logic to have the machine recognize when this is happening.

Currently a sensor that looks at the caps a little bit after they are placed (to determine if a cap was placed or not) will kick out the failed bottle down the line, but this doesn't cause the program to auto stop itself because the sensor just sees this as a single failed bottle. So, we just run for hours and when this starts happening, we just kick out every 8th bottle until an operator notices it and raises questions.

What would be the most efficient way to structure the new code in order for it to track bottles (in counts of 8) and see if there was a "NG" bottle on every 8th check, or on the same capper head? And if it noticed every 8th bottle failed in a pattern for 3 cycles in a row, it issued an alarm and potentially stopped the machine.

I'm young and only had industry experience for a few years, so structuring ladder logic to hold and track information in this way isn't exactly similar to anything I've done in the past.

Any ideas/recommendations from some long-term automation experts?

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

You could just count uncapped/rejected bottles, reset the count every 25 bottles, and trigger an alarm if the count goes over 2.

Depending on the precise system you are implementing on, this might well be implemented as an counter for bottles, and a counter for failed bottles. When the count limit of the bottle counter is reached (25 in this example), it would reset itself and the failed counter. The failed bottle counter would alarm/stop the system if its count limit (3 in this case) is reached.

If that doesn't work for you, and you really must test for exactly the condition you describe, I'd suggest you need to implement a 0-7 binary counter, which steps on each bottle, and steers the fault input via a 1-8 MUX to 8 individual counters (1 for each head). Set the max count at the number of repeated failures you can tolerate, then add a periodic bulk reset (implemented via bottle count) to avoid trigger on accumulated random failures. There will be a slight delay in trigger if the condition starts just before the bulk reset, but I suspect it will still be good enough. Google will give you the building blocks for the counter and MUX modules (if you don't have them in native libraries).

\$\endgroup\$
5
  • 1
    \$\begingroup\$ I like this idea! Simple and does the job. \$\endgroup\$ Commented Aug 29, 2023 at 15:18
  • \$\begingroup\$ You can obviously play with the reset count and trigger level to average over a larger number of cycles. 10 over 100 bottles might be optimum if you have occasional short lived issues. \$\endgroup\$
    – colintd
    Commented Aug 29, 2023 at 15:25
  • \$\begingroup\$ This makes sense, so thank you. However, I need it to know that it is the same #bottle within a cycle of 8 that is failing within a 3-cycle period. Say the "bad" capper head is capping bottle # 8 every single cycle. I don't want it to alarm if we fail 3 bottles within 24 and they're the random or occasional failure from one of the capper heads in good condition. But rather that 3 fail within 24 that ALL come from capper head #8. So, if bottles #8, #16, and #24 fail then the alarm would go off because it's the 8th bottom from each of those cycles that fails. \$\endgroup\$
    – Lucas-WT23
    Commented Aug 29, 2023 at 17:15
  • \$\begingroup\$ The question is really how often you get random failure to cap. If the random failure rate is low, then 3 failures out of 24 is probably your issue, and 12 out of 96 is almost certainly the issue. Having said that, obviously you know the pattern in real life. But do consider if you can trap the condition via the simple route. \$\endgroup\$
    – colintd
    Commented Aug 29, 2023 at 17:22
  • \$\begingroup\$ Alternative route added to answer. \$\endgroup\$
    – colintd
    Commented Aug 29, 2023 at 17:46
1
\$\begingroup\$
Modulus 8 counter.
   Index                                            +CNT10----+
----| |---------------------------------------------|         |-(DN)-
                                                    |PRE: 8   |
                                                    +---------+
Reset the modulus 8 counter.
   CNT10.DN                                           CNT10
----|  |----------------------------------------------(RES)-

Count rejects for capper 0. Reset if a good part is detected.
    +EQU---------+      PASS                        +CNT0-----+
----|A: CNT0.ACC |--+---|/|-------------------------|         |-(DN)-
    |B: 0        |  |                               |PRE: 3   |
    +------------+  |                               +---------+
                    |   PASS                          CNT0
                    +---| |---------------------------(RES)-
                    
Count rejects for capper 1. Reset if a good part is detected.
    +EQU---------+      PASS                        +CNT1-----+
----|A: CNT0.ACC |--+---|/|-------------------------|         |-(DN)-
    |B: 1        |  |                               |PRE: 3   |
    +------------+  |                               +---------+
                    |   PASS                          CNT1
                    +---| |---------------------------(RES)-
                    
Count rejects for capper 2. Reset if a good part is detected.
    +EQU---------+      PASS                        +CNT2-----+
----|A: CNT0.ACC |--+---|/|-------------------------|         |-(DN)-
    |B: 2        |  |                               |PRE: 3   |
    +------------+  |                               +---------+
                    |   PASS                          CNT2
                    +---| |---------------------------(RES)-
                    
Etc.
  • Have a counter keep track of which lane the bottle has come from.
  • Use the counter's ACC (accumulator) value to determine which of the capper counters should count the failures.
  • Reset the capper's counter if a good product is detected.
  • Create an OR structure to stop the line if any of the CNTx.DN bits turns on.
  • Add in some logic to reset CNT0 to CNT7 when the line is restarted.
\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.