Joke Collection Website - Talk about mood - Why use PLC instead of single chip microcomputer in industry?

Why use PLC instead of single chip microcomputer in industry?

The characteristic of PLC is 1. PLC has high reliability, which is one of the reasons why it is widely used in industrial fields. The composition of PLC is simply composed of a single chip microcomputer plus corresponding protection circuit and self-diagnosis function, so the stability and safety of PLC are higher than that of single chip microcomputer.

2.2 input and output function module. The PLC is finished. For different industrial field signals, such as DC or AC, switching value, digital or analog value, voltage or current, PLC has corresponding modules directly connected with industrial field equipment (such as buttons, switches, sensing current sensors, motor starters or control valves, etc.). ). This is just suitable for most development needs in industrial scenarios.

3. The programming of PLC is simple and convenient, and the programming of PLC mostly adopts ladder diagram mode, which is comparable to the large-scale control system assembled by relays several years ago and easy to develop and control.

4. Compared with single-chip microcomputer, on-site installation and debugging 4. PLC has great advantages. Its installation mostly adopts modular installation and field bus, and the application of single chip microcomputer needs to choose a suitable place to package heat dissipation and so on.

To sum up, the comparison between the advantages of PLC and single chip microcomputer shows that there are many single chip microcomputers in the application of PLC in industry.

Characteristics of single chip microcomputer

1. The first choice for the research and development of single chip microcomputer is to design the schematic diagram, PCB diagram and circuit board of the application scene, and then program. The disadvantages of this method are long development time and poor application compatibility.

2. Compared with PLC, MCU has the advantages of strong control ability for complex systems, low price and small size, and is suitable for common household electronic products.

Electronic design school will continue to introduce electronic DIY design videos, zero-based learning articles, electronic design skills and other knowledge, welcome everyone's attention!

At first, single-chip microcomputer was used in industry, but later, due to the complexity of industrial control and the cost performance of single-chip microcomputer, it could not be popularized in industrial field. It was not until the 1990s that electronic products came into being, and the single chip microcomputer ushered in its own day. The industrial field can't be stopped by single chip microcomputer, so the programmable logic controller (PLC) is developed on the basis of traditional relay control. Consumer electronic products are updated quickly, the cost of single chip microcomputer is low, and mass production is easy, which is most suitable for electronic products. Unlike industrial use, it needs long-term stability and reliability. Although PLC is expensive, it takes a long time to reduce the cost.

There is also a reason to use PLC instead of single chip microcomputer in industry.

The industrial control field requires high stability and reliability, and it is impossible to fish for three days and dry the net for two days, which is a huge loss for enterprises. The industrial control environment is harsh, the protection level is high, and the equipment works in the open air. Can single-chip microcomputer run stably in rainy, humid and extremely cold weather? Reliability is not flattering! In the industrial field, I/O can't move for hundreds of times, and the single chip microcomputer can't resist it. PLC should have a redundant system just in case, which is difficult for single chip microcomputer to do. Industrial control is only a part of it, and everyone who has used PLC knows it. It needs data acquisition, communication, host computer, configuration, motion control and display, and it depends entirely on industrial systems and communication protocols, which can't be handled by a single microcontroller. Such as MODBUS, OPC and PROFIBUS.

The development cycle is shorter than that of single chip microcomputer, and the threshold is lower. Unlike C language and assembly language programmed by single chip microcomputer, it is more difficult for beginners. As long as PLC programming has the ability to draw electrical schematic diagram, its ladder diagram programming can be a good introduction. In terms of development cycle, can a person develop? By the time you take it out, PLC is ready to go to the scene. Large-scale engineering high-voltage equipment began to run, and small single-chip computers were not allowed to play dead. The applicable population is also different. Single chip microcomputer is mainly an electronic engineer, and PLC is an electrical engineer. These two different occupations cannot be integrated. To put it bluntly, many electrical engineers don't know how to play development languages such as C language and assembly language. Electrical engineers think that the programming is not optimized enough, PLC can be modified by itself, and the single chip microcomputer will be fixed after it is finished, which is not helpful to professionals. For example, I/O points need to be added and deleted in the industrial production process. Can a single chip microcomputer do it?

