Share this

A comprehensive explanation of the basic structure and working principle of PLC

2026-04-06 04:12:31 · · #1

PLC Classification

PLC products come in a wide variety of types, and their specifications and performance vary. PLCs are generally classified according to their structural form, functional differences, and the number of I/O points. 1. Classification by structural form According to the structural form of PLCs, they can be divided into two categories: integrated type and modular type. (1) Integrated type PLC An integrated type PLC integrates the power supply, CPU, I/O interface and other components into one chassis, as shown in the figure. It has the characteristics of compact structure, small size and low price. Small PLCs generally adopt this integrated structure. An integrated type PLC consists of basic units (also known as main units) with different numbers of I/O points and expansion units. The basic unit contains a CPU, I/O interface, expansion port connected to the I/O expansion unit, and interface connected to the programmer or EPROM writer, etc.; the expansion unit only contains I/O and power supply, but no CPU. The basic unit and the expansion unit are generally connected by a flat cable. Integrated type PLCs can also be equipped with special function units, such as analog units, position control units, etc., to expand their functions.

(2) Modular PLC: A modular PLC separates its components into several individual modules, such as a CPU module, I/O modules, a power supply module (sometimes included in the CPU module), and various functional modules. A modular PLC consists of a frame or base plate and various modules, which are mounted in sockets on the frame or base plate, as shown in the figure. The advantages of this type of modular PLC are its flexible configuration, allowing for the selection of systems of different sizes as needed, and its ease of assembly, expansion, and maintenance. Large and medium-sized PLCs generally adopt a modular structure.

Some PLCs combine the features of integrated and modular designs, forming what are known as stacked PLCs. In a stacked PLC, the CPU, power supply, I/O interfaces, etc., are also independent modules, but they are connected by cables, and these modules can be stacked layer by layer. This allows for flexible system configuration and a compact size.

2. Classified by function

Based on their different functions, PLCs can be divided into three categories: low-end, mid-range, and high-end.

(1) Low-end PLC Low-end PLC has basic functions such as logic operation, timing, counting, shifting, self-diagnosis, and monitoring. It can also have a small number of analog input/output, arithmetic operation, data transmission and comparison and communication functions. It is mainly used for single-machine control systems with logic control, sequential control or a small number of analog control.

(2) Mid-range PLC In addition to the functions of low-end PLC, mid-range PLC also has strong functions such as analog input/output, arithmetic operation, data transmission and comparison, number system conversion, remote I/O, subroutine and communication networking; some can also add interrupt control, PID control and other functions, which are suitable for complex control systems.

(3) High-end PLCs: In addition to the functions of mid-range PLCs, high-end PLCs also include functions for signed arithmetic operations, matrix operations, bit logic operations, square root operations, and other special functions, as well as tabulation and table transmission capabilities. High-end PLCs have stronger communication and networking capabilities and can be used for large-scale process control or to form distributed network control systems, thereby realizing factory automation.

3. Classified by number of I/O points

Based on the number of I/O points, PLCs can be divided into three categories: small, medium, and large.

(1) Small PLC: Small PLCs have fewer than 256 I/O points, a single CPU and an 8-bit or 16-bit processor, and user memory capacity of less than 4KB. For example: Mitsubishi FX0S series.

(2) Medium-sized PLC The number of I/O points of a medium-sized PLC is between 256 and 2048. It has dual CPUs and a user memory capacity of 2 to 8KB.

(3) Large-scale PLCs: Large-scale PLCs have more than 2048 I/O points, multiple CPUs, and 16-bit or 32-bit processors. User memory capacity ranges from 8 to 16KB. Globally, PLC products can be divided into three main categories: American, European, and Japanese. American and European PLC technologies were independently researched and developed in isolation, resulting in significant differences between their products. Japanese PLC technology was introduced from the US and inherits some aspects of American PLC products, but Japan primarily focuses on small-scale PLCs. The US and Europe are known for their large and medium-sized PLCs, while Japan is known for its small-scale PLCs. Common PLCs are shown in the table below.

