Share this

Detailed Explanation of the Working Principle and Operation of PLC Controllers

2026-04-06 05:07:21 · · #1

PLC controllers are widely used in industrial control. The following explains the working principle and operation of a PLC controller:

Working principle of PLC controller

Scanning technology

Once a PLC is put into operation, its working process generally consists of three stages: input sampling, user program execution, and output refresh. The completion of these three stages is called one scan cycle. Throughout the entire operation, the PLC's CPU repeatedly executes these three stages at a certain scan speed.

1. Input Sampling Phase

The PLC sequentially reads all input states and data in a scanning manner and stores them in the corresponding cells of the I/O image area. After input sampling is completed, it proceeds to the user program execution and output refresh stages. During these two stages, even if the input states and data change, the states and data of the corresponding cells in the I/O image area will not change. Therefore, if the input is a pulse signal, the width of the pulse signal must be greater than one scan cycle to ensure that the input can be read under any circumstances.

2. User program execution phase

During the user program execution phase, the PLC always scans the user program (ladder diagram) sequentially from top to bottom. When scanning each ladder diagram, it always first scans the control circuit composed of each contact on the left side of the ladder diagram, and performs logical operations on the control circuit composed of contacts in the order of left to right and top to bottom. Then, based on the result of the logical operation, it refreshes the state of the corresponding bit in the system RAM storage area of ​​the logic coil; or refreshes the state of the corresponding bit in the I/O image area of ​​the output coil; or determines whether to execute the special function instruction specified by the ladder diagram.

That is, during the execution of the user program, only the state and data of the input points in the I/O image area will not change, while the state and data of other output points and soft devices in the I/O image area or system RAM storage area may change. Moreover, the program execution result of the ladder diagram above will affect the ladder diagram below that uses these coils or data; conversely, the state or data of the logic coils of the ladder diagram below can only affect the program above it in the next scan cycle.

During program execution, if immediate I/O instructions are used, I/O points can be accessed directly. Even when using I/O instructions, the value of the input process image register will not be updated; the program directly retrieves the value from the I/O module. The output process image register will be updated immediately, which is somewhat different from immediate input.

3. Output refresh phase

After the user program scan is complete, the PLC enters the output refresh phase. During this period, the CPU refreshes all output latch circuits according to the corresponding states and data in the I/O image area, and then drives the corresponding peripherals through the output circuits. This is when the PLC actually outputs data.

How PLC controllers operate

Although the ladder diagram programs used by PLCs often employ names such as relays, timers, and counters, these devices are not physically present within the PLC itself. Instead, logic control is edited using memory and programming, and external mechanical devices are connected via output elements for physical control. This significantly reduces the hardware space required by the controller. In practice, the PLC executes the ladder diagram program by scanning the code line by line into the CPU and then executing the control operation. The entire scanning process includes three main steps: "input status check," "program execution," and "output status update," which are explained below:

Step 1 "Input Status Check": The PLC first checks the status of each switch or sensor connected to the input terminal component (1 or 0 represents on or off) and writes its status into the corresponding location Xn in memory.

Step Two, "Program Execution": The ladder diagram program is fetched line by line into the CPU for calculation. If the program execution requires input of contact status, the CPU directly retrieves it from memory. The calculation result of the output coil is stored in the corresponding location in memory and is not reflected at the output terminal Yn for the time being.

Step 3, "Output Status Update": Update the output status from Step 2 to the PLC output contacts, and then return to Step 1. These three steps are called the PLC scan cycle, and the time required to complete them is called the PLC response time. If the PLC input signal response time is less than this response time, there is a possibility of misreading. The output and input status are updated once after each program execution and before the next program execution; therefore, this operation mode is called "program end regeneration" of the output and input terminals.

Read next

CATDOLL Jo Hard Silicone Head

The head made from hard silicone does not have a usable oral cavity. You can choose the skin tone, eye color, and wig, ...

Articles 2026-02-22