PLC has good stability, unlike our consumer electronic products, such as mobile phone flashing back, which has no loss for us. Restarting it is also a big deal. But in the industry, quitting from time to time will not be killed, and if it is serious, it will lose your life. Although the cost of single chip microcomputer is low, the cost performance of single chip microcomputer is not as good as that of PLC as a whole.

Say a very vivid metaphor, in the field of industrial control, PLC is equivalent to primary school culture, and single chip microcomputer is equivalent to junior high school culture.

In essence, PLC is a single-chip microcomputer control system that integrates various peripheral functions. Using PLC has two advantages. First of all, it is easy to program and use quickly. Second, you don't need to consider the reliability and adaptability of hardware, just choose what kind of module you need.

Single-chip microcomputer is a lot of trouble to use, and users should pay more attention to the reliability of circuit system and peripheral hardware. Programming is basically based on basic languages such as C and assembly, which requires higher logical thinking ability of programmers, and the combination of software and hardware is even more puzzling. If you can master the software and hardware system of single chip microcomputer skillfully, then learning and using PLC in turn is pediatrics.

From the application of the two, PLC focuses on occasions with relatively loose industrial control costs and relatively high reliability requirements, such as machine tools and equipment. For large and medium-sized products that emphasize cost, there is no doubt that single chip microcomputer must be used.

Because mastering the application of single chip microcomputer is more extensive than mastering the application of PLC, it is suggested that young practitioners should not be afraid of difficulties and start from single chip microcomputer and enter the world of industrial control. If PLC needs it, it is not too late to start again.

Hello, friends, I'm electronics and industrial control technology, and I'll answer this question. Since the birth of 1969 in the United States, PLC was designed to solve some special control needs in the industrial control field at that time. Due to its excellent performance during the trial period, PLC has gradually played an increasingly important role in the field of industrial control. Today, PLC has become the core control equipment in the field of industrial control. Many equipment in my unit use PLC as the core control equipment. For example, there is Siemens S7- 1200 PLC on the robot multifunctional workbench, which is the peripheral of the robot body and is responsible for the coordinated control between the robot and other equipment. For example, the signals detected by various sensors should be sent to PLC first, and then a series of switch signals processed by PLC internal programs will inform industrial robots to start, pause or reset. In addition, built-in PLC devices are also used in CNC machine tools. This shows that the use of PLC can be seen everywhere in the field of industrial control. Let me tell you why I have a soft spot for PLC in industrial control.

Advantages of PLC in the field of industrial control

In the field of industrial control, PLC is the only choice. What charm does it have that designers and technicians of industrial control system attach so much importance to it? In my opinion, it is mainly reflected in the following aspects. First, PLC has strong anti-interference ability and high reliability. There are nearly 20 PLCs in our laboratory. Since the experimental equipment came in in 2005, it has been running every day. So far, the PLC module has not failed, and other modules have been replaced one after another. It can be seen from this that the reliability of PLC is so high. As far as I know, redundant CPU is used in some brands of PLC.

Next, I will talk about the strong anti-interference ability of PLC. At the beginning of design, PLC considered its working environment. In the industrial environment, there may be strong magnetic field interference, high-order harmonic interference in the circuit and so on. Therefore, from the selection of internal circuit components of PLC, choose high-quality and good-performance components, such as the microprocessor CPU with strong anti-interference ability. In the circuit design, a variety of anti-interference technologies are adopted. We use multilevel filtering technology from the power supply, and then use integrated voltage stabilizing block to stabilize the voltage. From then on, whether it is the influence of external power supply harmonics or the fluctuation of power supply voltage, PLC can calmly deal with it. Finally, from the aspect of electromagnetic interference, because the input and output ports of PLC adopt photoelectric isolation technology, shielding technology is adopted in the overall circuit design of PLC, and the use of these technical means also makes electromagnetic interference signals have no chance. From what I have said above, we can see that PLC is an industrial controller.

