Function of PLC
Read all field input devices via the input interfaces, execute the user program stored in application memory, then, based on whatever control scheme has been programmed by the user, turn the field output devices on or off, or perform whatever control is necessary for the process application.
This process of sequentially reading the inputs, executing the program in memory, and updating the outputs is known as scanning.
While the PLC is running, the scanning process includes the following four phases, which are repeated continuously as individual cycles of operation:
PHASE 1 – Input Status scan
- A PLC scan cycle begins with the CPU reading the status of its inputs.
PHASE 2– Logic Solve/Program Execution
- The application program is executed using the status of the inputs
PHASE 3– Logic Solve/Program Execution
- Once the program is executed, the CPU performs diagnostics and communication tasks
PHASE 4 - Output Status Scan
- An output status scan is then performed, whereby the stored output values are sent to actuators and other field output devices. The cycle ends by updating the outputs.
As soon as Phase 4 are completed, the entire cycle begins again with Phase 1 input scan.
The time it takes to implement a scan cycle is called SCAN TIME. The scan time composed of the program scan time, which is the time required for solving the control program, and the I/O update time, or time required to read inputs and update outputs.
The program scan time generally depends on the amount of memory taken by the control program and type of instructions used in the program. The time to make a single scan can vary from 1 ms to 100 ms.