Counter Function of PLC
A programmable logic controller (PLC) or programmable controller is an industrial computer that has been ruggedized and adapted for the control of manufacturing processes, such as assembly lines, machines, robotic devices, or any activity that requires high reliability, ease of programming, and process fault diagnosis. PLCs were first developed in the automobile manufacturing industry to provide flexible, rugged and easily programmable controllers to replace hard-wired relay logic systems. In this article, we will introduce the counter function of PLC.
Use of counter. The counter C00 is cleared in block 000. Add counter C00 at the end of the original program, each time the program runs, the value of the counter C00+1.
Loop instruction, infinite loop starting from 001 program (0000 means infinite loop). Run the program, view monitoring. Each time the program is executed, the value of the counter C00+1.
Add monitoring of C00 counter on the original program. When the value of C00 is greater than 10, the program Task 00 stops running. Task 18, scanner. Add scan, counter C00>10. When C00>10, Task 00 stops running.
Run Task 18 and scan the program. Execute Task 00 program.
Monitor C00 counter. When the 10th program is executed, Task 00 stops running. C00 on the counter shows the current number of runs 11. The application of the counter instruction is completed.
If you want to learn more about programmable timer relay, please click this video or contact us.