Secondly, from the difficulty of learning PLC, we know that PLC was originally born on the basis of relay control circuit, and it can use a very vivid ladder diagram as the control "language", which is very intuitive. It is also very easy for many electrical technicians to learn, so the general electrical technicians will first think of using PLC to control when designing the control system.

The third point is that it is very convenient to maintain and upgrade the PLC control circuit. At the same time, in the control circuit with PLC as the core, even ordinary people with computer technology can do it, which will greatly shorten the time to complete the whole circuit. I think it is natural to use PLC in industrial control because it has many advantages.

Short board of single chip microcomputer in industrial control field

Let's look back at the control chip of the single chip microcomputer. I have been in contact with it for many years. Single-chip microcomputer has many "fatal" weaknesses in the use process, such as its weak anti-interference ability, especially in such a harsh industrial environment, using single-chip microcomputer control can not show its advantages at all. First of all, in terms of voltage requirements, it needs a lower voltage. If I'm not careful, I'll burn out the single chip microcomputer. When I play with single chip microcomputer, I will burn out a lot because of voltage problems. If the microcontroller is too low, it will "strike" and it will not work for you. When I am repairing the control circuit board of single chip microcomputer, I often find that the whole control circuit can't work normally because of the low power supply voltage. For example, the normal working voltage of some single-chip computers is 5V, and when the voltage drops to 3.4V, it will "strike" and stop working. I think the single-chip microcomputer is "delicate" and has poor reliability. In addition, compared with PLC ladder diagram language, the language used by single chip microcomputer is more difficult to learn, such as C language or assembly language. It takes a lot of skill to write a decent control program, which can't be completed in a short time, so the time needed to design an industrial control system with it will be extended.

The primary factor of industrial production is stability! Therefore, the first consideration in designing industrial control system is reliability! And PLC is specially designed for industrial production, and its essence is single-chip microcomputer system, but it is more reliable, more stable and less susceptible to interference than single-chip microcomputer. Nowadays, due to vicious competition, in order to reduce costs, people are replacing PLC with single chip microcomputer, which seems to reduce costs, but it is actually a cover-up. Imagine a system, where you replace PLC with single chip microcomputer and save some money, but the loss caused by instability is far greater than the cost you save.

The core of plc is also a single chip microcomputer. Plc is a system and a universal finished product. It focuses on the realization of the control scheme and can modify the program at any time, so the programming is simple and the cost is high.

Single-chip microcomputer is a chip, which can only be used with many peripheral circuit designs. It is suitable for mass production and customized design, and the modification is difficult and the cost is relatively low.

The two can't be simply compared. The industrial control object interface is relatively standard, and general plc is more suitable.

It can be said that single chip microcomputer is a mature product of industrial control application. But the application scope of single chip microcomputer is much wider than that of plc.

To solve this problem, we must first understand the connection between PLC and single chip microcomputer! When it comes to single chip microcomputer, people often think of 5 1 single chip microcomputer. In fact, there are many kinds of single-chip computers, such as arm. Then when you open a PLC, you will find that its cpu is an arm processor.

At this time, you have to understand that PLC is just a modular single chip microcomputer system!

First, it is not impossible to solve an industrial control problem with a single chip microcomputer. It takes too much time! Firstly, the hardware electronic circuit is built according to the process, including communication circuit, optocoupler isolation circuit, analog-to-digital conversion or digital-to-analog conversion circuit, basic clock … a lot of circuits. Then based on the circuit you built, you need to develop the program, usually in C language, which is very time-consuming. By the time you finish this program controller, people have already done more than 100 projects with PLC. Using plc as a system, you don't need to consider the electronic hardware circuit, you just need to add several modules with different functions for programming. The commonly used ladder diagram program is much simpler than C language, and has ready-made functions and functional blocks. Let's take the simplest timer for example. It is much more laborious for single chip microcomputer to make an accurate timing program than PLC.

