Organise with routines
MainRoutine runs every scan by itself. Other routines run where a CALL runs them.
Why
- A MainRoutine that only calls routines reads like a table of contents: Inputs, Modes, Filling, Mixing, Alarms, Outputs.
- The order of the CALLs is the order the parts run in each scan.
- A CALL with a condition, such as auto mode, skips a whole routine when it is not needed.
- A routine nothing calls never runs. Project Explorer marks it, and the Problems tab lists it.