Your last program has an error on Rung 2, 3rd rung branch which is the Reset for the UDC Counter. With it like this, the UDC gets RESET on every scan, keeping it from counting up!
(Did you look at the program I posted back on Post #13? It had the correct logic.)
Because your STOP pushbutton is Normally Closed, the X1 instruction should be Normally Closed, so that the counter is NOT reset unless the red STOP PB is pressed. In other words, looking at the NC physical pushbutton with an internal NC PLC instruction results in a binary "0" to keep the reset off until the button is pressed, turning OFF the physical contact, but since the internal NC X1 inverts the input, then the internal X1 would go ON when the physical input is OFF.
Now, you need to DELETE the CO in front of the X1, because you want to be able to reset the counter EVEN when your are not in RUN mode. If you leave C0 there (on the 3rd rung branch), then when you press STOP, C0 is deenergized on Rung 1, so on Rung 2, you cannot ever do a reset because C0 is blocking your STOP button on the 3rd rung branch.
I suppose you added this because you were desperate and willing to try anything. Usually that situation results in compounding errors on top or errors, not a good thing. Relax, and step back and try to see the forest and ignore the trees. Try to understand how it WORKS, and you will then be able to make it work.
Your NO X1 on Rung 1 is correct. You really do not need the C0 contacts on your last 3 rungs for the Light Outputs. Yes it will work with those as they are, but think about it. Do you want to withhold vital information (is the garage full?) from the operator of this parking garage WHEN IN OFF MODE? Why not allow him to see the lights even when not running? They indicate a status or process condition. It is common in industrial plants to leave indicator lights operating, even when the process is OFF.
(Did you look at the program I posted back on Post #13? It had the correct logic.)
Because your STOP pushbutton is Normally Closed, the X1 instruction should be Normally Closed, so that the counter is NOT reset unless the red STOP PB is pressed. In other words, looking at the NC physical pushbutton with an internal NC PLC instruction results in a binary "0" to keep the reset off until the button is pressed, turning OFF the physical contact, but since the internal NC X1 inverts the input, then the internal X1 would go ON when the physical input is OFF.
Now, you need to DELETE the CO in front of the X1, because you want to be able to reset the counter EVEN when your are not in RUN mode. If you leave C0 there (on the 3rd rung branch), then when you press STOP, C0 is deenergized on Rung 1, so on Rung 2, you cannot ever do a reset because C0 is blocking your STOP button on the 3rd rung branch.
I suppose you added this because you were desperate and willing to try anything. Usually that situation results in compounding errors on top or errors, not a good thing. Relax, and step back and try to see the forest and ignore the trees. Try to understand how it WORKS, and you will then be able to make it work.
Your NO X1 on Rung 1 is correct. You really do not need the C0 contacts on your last 3 rungs for the Light Outputs. Yes it will work with those as they are, but think about it. Do you want to withhold vital information (is the garage full?) from the operator of this parking garage WHEN IN OFF MODE? Why not allow him to see the lights even when not running? They indicate a status or process condition. It is common in industrial plants to leave indicator lights operating, even when the process is OFF.
Last edited: