Products Catalogue Home     |     About Us    |     Retrofit     |     Download     |     News     |     Tech Support     |     Contact Us     |     
ppr fittings-NF-4011-Newsun Industry Co., Ltd
Home > Tech Support >

What is PLC

PLC is a microprocessor based, integrated computer technology, automatic control technology and communication technology. It uses user-oriented "natural language" programming for the control process, adapts to the industrial environment, is simple and easy to understand, easy to operate, and highly reliable. A generation of general industrial control devices.
 
PLC is a general-purpose automatic control device with microprocessor as the core developed on the basis of relay sequence control.
 
1. Definition of PLC
 
Programmable controller is a kind of digital operation electronic system, specially designed for application in industrial environment.
 
It uses a programmable memory to store operating instructions such as logic operations, sequence control, timing, counting, and arithmetic operations in its internal storage, and through digital and analog input and output, control various types of machinery or production process.
 
The programmable controller and its related peripheral equipment should be designed according to the principle of being easy to form a whole with the industrial control system and easy to expand its functions.
 
2. Classification of PLC
 
There are many types of PLC products, and their specifications and performance are also different. For PLC, it is usually classified roughly according to its structure, function difference, and I/O points.
 
2.1 Classification by structure
 
According to the structure of PLC, PLC can be divided into integral type and modular type.
 
(1) Integral PLC
 
Integral PLC is a combination of power supply, CPU, I/O interface and other components in a box, which has the characteristics of compact structure, small size and low price. Small PLCs generally adopt this integral structure.
 
The integral PLC is composed of a basic unit (also called a host) with different I/O points and an expansion unit. The basic unit has a CPU, an I/O interface, an expansion port connected to the I/O expansion unit, and a programmer or EPROM write The interface connected to the receiver; there are only I/O and power supply in the expansion unit, but no CPU.
 
The basic unit and the expansion unit are generally connected by a flat cable. Integral PLCs can generally be equipped with special function units, such as analog units, position control units, etc., to expand their functions.
 
 
 
 
 
 
 
 
 
 
2) Modular PLC
 
Modular PLC makes each component of PLC into several separate modules, such as CPU module, I/O module, power module (some included in CPU module) and various functional modules. Modular PLC consists of a frame or base plate and various modules. The modules are installed on the socket of the frame or base plate, as shown in the figure.
 
This kind of modular PLC is characterized by flexible configuration, different scale systems can be selected according to needs, and easy assembly, easy expansion and maintenance. Large and medium-sized PLCs generally adopt a modular structure.
 
 
 
 
 
 
 
 
 
 
There are also some PLCs that combine the characteristics of integrated and modular to form a so-called stacked PLC.
 
The CPU, power supply, I/O interface of the stacked PLC are also independent modules, but they are connected by cables, and each module can be stacked layer by layer. In this way, not only the system can be flexibly configured, but also can be made compact.
 
2.2 Classification by function
 
According to the different functions of PLC, PLC can be divided into low-grade, middle-grade and high-grade.
 
(1) Low-grade PLC
 
Low-end PLC has basic functions such as logic operations, timing, counting, shifting, self-diagnosis, monitoring, etc. It can also have a small amount of analog input/output, arithmetic operations, data transmission and comparison, and communication. It is mainly used for logic control and sequence Single-machine control system for control or a small amount of analog control.
 
(2) Mid-range PLC
 
In addition to the functions of low-end PLCs, mid-range PLCs also have strong analog input/output, arithmetic operations, data transmission and comparison, number system conversion, remote I/O, subroutines, and communication networking functions; some can be added Interrupt control, PID control and other functions are suitable for complex control systems.
 
(3) High-end PLC
 
In addition to the functions of mid-range PLC, high-end PLC also adds signed arithmetic operations, matrix operations, bit logic operations, square root operations and other special function functions, tabulation and table transmission functions.
 
High-end PLC has a stronger communication networking function, can be used for large-scale process control or form a distributed network control system, and then realize factory automation.
 
2.3 Classification by I/O points
 
According to the number of I/O points of the PLC, the PLC can be divided into three categories: small, medium and large.
 
(1) Small PLC
 
The number of I/O points of a small PLC is less than 256, with a single CPU and 8-bit or 16-bit processor, and the user memory capacity is less than 4KB.
 
(2) Medium PLC
 
The number of I/O points of the medium-sized PLC is 256-2048, with dual CPUs, and the user memory capacity is 2-8KB.
 