Functions and Applications of PLC

PLCs are designed, manufactured, and developed by combining the advantages of relay and contactor control with the flexibility and convenience of computers. This gives PLCs many features that other controllers cannot match. 1. PLC Functions A PLC is a general-purpose industrial automatic control device with a microprocessor as its core, integrating computer technology, automatic control technology, and communication technology. It has a series of advantages such as high reliability, small size, powerful functions, simple programming, flexibility, versatility, and convenient maintenance. Therefore, it is widely used in metallurgy, energy, chemical industry, transportation, power, and other fields, becoming one of the three pillars of modern industrial control (PLC, robots, and CAD/CAM). Based on the characteristics of PLCs, their functional forms can be summarized into the following types.

(1) Switch logic control PLC has powerful logic operation capabilities and can realize various simple and complex logic controls. This is the most basic and most widespread application area of ​​PLC, which has replaced the control of traditional relay contactors.

(2) Analog control PLC is equipped with A/D and D/A conversion modules. The A/D module can convert analog quantities such as temperature, pressure, flow rate, and speed in the field into digital quantities, which are then processed by the microprocessor in the PLC (the microprocessor can only process digital quantities) and then used for control; or the D/A module can convert them into analog quantities and then control the controlled object. In this way, the PLC can control analog quantities.

(3) Process Control: Modern large and medium-sized PLCs are generally equipped with PID control modules, enabling closed-loop process control. When a variable deviates during the control process, the PLC can calculate the correct output according to the PID algorithm, thereby controlling and adjusting the production process to keep the variable at the set value. Currently, many small PLCs also have PID control functionality.

(4) Timing and Counting Control: PLCs have powerful timing and counting functions, providing users with dozens, hundreds, or even thousands of timers and counters. The timing and count values ​​can be arbitrarily set by the user when writing the user program, or by the operator in the industrial field via a programmer, thus achieving timing and counting control. If the user needs to count high-frequency signals, a high-speed counting module can be selected.

(5) Sequential control in industrial control can be achieved by using PLC step instruction programming or shift register programming.

(6) Data processing Modern PLCs can not only perform arithmetic operations, data transmission, sorting and table lookup, but also data comparison, data conversion, data communication, data display and printing. It has strong data processing capabilities.

(7) Communication and networking

Most modern PLCs employ communication and networking technologies, featuring RS-232 or RS-485 interfaces for remote I/O control. Multiple PLCs can be networked and communicate with each other, enabling program and data exchange between external devices and the signal processing units of one or more programmable controllers, such as program transfer, data transfer, monitoring, and diagnostics. Communication interfaces or processors complete program and data transfer according to standard hardware interfaces or proprietary communication protocols. 2. Application Areas of PLCs Currently, PLCs are widely used both domestically and internationally in various industries, including steel, petroleum, chemical, power, building materials, machinery manufacturing, automotive, textiles, transportation, environmental protection, and cultural entertainment. Their usage can be broadly categorized as follows.

(1) Logic control of switching quantities This is the most basic and most widespread application area of ​​PLC. It replaces the traditional relay circuit to realize logic control and sequential control. It can be used for the control of a single device, as well as for the group control of multiple machines and automated production lines, such as injection molding machines, printing machines, stapling machines, combination machine tools, grinding machines, packaging production lines and electroplating production lines.

(2) Analog Quantity Control: In industrial production processes, there are many continuously changing quantities, such as temperature, pressure, flow rate, liquid level, and speed, which are all analog quantities. In order for PLC to process analog quantities, A/D conversion and D/A conversion between analog and digital quantities must be implemented. PLC manufacturers produce matching A/D and D/A conversion modules to enable PLC to be used for analog quantity control.