Second, your project is finished and needs to be revised. It's made by plc system. Add modules, change other modules, modify programs, change some lines, and get it done in minutes. What about the single chip microcomputer system? Redo the circuit board

Third, for example, a large-scale industrial control project has thousands of control quantities. How many electronic circuits must be built if a single chip microcomputer is used? Large-scale projects often have a lot of intelligent instruments, man-machine interfaces and industrial computers. You should take into account that the circuit board of your single chip microcomputer is compatible with these, and the communication driver must be done! With a large plc like Siemens s7_400, it is easy to realize the communication between devices and form a field bus. Most of the communication between devices is compatible, saving a lot of time.

Fourth, there is no guarantee that the reliability of the circuit you make with single chip microcomputer can meet the needs of industrial field. Plc, general Siemens, extremely reliable!

Five, some equipment, as long as the program is relatively fixed, only need to set parameters, then don't use plc, use professional program controller! For example, the burner program controller, similar to plc, also has several inputs and outputs, but the process is solidified and does not need programming! These professional program controllers are all developed with single chip microcomputer!

Six, plc is the epitome of social division of labor! To complete a project, electrical engineers only need to focus on macro projects. Electronic engineers and computer engineers have developed plc system, configuration software and man-machine interface. Electrical engineering, these can be used.

Can MCU replace PLC? The answer is "unlikely". It may surprise you to hear this answer for the first time.

First, what is a single chip microcomputer and what is PLC?

1, single chip microcomputer

Microcontroller, also known as MCU, is an integrated circuit chip. It is a small silicon chip that integrates the functions of CPU, RAM, ROM, I/O port, interrupt system, timer/counter (possibly including display drive circuit, pulse width modulation circuit, analog multiplexer, A/D converter, etc.). ) has data processing ability by using VLSI technology.

Its characteristics are relatively complicated programming and maintenance, commonly used C language or assembly, low cost and relatively limited IO ports.

2、PLC

PLC is the abbreviation of programmable logic controller, which is translated into programmable logic controller in Chinese. This is a digital operation electronic system specially designed for industrial environment. It uses programmable memory, which stores instructions for logical operation, sequence control, timing, counting and arithmetic operation, and controls various types of mechanical equipment or production processes through digital or analog input and output.

1) history

The development of production technology requirements of American automobile industry promotes the emergence of PLC. In 1960s, when adjusting the production line of the factory, American General Motors Company found that the relay and contactor control system was difficult to refit, bulky, noisy, inconvenient to maintain and poor in reliability, so it put forward the famous "universal ten-point" tender index.

2) Structure

The programmable logic controller is essentially a computer dedicated to industrial control, and its hardware structure is basically the same as that of a microcomputer (because of the cost and other reasons, most PLC control chips are actually single-chip computers, which means that PLC can be regarded as the secondary development of single-chip computers).

The power supply is used to convert alternating current into direct current required by PLC. At present, most PLCs use switching regulated power supply for power supply.

Central processing unit (CPU) is the control center and core component of PLC, and its performance determines the performance of PLC.

Memory is a semiconductor circuit with memory function. Its function is to store system programs, user programs, logic variables and other information. Among them, the system program is a program to control PLC to realize various functions, which is written by PLC manufacturers and solidified in ROM, and users cannot access it.

Input unit is the input interface between PLC and controlled equipment, and it is the bridge for signals to enter PLC. Its function is to receive signals from the command part and the detection part. Input types are DC input, AC input and AC /DC input.

The output unit is also the connection part between PLC and controlled equipment. Its function is to transmit the output signal of PLC to the controlled equipment, that is, to convert the weak current signal sent by the central processor into a level signal to drive the executive components of the controlled equipment. The output types are relay output, transistor output and crystal gate output.

In addition to the above parts, PLC has a variety of external devices according to different models, and its role is to help programming, realize monitoring and network communication. Commonly used external devices include programmers, printers, cassette recorders, computers, etc.