(3) Large PLC
 
The number of I/O points of a large PLC is greater than 2048, with multiple CPUs and 16-bit or 32-bit processors, and the user memory capacity is 8-16KB.
 
In the world, PLC products can be divided into three major genres by region, one genre is American products, one genre is European products, and the other is Japanese products.
 
The PLC technology of the United States and Europe are independently researched and developed in isolation, so there are obvious differences between the PLC products of the United States and Europe.
 
The Japanese PLC technology was introduced by the United States, which has a certain inheritance to American PLC products, but Japan's main products are positioned on small PLCs. The United States and Europe are famous for large and medium PLCs, while Japan is famous for small PLCs.
 
2. PLC function and application field
 
PLC is designed, manufactured and developed by integrating the advantages of relay contactor control and the flexibility and convenience of computers. This makes PLC have many characteristics that other controllers cannot compare.
 
1. PLC function
 
PLC is a general-purpose industrial automatic control device developed with a microprocessor as the core and integrated computer technology, automatic control technology and communication technology. It has high reliability, small size, strong functions, simple program design, flexible and universal With a series of advantages such as convenient maintenance, it has a wide range of applications in metallurgy, energy, chemical industry, transportation, electric power and other fields, and has become one of the three pillars of modern industrial control (PLC, robot, and CAD/CAM). According to the characteristics of PLC, its functional form can be summarized into the following types.
 
(1) Switch logic control
 
PLC has a powerful logic operation capability, which can realize various simple and complex logic control. This is the most basic and most extensive application area of ​​PLC, which replaces the traditional relay contactor control.
 
(2) Analog quantity control
 
The PLC is equipped with A/D and D/A conversion modules. The A/D module can convert the field temperature, pressure, flow, speed and other analog quantities into digital quantities, and then process them by the microprocessor in the PLC (the microprocessor can only process digital quantities), and then perform control;
 
Or it can be converted into an analog quantity by the D/A module, and then the controlled object can be controlled, so that the PLC can control the analog quantity.
 
(3) Process control
 
Modern large and medium-sized PLCs are generally equipped with PID control modules, which can perform closed-loop process control. When there is a deviation in a variable in the control process, the PLC can calculate the correct output according to the PID algorithm, and then control and adjust the production process to keep the variable at the set value. At present, many small PLCs also have PID control functions.
 
(4) Timing and counting control
 
PLC has strong timing and counting functions, it can provide users with dozens or even hundreds or thousands of timers and counters.
 
The timing and count value can be arbitrarily set by the user when writing the user program, or can be set by the operator at the industrial site through the programmer to realize the timing and count control. If users need to count higher frequency signals, they can choose a high-speed counting module.
 
(5) Sequence control
 
In industrial control, you can use PLC step instruction programming or shift register programming to achieve sequential control.
 
(6) Data processing
 
Modern PLC can not only perform arithmetic operations, data transmission, sorting and table lookup operations, but also data comparison, data conversion, data communication, data display and printing, etc. It has strong data processing capabilities.
 
(7) Communication and networking
 
Most modern PLCs use communication and network technology, with RS-232 or RS-485 interfaces, and can be remotely controlled by I/O.
 
Multiple PLCs can be networked and communicated with each other. Programs and data can be exchanged between external devices and the signal processing unit of one or more programmable controllers, such as program transfer, data file transfer, monitoring and diagnosis. The communication interface or communication processor completes the transfer of programs and data according to a standard hardware interface or a proprietary communication protocol.
 
2. Application field of PLC
 
At present, PLC has been widely used in various industries such as steel, petroleum, chemical, electric power, building materials, machinery manufacturing, automobiles, textiles, transportation, environmental protection, culture and entertainment at home and abroad. The usage can be roughly summarized into the following categories.
 
(1) Logic control of switch
 
This is the most basic and most extensive application field of PLC. It replaces the traditional relay circuit and realizes logic control and sequence control;
 
It can be used for the control of a single device, but also for multi-machine group control and automated assembly lines, such as injection molding machines, printing presses, staplers, modular machine tools, grinders, packaging production lines, and electroplating lines.
 
(2) Analog quantity control
 
In the industrial production process, there are many continuously changing quantities, such as temperature, pressure, flow, liquid level and speed, etc., which are all analog quantities. In order for the PLC to process analog quantities, it is necessary to realize A/D conversion and D/A conversion between analog and digital quantities. PLC manufacturers all produce supporting A/D and D/A conversion modules to use PLC for analog control.
 
