Hello folks,
I am looking at creating photoeye status checking logic and have written up the method to do this that’s currently in my mind. Sure would appreciate any feedback.
Although my write-up is just conceptual, it may help to know that the equipment is driven off a lineshaft, there is an incremental encoder wired into a PLC5 VHSC card. Every time the encoder “rolls over” or is “reset”, the machine is back in the ‘home’ position. The photoeyes are wired into a DC Latching input card.
Anyway here is my method:
Set up a COUNTER1 which increments by one on each cycle up to ‘x’ machine cycles. The counter will be reset by an “up” transition of each photoeye. For conceptual simplicities sake, I’ll use two photoeyes and call them ‘A’ and ‘B’.
So if the photoeyes switch states with every machine cycle, there should be an up transition on every machine cycle. As such, the above mentioned COUNTER will not be allowed to finish so long as product continues to stream through the machine. This is essentially my method of detecting whether there is a product stream. If there is no product stream the counter will run out indicating this.
Given that my conceptual example has two photoeyes, I will have two more counters (COUNTER2, and COUNTER3 – if there were 3 photoeyes, there would be 3 more counters and so on). Both of these counters will be set up to ‘finish’ after ‘x’ machine cycles just like COUNTER1. The difference will be that unlike COUNTER1 which is reset by any of the photoeye transitions, COUNTER2 will only be reset by Photoeye A transition and COUNTER3 will only be reset by Photoeye B transition. If lets say COUNTER2 finishes, it tells us that there was no photoeye A transition in x number of machine cycles (this may be ok assuming there is no product stream). If COUNTER3 finishes, it tells us that there was no photoeye B transition in x number of machine cycles.
The fault checking for photoeye A will be:
COUNTER1 (not done) AND COUNTER2 done -- This tells that while Photoeye A did not transition in x number of cycles while other photoeyes did. This means there was product stream coming through the equipment and there is a problem with photoeye A.
COUNTER1 (not done) AND COUNTER3 done = Problem with Photoeye B.
I am looking at creating photoeye status checking logic and have written up the method to do this that’s currently in my mind. Sure would appreciate any feedback.
Although my write-up is just conceptual, it may help to know that the equipment is driven off a lineshaft, there is an incremental encoder wired into a PLC5 VHSC card. Every time the encoder “rolls over” or is “reset”, the machine is back in the ‘home’ position. The photoeyes are wired into a DC Latching input card.
Anyway here is my method:
Set up a COUNTER1 which increments by one on each cycle up to ‘x’ machine cycles. The counter will be reset by an “up” transition of each photoeye. For conceptual simplicities sake, I’ll use two photoeyes and call them ‘A’ and ‘B’.
So if the photoeyes switch states with every machine cycle, there should be an up transition on every machine cycle. As such, the above mentioned COUNTER will not be allowed to finish so long as product continues to stream through the machine. This is essentially my method of detecting whether there is a product stream. If there is no product stream the counter will run out indicating this.
Given that my conceptual example has two photoeyes, I will have two more counters (COUNTER2, and COUNTER3 – if there were 3 photoeyes, there would be 3 more counters and so on). Both of these counters will be set up to ‘finish’ after ‘x’ machine cycles just like COUNTER1. The difference will be that unlike COUNTER1 which is reset by any of the photoeye transitions, COUNTER2 will only be reset by Photoeye A transition and COUNTER3 will only be reset by Photoeye B transition. If lets say COUNTER2 finishes, it tells us that there was no photoeye A transition in x number of machine cycles (this may be ok assuming there is no product stream). If COUNTER3 finishes, it tells us that there was no photoeye B transition in x number of machine cycles.
The fault checking for photoeye A will be:
COUNTER1 (not done) AND COUNTER2 done -- This tells that while Photoeye A did not transition in x number of cycles while other photoeyes did. This means there was product stream coming through the equipment and there is a problem with photoeye A.
COUNTER1 (not done) AND COUNTER3 done = Problem with Photoeye B.