![ladder logic program repeat cycle ladder logic program repeat cycle](https://aws1.discourse-cdn.com/arduino/original/4X/1/f/d/1fd00570fbee88ba2f33746b3b24a5d910849225.jpeg)
The production and consumption of information is scheduled within each input/output (I/O) card by setting what is known as a requested packet interval (RPI). The CPU can then be said to "consume" information, and the output cards consume information from the CPU. This platform works on a producer-consumer model where input cards produce information for CPUs, and the CPU produces information for the output cards.
![ladder logic program repeat cycle ladder logic program repeat cycle](https://library.automationdirect.com/wp-content/uploads/2015/01/Ladder-Diagram2.jpg)
And while scanning works the way described for every platform, this is an exception, as shown by A, B, and C. In Figure 1, the scan time is shown as 56 ms, but this is a pretty big program. Beyond 50 ms the effect on output reaction for a machine control project starts to be noticeable for a process control project this may not matter.
LADDER LOGIC PROGRAM REPEAT CYCLE CODE
If the scan time is longer than about 50 ms (for a machine control project) then the user should be looking for a more powerful processor or ways to make the code more efficient. There is usually documentation available indicating the execution time for different instructions, but there’s no point in trying to add up all of the code to make an estimate on length. All of this has an effect on the total scan time. Sometimes programmers will use loops in the program or make repetitive calls to the same routines. How long does this take? That depends on the platform (speed of the processor), how much code there is in the program, and the types of instructions used. This is illustrated by Figure 1, which shows the results. After executing all of the code, evaluating the logic, and updating all of the tables (except for the input tables, which were written at the beginning of the scan), the resulting output table or register contents are written to the physical outputs. Most programs use a continuous program configuration that runs as fast as it can. It should be noted that some programs, however, run on a periodic basis instead of a continuous program. Most programs use an initial cyclic routine that is used to call all of the other routines. In either case, the program meanders through the different routines as they are called before returning to wherever they were called from and eventually ends up at the end of the original cyclic routine.