3) Features

High reliability. Because PLC mostly adopts single chip microcomputer, the integration is high, and the corresponding protection circuit and self-diagnosis function improve the reliability of the system.

Programming is easy. PLC programming mostly uses relay control ladder diagram and command statement, the number of which is far less than that of microcomputer instructions. Except for middle and high-grade PLC, ordinary small PLC is only about 16. Because the ladder diagram is vivid and simple, easy to master and use, it can be programmed without computer professional knowledge.

Flexible configuration. Because PLC adopts building block structure, users can flexibly change the function and scale of control system through simple combination, so it can be applied to any control system.

The input/output function module has been completed. One of the biggest advantages of PLC is that it has corresponding templates for different field signals (such as DC or AC, switching value, digital or analog value, voltage or current, etc.). ), which can be directly connected with industrial field equipment (such as buttons, switches, induced current sensors, motor starters or control valves, etc.). ) and connected to the CPU motherboard through the bus.

Convenient installation. Compared with the computer system, the installation of PLC requires neither a special computer room nor strict shielding measures. When in use, it only needs to correctly connect the detection device with the I/O interface terminals of the actuator and PLC, and it can work normally.

Second, the conclusion

After the above explanation, we can see that PLC can actually be regarded as the secondary application development of single chip microcomputer, but it has its own distinctive characteristics; If the single chip microcomputer also has these characteristics of PLC, it will replace PLC; But as far as the current situation is concerned (the function, price, stability, ease of use, programming and maintenance of single chip microcomputer, etc.). ), this will be an impossible task, or the deadline is often endless.

In short, both have their own advantages. In the case of fewer IO ports and fewer functional blocks, MCU is generally selected, and PLC (short development cycle, low cost (relatively low for large-scale projects), strong usability and many IO ports) is selected.

1. Single chip microcomputer

From the design point of view, it needs software and hardware design, which has high requirements for designers and is difficult and slow to start;

From the stability point of view, single-chip microcomputer has poor anti-interference ability, poor adaptability to harsh environment and complex industrial application environment, which determines that single-chip microcomputer can not be widely used in industry;

The maintenance is inconvenient and the real-time monitoring effect is poor.

2. Programmable Logic Controller (PLC)

PLC users do not need to design and manufacture hardware equipment, which is powerful, widely used, simple in programming, easier for technicians to get started, and also reduces the workload of staff.

High reliability, strong anti-interference ability, and can adapt to different temperature and humidity environments.

At the same time, PLC has low failure rate, strong real-time monitoring function, standardized modules, different functions and convenient maintenance.

3. Although the application of PLC in industrial field is more than that of single chip microcomputer, single chip microcomputer also has various advantages, such as low price and small size, which is widely used in electronic products.

The above is just a personal opinion. If you have different opinions, you can communicate privately! thank you

We must first understand the development of automation. It can be said to be semi-automatic at the earliest. Machinery manufacturing equipment does not have a good control system. The realization of the function depends on the assembly of mechanical devices and independent components such as relays, contactors and timers. Later, electronic devices were used to control and modify parameters. Industrial equipment distribution cabinets have an assembly habit. The ideas of industrial electricians are all configured according to basic contactors, timers and switches. Moreover, in reality, the control methods of some contactors and switches are often changed, so that if controlled by single chip microcomputer, the problem of modifying the program will appear. If a single chip microcomputer modifies a function, it will be very troublesome, so that PLC will be born from time to time. PLC caters to the thinking of mechanical electrician when programming. The programming is relatively simple and easy to modify, and there is no need to worry about complicated compilation such as running crash, storing information codes, and various equipment information exchange codes.

In fact, PLC is a program added to the microcontroller, and PLC is a secondary development based on the microcontroller program. It should be understood that the initial coding should be based on binary coding system, then assembly, then C, C++ of computer, keil of single chip microcomputer and so on. Simplify programming methods, reduce programming errors and be intelligent.