A programmable logic controller (PLC) is a digital computing electronic system designed specifically for use in industrial environments.
It utilizes a programmable memory that stores instructions for performing various operations, including logic operations, sequence control, timing, counting, and arithmetic operations. This memory controls different types of mechanical equipment or production processes via digital or analog input and output.
The technical requirements for the production of the US automotive industry have played a crucial role in promoting the development of Programmable Logic Controllers (PLC).
During the 1960s, General Motors Corporation faced several challenges with the relay and contactor control system. They were difficult to modify, large in size, loud, inconvenient to maintain, and had poor reliability. To address these issues, the famous “General Ten” bidding index was proposed.
In 1969, the American Digital Equipment Corporation developed the first PLC (PDP-14), which showed significant improvements after trials on GM’s production line. Japan developed the first PLC (DCS-8) in 1971, followed by Germany in 1973 and China in 1974. The original purpose was to replace the mechanical switching device (relay module).
Since 1968, the functionality of the PLC has gradually replaced the relay control board. In 1977, China promoted the use of PLCs in industrial applications. Today, modern PLCs have more features, and their use extends from single process control to controlling and monitoring the entire manufacturing system.
Microprocessors first emerged in the early 1970s. They were quickly integrated into programmable logic controllers, which added functions like calculation, data transfer and processing, and gave industrial control devices true computer-like characteristics.
At that time, the programmable logic controller was a blend of microcomputer technology and the traditional control concept of the relay. Later, with the advent of personal computers, the term Programmable Logic Controller (PLC) was coined to reflect and simplify the functional characteristics of these controllers.
In the mid-to-late 1970s, programmable logic controllers entered the practical development stage. The incorporation of computer technology revolutionized the function of these controllers, giving them a significant boost. With features like higher computing speed, ultra-small size, reliable industrial anti-jamming design, analog computing, PID function, and high cost performance, they quickly established their position in modern industry.
In the early 1980s, programmable logic controllers (PLCs) were widely adopted in advanced industrial countries. Since then, the number of countries producing PLCs has increased, and production has expanded, marking the beginning of the mature stage of this technology.
Between the 1980s and the mid-1990s, PLCs experienced their fastest period of growth, with an annual growth rate of 30-40%. During this time, PLCs significantly improved their ability to handle analog and digital computing, human-machine interface, and network capabilities.
PLCs began to replace DCS systems in some applications and gradually entered the field of process control. By the end of the 20th century, the development of PLCs had become more tailored to the needs of modern industry.
Mainframes and ultra-small machines were developed, special functional units were created, and various human-machine interface and communication units were produced. These advancements made it easier to apply industrial control equipment for programmable logic controllers.
A programmable logic controller (PLC) is essentially a computer designed specifically for industrial control purposes. Its hardware structure is similar to that of a microcomputer, and its basic architecture comprises:
1. Power Supply
The power supply converts AC power to the DC power required by the PLC. Nowadays, most PLCs use a switching regulator for power supply.
2. Central Processing Unit (CPU)
The central processing unit is the control center and the core component of the PLC. Its performance determines the overall performance of the PLC. The central processor comprises the controller, operator, and registers. These circuits are integrated into one chip and connected to the input/output interface circuit and memory through the address bus and control bus.
The central processor is responsible for processing and executing user programs, performing logical and mathematical operations, and controlling the entire system to ensure proper coordination.
Memory is a semiconductor circuit with memory functions. Its role is to store system programs, user programs, logic variables, and other information.
The system program is a program that controls the PLC to implement various functions. It is written by the PLC manufacturer and solidified into read-only memory (ROM), which the user cannot access.
4. Input unit
The input unit serves as an interface between the PLC and the controlled device and is a bridge for signals to enter the PLC. Its role is to receive signals from the master and detection components.
The input types include DC input, AC input, and AC/DC input.
5. Output Unit
The output unit serves as a connection between the PLC and the controlled device. Its primary function is to transmit the output signal of the PLC to the controlled device, which involves converting the weak electrical signal sent by the central processor into a level signal that can drive the actuator of the controlled device.
The types of outputs typically used in a PLC include relay output, transistor output, and gate output. Depending on the model, a PLC may also have various external devices to assist with programming, monitoring, and network communications. Some commonly used external devices include programmers, printers, cassette tape recorders, and computers.
When the programmable logic controller is operational, it typically undergoes three stages: input sampling, user program execution, and output refresh. These three stages collectively constitute a scan cycle.
Throughout its operation, the CPU of the programmable logic controller repeatedly performs these three stages at a specific scan speed.
1. The Input Sampling Stage
During the input sampling stage, the programmable logic controller (PLC) reads all input states and data sequentially in scan mode and stores them in the corresponding cells in the I/O map area.
Once the input sampling stage is complete, the data is transferred to the user program execution and output refresh stage.
During both stages, changes may occur in the input state and data.
However, the status and data of the corresponding unit in the I/O map area will remain unchanged.
Therefore, if the input is a pulse signal, its width must be greater than one scan period to ensure that the input can be read in all cases.
2. The User Program Execution Stage
During the user program execution phase, the programmable logic controller scans the user program (ladder) from top to bottom.
When scanning each ladder diagram, the control lines formed by the contacts on the left side of the ladder diagram are scanned first, and the control lines formed by the contacts are logically operated in the order of left to right and then up to down.
After that, the programmable logic controller refreshes the state of the corresponding bit of the logic coil in the system RAM storage area according to the result of the logic operation. Alternatively, it refreshes the state of the corresponding bit of the output coil in the I/O image area. The controller may also determine whether to execute the special function instructions specified by the ladder diagram.
During the execution of the user program, the state and data of the input point in the I/O map area do not change, while other output points and soft devices in the I/O map area or the system RAM storage area may change in status and data.
Furthermore, in addition to the ladder diagrams mentioned earlier, the program execution results will function with the ladder diagrams that use the coils or data listed below.
On the other hand, in the ladder diagram below, the state or data of the updated logic coil can only be processed in the next scan cycle to function with the program listed above.
I/O points can be directly accessed if immediate I/O instructions are used during program execution.
Even if I/O instructions are used, the value of the input process image register will not be updated. The program will directly receive values from the I/O module, and the output process image registers will be updated immediately.
This is somewhat different from typing immediately.
3. The Output Refresh Phase
After the scanning user program concludes, the programmable logic controller enters the output refresh phase. During this phase, the CPU updates all the output latch circuits based on the corresponding state and data in the I/O map area, and activates the relevant peripherals via the output circuit.
This stage reflects the actual output of the programmable logic controller.