11

Unlocking the Power of Flow Control

So far in this book, we’ve only explored programs with a linear flow. That is, all the programs that we explored have started at the top and ended at the bottom. No matter what, this is the natural flow of all software. However, the route we take to get to the bottom will often vary.

Typically, a program will have no one defined path to the bottom. A program will usually branch off into multiple paths to get to the bottom. These paths will have different logic that will be executed, which will alter the program’s behavior depending on which path it takes. To conceptualize this, consider the logic that turns on a motor. The type of VDF a customer chooses will often dictate a start sequence. A quality program ...

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.