Welcome Back, Hugh!
Jim,
As far as having flags going here, flags going there, flags apparently going everywhere...
Flags are good... in fact, flags are excellent... that is, if they are "meaningful" in terms of the process.
Very small programs might not need to be "modularized" simply because they are so small - there is only one module. At the other extreme, there are incredibly huge programs that absolutely MUST be modularized (that is, if you want to maintain any kind of sanity).
If modules are properly derived... that is, if you draw the line separating modules in the right place, then any given module should be nearly complete unto itself. The module is "aware" of the status of all inputs/outputs associated with the particular module. However, at this point, the module can not function.
The module is almost ready to go... it just needs to have a little more information... things like...
Hey! Down-Line Module, are you ready for me to operate?
Hey, Up-Line Module, Whaz-up?
Those are flags... flags are good.
There is another thread ("skip process detection problem") where three processes, on three different PLC's, in the same machine, are allowed to operate out of sequence... no control flags. My answer to that thread provided "flags". If you read the thread, I think you'll see the merit of flags.
Think of it this way...
Several houses along a street. All of the residents are involved in some kind of process from House-1 to House-X.
Each house represents a module. Within each house/module, a certain action is performed. House number-3 does not need to know what is going on inside of house number-2. That doesn't mean that they aren't friendly neighbors... they do "talk" to each other. They "talk" by flags, or status messages.
I will go so far as to say...
...a well designed system consists of a certain number of modules...
...by themselves, none of these modules can function (subject to circumstance)...
...the "flags" make it all happen...
In other words...
while a system is "ready to go", simply walking up to and manually tripping a limit switch, in the middle of some module, in the middle of the process, does NOT cause anything to happen!
Why "Slice the Pickle" if there is no pickle?
Why "Hand-Off" something when there is nothing to hand-off?
A properly designed system "KNOWS" if the tripped limit switch is valid or not, and then what action to take or not take. This "Knowledge" is passed between modules by flags... flags are good!