(3) Motion control
 
PLC can be used for circular motion or linear motion control. In terms of control mechanism configuration, in the early days it was directly used for switch I/O modules to connect position sensors and actuators. Now, dedicated motion control modules are generally used, which can drive single-axis or multi-axis position control modules of stepper motors or servo motors .
 
Almost all the products of major PLC manufacturers in the world have motion control functions, which are widely used in various machinery, machine tools, robots, elevators and other occasions.
 
(4) Process control
 
Process control refers to the closed-loop control of analog variables such as temperature, pressure, flow, etc. It is widely used in metallurgy, chemical industry, heat treatment, boiler control and other occasions. As an industrial control computer, PLC can compile various control algorithm programs to complete closed-loop control.
 
PID adjustment is the most commonly used adjustment method in general closed-loop control systems. Large and medium-sized PLCs have PID modules. At present, many small PLCs also have this function module. PID processing is generally to run a dedicated PID subroutine.
 
(5) Data processing
 
Modern PLC has functions such as mathematical operations (including matrix operations, function operations, and logic operations), data transmission, data conversion, sorting, table lookup and bit operations, and can complete data collection, analysis and processing. These data can be compared with the reference values ​​stored in the memory to complete certain control operations; they can also be transmitted to other smart devices using the communication function, or they can be printed and tabulated.
 
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 papermaking, metallurgy, 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, the factory automation network has developed rapidly. PLC manufacturers attach great importance to the communication function of PLC and have launched their own network systems.
 
All newly produced PLCs have communication interfaces, which makes communication very convenient. Have launched their own network systems. All newly produced PLCs have communication interfaces, which makes communication very convenient.
 
3. The basic structure and working principle of PLC
 
As a kind of industrial control computer, PLC and ordinary computer have a similar structure; however, there are some differences in structure due to different use occasions and purposes.
 
1. PLC hardware composition
 
The basic structure diagram of PLC hardware system is shown in the figure.
 
 
 
 
 
 
 
In the figure, the PLC host is composed of CPU, memory (EPROM, RAM), input/output unit, peripheral I/O interface, communication interface and power supply. For an integral PLC, these components are all in the same chassis.
 
For a modular PLC, each component is packaged independently, called a module, and each module is connected together by a rack and a cable.
 
All parts in the host are connected by power bus, control bus, address bus and data bus, and are equipped with certain external equipment according to the actual control object's needs to form different PLC control systems.
 
Commonly used external devices are programmers, printers, EPROM writers, etc. The PLC can be configured with communication modules to communicate with the host computer and other PLCs to form a PLC distributed control system.
 
The following introduces the various components of PLC and their functions, so that users can further understand the control principle and working process of PLC.
 
(1) CPU
 
The CPU is the control center of the PLC, and the PLC coordinated work methodically under the control of the CPU, so as to realize the control of various devices on the scene. The CPU is composed of a microprocessor and a controller, which can implement logical operations and mathematical operations, and coordinate the work of various parts of the control system.
 
The function 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 and execute instructions from the memory.
 
(2) Memory
 
PLC is equipped with two kinds of memory, namely system memory and user memory. The system memory is used to store system management programs, and users cannot access and modify the contents of this part of the memory.
 
The user memory is used to store the programmed application programs and working data status. The part of the user memory that stores the working data status is also called the data storage area. It includes the input/output data image area, the timer/counter preset number and current value data area, and the buffer area for storing intermediate results.
 
The memory of PLC mainly includes the following kinds.
 
(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) module
 
①Switch input module
 
Switch input devices are various switches, buttons, sensors, etc. The input type of PLC can usually be DC, AC, and AC/DC. The power of the input circuit can be supplied externally, and some can also be provided internally by the PLC.
 
②Switch output module
 
The function of the output module is to convert the TTL level control signal output by the CPU executing the user program into the signal required by the production site, which can drive the signal of a specific device to drive the action of the actuator.
 
(4) Programmer
 
The programmer is an important external device of the PLC. The programmer can be used to send the user program to the user program memory of the PLC to debug the program and monitor the execution of the program process. The programmer can be divided into the following three types from the structure.
 
(1) Simple programmer
(2) Graphical programmer
(3) Universal computer programmer
 
