If you have programmed several networks in a POU (instruction list, ladder diagram, function block diagram), they will be processed one by one from top to bottom as illustrated below:
Network processing order
If the status of an input or output changes within a PLC cycle at a position which has already been executed, this status modification will only be detected during the following cycle.
The execution of commands within a network from left to right has 1st priority, from the top to the bottom 2nd priority.