13

Implementing Tight Loops

Almost every program, regardless of whether it is a PLC program or a normal application, will loop in some fashion. If a PLC program did not loop, it would be relatively worthless because unless the operators had near-perfect timing for starting an operation, the program would almost immediately stop. Even if the operator did manage to kickstart a run, as soon as the program reached its final command, it would stop. Without some type of loop, a PLC program would be relatively useless.

PLCs will often implement a loop that will iterate over a program and prevent the PLC program from needing to be restarted. However, programmers will often need loops to be a bit more specific. More specifically, a programmer will often ...

Get PLCs for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.