(5) Power supply
 
The function of the power supply unit is to convert the external power supply (220V AC power) into an internal working voltage. The externally connected power supply converts the AC/DC power supply into the working power supply (DC 5V, ±12V, 24V) required by the internal circuit of the PLC through a special switching power supply equipped inside the PLC, and is an external input component ( Such as proximity switch) provide 24V DC power supply (only for input terminal use). The power supply to drive the PLC load is provided by the user.
 
(6) Peripheral interface
 
The peripheral interface circuit is used to connect a handheld programmer or other graphical programmers and text displays, and can form a PLC control network through the peripheral interface. PLC uses PC/PPI cable or MPI card to connect with computer through RS-485 interface, which can realize programming, monitoring, networking and other functions.
 
2. PLC software composition
 
The software of PLC is composed of system program and user program.
 
The system program is designed and written by the PLC manufacturer and stored in the system memory of the PLC. The user cannot directly read, write or modify. System programs generally include system diagnostic programs, input processing programs, compiler programs, information transmission programs, and monitoring programs.
 
The user program of the PLC is a program prepared by the user using the programming language of the PLC according to the control requirements. In the application of PLC, the most important thing is to use PLC programming language to write user programs to achieve control purposes.
 
Since PLC is a device specially developed for industrial control, its main users are electrical technicians. In order to meet their traditional habits and mastery ability, the main programming language of PLC is relatively simpler, easier to understand, and dedicated than computer languages. Language.
 
1. Graphical instruction structure
2. Clear variable constants
3. Simplified program structure
4. Simplify the application software generation process
5. Strengthen debugging methods
 
3. The basic working principle of PLC
 
The working mode of PLC scanning is mainly divided into three stages, namely the input sampling stage, the user program execution stage and the output refresh stage. as the picture shows:
 
 
 
 
 
 
 
1. Input sampling stage
 
In the input sampling stage, the PLC reads in all input states and data sequentially in a scan mode and stores them in the corresponding units in the I/O image area. After the input sampling is over, it goes to the user program execution and output refresh stage. In these two stages, even if the input status and data change, the status and data of the corresponding unit 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 period to ensure that the input can be read under any circumstances.
 
2. User program execution stage
 
In the user program execution stage, the PLC always scans the user program (ladder diagram) sequentially from top to bottom. When scanning each ladder diagram, the control circuit formed by the contacts on the left side of the ladder diagram is always scanned first, and logic operations are performed on the control circuit formed by the contacts in the order of left and right, up and down; Then, according to the result of the logic operation, refresh the state of the corresponding bit of the logic coil in the system RAM storage area, or refresh the state of the corresponding bit of the output coil in the I/O image area, or determine whether to execute the ladder diagram Special function instructions.
 
That is, during the execution of the user program, only the state and data of the input point in the I/O image area will not change, while the status of other output points and software devices in the I/O image area or system RAM storage area And the data may change, and the ladder diagram ranked above, the program execution results will affect all the ladder diagrams that use these coils or data; on the contrary, the ladder diagram ranked below will be The state or data of the refreshed logic coil can only work on the ladder diagram arranged above it in the next scan cycle.
 
3. Output refresh stage
 
After the user program scans, the PLC enters the output refresh phase. During this period, the CPU refreshes all output latch circuits according to the corresponding status and data in the I/O image area, and then drives the corresponding peripherals through the output circuit. At this time, it is the real output of the PLC.
 
Input/output hysteresis
 
From the working process of PLC, the following conclusions can be summarized:
 
1. The program is executed in a scan mode, and the logical relationship between its input/output signals is lagging in principle. The longer the scan period, the more serious the hysteresis.
2. In addition to the time occupied by the three main working phases of the input sampling phase, the user program execution phase, and the output refresh phase, the scan cycle also includes the time occupied by system management operations. Among them, the execution time of the program is related to the length of the program and the complexity of the instruction operation, and the others remain basically unchanged. The scanning period is generally on the order of nanoseconds.
3. When the program is executed in the nth scan, the input data is based on the scan value X of the sampling stage in the scan cycle. The output data based on the output data has the output value Y (n-1) of the previous scan and the output of this time. Value Yn; The signal sent to the output terminal by n is the final result Yn after all the calculations are executed this time.
4. The input/output response lag is not only related to the scanning mode, but also related to the programming arrangement.
 

—[Close]— —[ Back]— —[ Print]—