Platform: Logix5000
I have a relatively simple task I am trying to complete. I need to track the status of a 100 part sequence to see how many parts have been rejected. Essentially, I need to keep track of the last 100 cycles and count how many parts of the last 100 have been vision rejects. I have written most of the logic, using FIFO with an integer with an array of size of 100. Where I am getting stuck a bit is how to accurately get the count of the array. I did make a for statement which will count the array and add it to a counter if the first bit is equal to 1, but this doesn't seem to be a clean way to do it, as I would also need to clear that counter before running the for statement.
Thanks,