Hello, we have a vision system on one of our lines. Vision captures an image every 1.5 seconds. When there is a bad image, vision system send image to an external hard drive. Each time there is a bad image or no good data, vision send a signal to an Allen Bradley PLC. If there are three bad images in a row, engineer wants me to set an alarm. Issue is that there can be a one no good data on one capture but a good image on the next capture.
Since each of the images are captured every 1.5 seconds, engineer wants to see three bad images right after another. What is the best way to program this? I have set up a counter to count up each time there is a no good signal (bad image) sent to the PLC. I have set up if the counter counts up to , this starts a 1.5 second timer. When that timer is done this sets a latch bit. When this latch bit is on, no good signal is true and the counter equal is to 2, this start another 1.5 second timer. When this timer is done a latch bit is set. When the latch bit is on, another no good signal is true and counter is equal 3 this start another 1.5 second timer. When this timer is done a latch bit is set. When the latch bit is on, another no good signal is true and counter is equal to 4. This signals an alarm in the PLC. One the alarm is acknowledged, all of the previous latch are unlatched. Process starts again.
Since each of the images are captured every 1.5 seconds, engineer wants to see three bad images right after another. What is the best way to program this? I have set up a counter to count up each time there is a no good signal (bad image) sent to the PLC. I have set up if the counter counts up to , this starts a 1.5 second timer. When that timer is done this sets a latch bit. When this latch bit is on, no good signal is true and the counter equal is to 2, this start another 1.5 second timer. When this timer is done a latch bit is set. When the latch bit is on, another no good signal is true and counter is equal 3 this start another 1.5 second timer. When this timer is done a latch bit is set. When the latch bit is on, another no good signal is true and counter is equal to 4. This signals an alarm in the PLC. One the alarm is acknowledged, all of the previous latch are unlatched. Process starts again.