(3) Motion control PLCs can be used to control circular or linear motion. In terms of control mechanism configuration, early PLCs were used to directly connect position sensors and actuators to switch I/O modules. Now, dedicated motion control modules are generally used, which can drive single-axis or multi-axis position control modules for stepper motors or servo motors. Products from almost all major PLC manufacturers in the world have motion control functions and are widely used in various machinery, machine tools, robots, elevators, and other applications.

(4) Process Control: Process control refers to the closed-loop control of analog quantities such as temperature, pressure, and flow rate. It has a wide range of applications in metallurgy, chemical engineering, heat treatment, and boiler control. As an industrial control computer, the PLC can program various control algorithms to complete closed-loop control. PID control is a commonly used method in general closed-loop control systems. Large and medium-sized PLCs all have PID modules, and many small PLCs also have this function. PID processing generally involves running a dedicated PID subroutine.

(5) Data Processing: Modern PLCs possess mathematical operations (including matrix operations, function operations, and logical operations), data transmission, data conversion, sorting, table lookup, and bit manipulation functions, enabling them to acquire, analyze, and process data. This data can be compared with reference values ​​stored in memory to perform specific control operations; it can also be transmitted to other intelligent devices using communication functions, or printed into tables. Data processing is generally used in large-scale control systems, such as unmanned flexible manufacturing systems; it can also be used in process control systems, such as some large-scale control systems in the paper, metallurgical, and food industries.

(6) Communication and Networking: PLC communication includes communication between PLCs and communication between PLCs and other intelligent devices. With the development of computer control, factory automation networks are developing rapidly. PLC manufacturers attach great importance to the communication function of PLCs and have launched their own network systems. Newly manufactured PLCs all have communication interfaces, making communication very convenient.

Basic structure and working principle of PLC

As an industrial control computer, a PLC shares a similar structure with a regular computer; however, due to differences in application and purpose, there are some structural differences. 1. PLC Hardware Composition The basic structure of a PLC hardware system is as follows: The PLC host consists of a CPU, memory (EPROM, RAM), input/output units, peripheral I/O interfaces, communication interfaces, and a power supply. For an integrated PLC, all these components are housed in the same casing. For a modular PLC, each component is independently packaged, called a module, and these modules are connected together via a rack and cables. All parts within the host are connected via power buses, control buses, address buses, and data buses. Depending on the needs of the actual controlled object, certain external devices are provided to form different PLC control systems. Commonly used external devices include programmers, printers, and EPROM writers. A PLC can be configured with a communication module to communicate with a host computer and other PLCs, forming a distributed control system. The following sections introduce the components of a PLC and their functions to help users further understand the control principles and working process of a PLC.

(1) CPU The CPU is the control center of the PLC. Under the control of the CPU, the PLC works in an orderly and coordinated manner to control various devices in the field. The CPU consists of a microprocessor and a controller. It can perform logical and mathematical operations and coordinate the work of various parts of the control system. The role of the controller is to control the various components of the entire microprocessor to work in an orderly manner. Its basic function is to read instructions from memory and execute instructions.

(2) Memory: PLCs are equipped with two types of memory: system memory and user memory. System memory stores the system management program; users cannot access or modify the contents of this memory. User memory stores the programmed application programs and operating data status. The user memory section storing operating data status is also called the data storage area, which includes the input/output data image area, the timer/counter preset and current value data area, and a buffer for storing intermediate results. The main types of PLC memory include the following.

(1) Read-only memory

(2) Programmable Read-Only Memory

(3) Erasable Programmable Read-Only Memory

(4) Electrically erasable programmable read-only memory

(5) Random Access Memory

(3) Input/Output (I/O) Modules ① Digital Input Module Digital input devices include various switches, buttons, sensors, etc. The input type of a PLC can typically be DC, AC, or AC/DC. The power supply for the input circuit can be externally supplied, or sometimes internally supplied by the PLC. ② Digital Output Module The function of the output module is to convert the TTL level control signals output by the CPU executing the user program into signals required in the production field to drive specific equipment and thus drive the action of the actuator.

