I. General principles and composition of programmable controllers
(I) Overview
The origin of programmable controllers can be traced back to the 1960s. General Motors (GM) in order to adapt to the needs of the automobile model constantly updated, put forward the hope that there is such a control device:
(1) its relay control system design cycle is short, simple wiring, low cost.
(2) It can combine many of the functions of the computer and the relay control system, but the programming is easier to learn and operate than the computer.
(3) The system is highly versatile.
In 1969, the United States DEC developed the first programmable controller, used in the production line of the GM company succeeded. Subsequently, Japan, Germany and other successive introduction of programmable controllers developed rapidly. But this period it is mainly used for sequential control, although the design of the computer ideas, but in fact only logical operations, so called programmable logic controller, referred to as PLC (ProgrammableLogicController).
Entering the 1980s, with the rapid development of microelectronics and computer technology, which makes programmable controllers have made rapid progress. Its function is far beyond the scope of logic control, sequential control, so called programmable controller referred to as PC (ProgratamableController). But because the PC is easy and personal computer (PersonalComputer) confusion, so people are still accustomed to use PLC as a programmable controller abbreviation.
Currently, PLC function is increasingly enhanced, can be analog control, position control. In particular, the realization of the remote communication function, easy to realize flexible machining and manufacturing system (FMS), making the PLC like a tiger with wings. No wonder some people call PLC one of the three pillars of modern industrial control (i.e.: PLC, robotics and CAD / CAM).
PLC has been widely used in metallurgy, mining, machinery, light industry and other fields, industrial automation provides a powerful tool to accelerate the realization of the integration of the pole.
Two, the basic structure and working principle of PLC
(a) the basic structure of PLC
PLC manufacturers many, the product structure is also different, but its basic components are more or less the same. PLC adopts the typical computer structure, including CPU, RAM, ROM, and input and output interface circuits. The PLC adopts a typical computer structure, mainly including CPU, RAM, ROM and input and output interface circuits. If the PLC is regarded as a system, the system consists of an input variable, a PLC an output variable, external open signals, analog signals, sensors to detect a variety of signals according to the PLC as an input variable, they are input by the PLC external to the internal registers, by the PLC internal logic operations or other operations, processing, and then sent to the output terminal, which is the PLC's output variable. These output variables are used to control peripheral devices. Here the PLC can be regarded as an intermediate processor or converter to convert input variables into output variables.
The role of each part is described below.
1, CPU
CPU is the central processing unit (CentreProcessingUnit) of the English acronym. It serves as the core of the entire PLC, plays the role of the commander-in-chief, it is mainly to complete the following functions:
(1) input signals into the PLC to store up.
(2) Take out user instructions in the order of storage and compile them.
(3) Completes various operations specified by user instructions.
(4) Sends the results to the output.
(5) Responds to requests from various peripheral devices (such as programmers, printers, etc.).
Currently the CPU used in the PLC is mostly a microcontroller, in the high-grade machine is now used 16-bit or even 32-bit CPU, extremely powerful.
2, memory
PLC internal memory has two types: one is RAM (i.e., random-access memory), it can be read at any time by the CPU to read, write; the other is ROM (i.e., read-only memory), the CPU can only be read from it and can not be written to the RAM is mainly used to store a variety of temporary data, intermediate results and the user is debugging the program, ROM is mainly used to store monitoring programs and the user is debugging. ROM is mainly used to store the monitoring program and the user has debugged the program, these programs are burned in advance in the ROM chip, you can run the program after the power on.
3, input and output interface circuits
It plays a role in transferring information between the PLC and peripheral devices. In order to ensure that the PLC works reliably, the designer of the PLC interface circuit has taken a number of measures. These interface circuits have the following characteristics:
(1) input using opto-electronic coupling circuit, can greatly reduce electromagnetic interference.
(2) The outputs are also opto-isolated and are available in three ways, i.e. relays, transistors and thyristors. This allows the PLC can be suitable for a variety of users of different requirements. Such as low-speed, high-power loads generally use relay outputs; high-speed high-power thyristor outputs; high-speed low-power transistor outputs can be used and so on. And some output circuits into a modular, pluggable, very easy to replace.
In addition to the above several major parts, PLC is also equipped with a variety of peripheral devices and interfaces, are used to lead to the shell of the socket, can be equipped with programmers, printers, tape recorders, and A/D, D / A, serial communication modules, can be very easy to connect with a cable.
(II) PLC principle of operation
PLC has many features of the microcomputer, but its mode of operation is very different from the microcomputer. Microcomputer generally wait for the command mode of operation, such as the common keyboard scanning mode or I / O scanning mode, a key is pressed or I / O action, it will go to the appropriate subroutine, no key is pressed, then continue to scan. PLC is used to cycle scanning mode of operation. In PLC, user programs are stored in sequential order.
PLC from the first instruction to start executing the program, until the end of the encounter and return to the first. This is a continuous cycle. Each cycle is called a scan cycle. If an input variable changes during a scan refresh cycle, the output variable in this scan cycle generates a response relative to the corresponding input. Conversely, if the input variable changes only after the input variable is refreshed, the output of this cycle remains unchanged, i.e., does not respond, and it is not until the next scanning period that the output generates a response. Since the PLC operates in a cyclic scanning mode, the speed of response of its outputs to inputs is affected by the scanning period. The length of the scanning cycle depends on several factors: first, the speed of the CPU to execute instructions; second, the time occupied by each instruction; third, the number of instructions, that is, the length of the program.
For slow control systems, response speed is often not the main, so this way of working is not only no harm but can enhance the system anti-interference ability. Because the interference is often pulsed, short-term, and because the system response is slower, often a few scanning cycles to respond to a response, and after many scans, the instantaneous interference caused by the misbehavior will be greatly reduced, so it strengthens the anti-jamming ability.
But for the time required to hand over the strict, fast response speed requirements of the system, this issue must be carefully considered. Response time should be made to make accurate calculations, carefully programmed, reasonable arrangement of the order of instructions to minimize the scanning cycle caused by the response delay and other adverse effects.
In short, the use of cyclic scanning mode of operation, is the PLC is different from the microcomputer and other control equipment, the most important feature.
(C) PLC features
PLC features can be roughly summarized as follows:
(1) strong anti-interference ability and high reliability. PLC designers have taken various measures to improve reliability, mainly in these areas:
①Inputs and outputs are photoelectric isolation to improve the anti-interference ability.
②The input power supply and output power supply of the host can be independent of each other, reducing the interference between the power supply.
③Adopt cycle scanning working mode. Improve the anti-interference ability.
4 internal "monitor" circuit to ensure that the CPU works reliably.
5 Sealed, dustproof and vibration-resistant case package and internal structure can adapt to harsh environments.
As a result of these measures, the PLC has a strong anti-interference ability, experiments have proved that the general resistance to 1kV, 1μs of narrow pulse interference. Its mean time between failure (MTBF) generally up to 5 ~ 100,000h.
(2) modular combination structure, so that the system is very flexible, according to the need for any combination, easy to maintain, easy to realize decentralized control.
(3) the programming language is simple and easy to learn, easy to popularize. PLC adopts the programming language for the control process, simple, intuitive, easy to learn and easy to remember, there is no microcomputer foundation is also very easy to learn, so it is suitable for the promotion of industrial and mining enterprises.
(4) can be modified online, good flexibility.
(4) PLC applications
PLC has been widely used at home and abroad in iron and steel, mining, cement, petroleum, chemical, electric power, machinery manufacturing, automobile loading and unloading, paper, textiles, environmental protection and entertainment and other industries. Its applications can be broadly divided into the following types:
(1) using open light logic control. This is the most basic scope of application of PLC. Available PLC to replace the traditional relay control, such as machine tool electrics, motor control centers, etc., can also replace the sequential control, such as blast furnace charging, elevator control, cargo access, transportation, testing, etc.. In short, PLC can be used for single machine, multi-machine group and production line automation control.
(2) digital control for machining. PLC and computer numerical control (NCN) device is combined into one, you can realize the numerical control, composed of CNC machine tools.
(3)For robot control, a PLC can be used to realize 3 to 6-axis robot control.
(4) for closed-loop process control. Modern large PLC are equipped with PID word program or PID module, can realize single-loop, multi-loop regulation control.
(5) Used to form a multi-pole control system to realize factory automation network.
(6) is now widely used in China's railroad buses, such as automatic control and traffic safety detection, is the direction of development of China's railroad bus equipment and technology.