The CTU, also known as the Count Up, instruction is used in pair with a Counter construct to count the number of LOW to HIGH transitions of the preceding logic. The CTU instruction will increment the “Accum” value each time the logic which leads into it is set to TRUE. Unline the Timer Instruction, the CTU will not keep incrementing until the rung is set to LOW and comes back to being HIGH. This critical element of ladder logic programming allows a programmer to keep track of how many products have passed a certain sensor, how many revolutions have been made by a certain motor, how many times a certain alarm was set and so on. It’s a widely used instruction which is extremely versatile and easy to work with.
This is a companion discussion topic for the original entry at https://www.solisplc.com/tutorials/plc-programming-intermediate-instructions-ctu-count-up