(4) Programmer A programmer is an important external device for a PLC. It allows users to load their programs into the PLC's user program memory, debug the program, and monitor its execution. Programmers can be structurally classified into three types.

(1) Simple programmer (2) Graphical programmer (3) General-purpose computer programmer

(5) Power Supply: The power supply unit converts the external power supply (220V AC power) into the internal operating voltage. The external power supply is converted from AC/DC power to the operating power required by the PLC's internal circuitry (DC 5V, ±12V, 24V) through a dedicated switching power supply within the PLC. It also provides 24V DC power to external input components (such as proximity switches) (for input terminals only). The power supply for driving the PLC load is provided by the user. (6) Peripheral Interface: The peripheral interface circuit is used to connect handheld programmers or other graphic programmers and text displays, and can form a control network for the PLC through the peripheral interface. The PLC connects to a computer via a PC/PPI cable or MPI card through an RS-485 interface, enabling programming, monitoring, and networking functions.

2. PLC Software Components

The software of a PLC consists of system programs and user programs.

The system program is designed and written by the PLC manufacturer and stored in the PLC's system memory; users cannot directly read, write, or modify it. The system program generally includes system diagnostic programs, input processing programs, compilers, information transmission programs, and monitoring programs. The PLC user program is a program written by the user using the PLC's programming language according to control requirements. In PLC applications, the most important aspect is writing the user program using the PLC's programming language to achieve the control objectives. Since PLCs are devices specifically developed for industrial control, their primary users are electrical technicians. To meet their traditional habits and proficiency, the main programming language of PLCs is a specialized language that is relatively simpler, easier to understand, and more intuitive than computer languages. 1. Graphical instruction structure; 2. Explicit variable constants; 3. Simplified program structure; 4. Simplified application software generation process; 5. Enhanced debugging methods.

Basic working principle of PLC

The PLC scanning process mainly consists of three stages: the input sampling stage, the user program execution stage, and the output refresh stage, as shown in the figure.

1. Input Sampling Phase: During the input sampling phase, the PLC sequentially reads all input states and data in a scanning manner and stores them in the corresponding units of the I/O image area. After input sampling is completed, the process transitions to the user program execution and output refresh phases. During these two phases, even if the input states and data change, the states and data in the corresponding units of 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 first scans the control circuit formed by the contacts on the left side of the ladder diagram, performing logical operations on the control circuit in a left-to-right, top-to-bottom order. Then, based on the result of the logical operation, it refreshes the state of the corresponding bit in the system RAM storage area for that logic coil, or refreshes the state of the corresponding bit in the I/O image area for that output coil, or determines whether to execute the special function instruction specified by that ladder diagram. That is, during user program execution, only the state and data of input points in the I/O image area remain unchanged, 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. Furthermore, the program execution result of the ladder diagram above will affect any ladder diagram below that uses those coils or data; conversely, the refreshed state or data of the logic coils in a lower ladder diagram will only affect the ladder diagram above it in the next scan cycle.

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.

Input/output lag

From the PLC's operating process, the following conclusions can be drawn: • When executing a program in a scanning manner, there is a inherent lag in the logical relationship between input/output signals. The longer the scan cycle, the more severe the lag. • The scan cycle includes the time occupied by the three main working stages: input sampling, user program execution, and output refresh, as well as the time occupied by system management operations. The program execution time is related to the program length and the complexity of the instructions, while other aspects remain relatively constant. The scan cycle is typically in the nanosecond range. • When executing the program in the nth scan, the input data used is the scan value X from the sampling stage of that scan cycle, and the output data used includes the output value Y(n-1) from the previous scan and the current output value Yn; the signal sent to the output terminal is the final result Yn after all operations are performed in this scan. • Input/output response lag is not only related to the scanning method but also to the program design and arrangement.

Read next

CATDOLL 138CM Yana (TPE Body with Soft Silicone Head)

Height: 138cm Weight: 26kg Shoulder Width: 30cm Bust/Waist/Hip: 65/61/76cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal ...

Articles 2026-02-22