A PLC operates in one of two modes:
Download the user’s program from the programming device to the memory of the PLC.
Execute the user’s program using the scan-based execution model, in three phases.
- Read the state of the inputs and store them in the RAM referred to as the input image memory.
- Execute the user’s program and update the state of the outputs in the RAM (output image memory).
- Copy the states of the outputs from the RAM to the physical output devices.
The time needed to complete one scan cycle depends on the length and complexity of the user‘s program.
PLC manufacturers specify the maximum number of program steps (say 1000) and the average scan time (few ms).