On a large malt-handling installation, I developed a "handler" subroutine for the conveyors (this was pre-AOI days).
The handler was similar to a motor handler, with the addition of control inputs/outputs that could be daisy-chained in the control code.
These were...
Inputs...
DSR : Downstream running
USR : Upstream running
Outputs...
DSE : Downstream enable
USE : Upstream enable
You simply connected...
USE of the "fed" device to the DSR of the "feeding" device
USR of the "fed" device to the DSE of the "feeding" device
Logic "1" had to be applied to the DSR of the lowest device, and a logic "0" to the USR of the highest device.
Notice that I am now referring them to "devices", not just conveyors, because the handler could also be used for gate valves, rotary valves, diverters, inline tip-weighers, stone separators, and just about anything in the "stream".
The handling routine incorporated all the start-up delays, in-flight emptying delays, etc. as parameters, so each piece of kit looked after itself.
A huge advantage of this method was that to start a conveyor run to deliver product from a specified storage silo to its destination, you just programmed to turn on
all of the devices at the same time, and the in-built interlocking logic and timing meant that the flight started in proper sequence.
Turn off all the devices simultaneously, and they stopped in proper sequence, running-on for their own individual "in-flight" times to empty each section before stopping.
Route-changes were easy too. Simply instantaneously change the "start" inputs to all the devices, and it would shut-down in sequence to the common point, then the new upstream route would start-up in sequence.
A fault on any device would immediately stop all upstream devices, and the downstream devices would shut-down normally with their respective in-flight delays. The flight could be restarted at any time, without having to wait for the shut-down to complete (start-up delays would work as normal).
All of the interlocking code was therefore built into the handler, you just had to make the device-to-device connections as above to make it all work, and I have to say it worked perfectly, and is in use in several similar installations...
Obviously for commercial/copyright/legal reasons I cannot post the code, even if I had it, I have just described it from memory to give an example of a different way of sequencing conveyors etc.
This serves as a practical example of what is taught on many PLC programming courses - separate the "procedural control" from the "equipment control". In this case, the procedural control calls for a specified material handling route to start, and the equipment control makes it happen in the correct manner.
The pic may help....