Technology Hots

  

Current location: Home >  > 

What is the difference between MCU and PLC

Time:2021-11-25      Hits:1495   

单片机和PLC有什么区别哪个好

Since the United States introduced PLC to replace the traditional relay control device in the 1960s, PLC has developed rapidly and has been widely used all over the world. At the same time, the function of PLC is also continuously improved. With the continuous development of computer technology, signal processing technology, control technology, network technology and the continuous improvement of user needs, PLC adds analog processing and motion control functions on the basis of switching value processing. Today's PLC is no longer limited to logic control, but also plays a very important role in motion control, process control and other fields.
The difference between PLC and MCU
1. PLC (programmable logic controller) is a programmable logic controller, an electronic device for digital operation specially designed for industrial production. It adopts a kind of programmable memory for its internal storage program, execution of logic operation, sequence control, timing, counting and arithmetic operation and other user-oriented instructions, And control various types of machinery or production processes through digital or analog input / output. It is the core of industrial control.
2. Microcontrollers is an integrated circuit chip, which uses VLSI technology to integrate the functions of CPU, ram, ROM, various I / O ports, interrupt system, timer / counter and so on (it may also include display driving circuit, pulse width modulation circuit, analog multiplexer, a / D converter, etc.) a small and perfect microcomputer system integrated on a silicon chip, which is widely used in various fields.
Such as mobile phones, automotive electronics, industrial stepping motors, robot arm control, etc., we can see the figure of single chip microcomputer. The characteristics of single chip microcomputer are that the programming and maintenance are relatively complex, the programming mode is commonly used in C language or assembly language, the cost is low, and the I / O interface is relatively limited.
The difference between PLC and MCU
1. PLC is a mature control system composed of single chip microcomputer. It is a product of mature and stable single chip microcomputer application system, which has strong universality.
2. Single chip microcomputer can form a variety of application systems with a wider range of application, but as far as "single chip microcomputer" is concerned, it is only an integrated circuit, and it can be applied only when it forms a system with other components and software.
3. From the use of the project, for single projects or projects with few repetitions, PLC is fast and convenient, with high success rate, good reliability, but high cost.
4. For a large number of supporting projects, the use of single chip microcomputer system has the advantages of low cost and high efficiency, but it needs considerable R & D strength and industry experience to make the system stable.
5. In essence, PLC is actually a set of single chip microcomputer (single chip microcomputer has a wide range) system.
Which is better, MCU or PLC
1. PLC widely uses ladder diagram instead of computer language, which has certain advantages for programming. You can understand ladder diagram as a programming language like assembly and other calculator languages, but the scope of use is different. Moreover, it is usually done by PLC software to convert your ladder diagram into C or assembly language (determined by the CPU used by PLC) Then it is compiled into machine code by assembly or C compilation system. PLC only runs machine code, and ladder diagram only makes it easier for users to use.
2. As mentioned, MCS-51 single chip microcomputer can also be used for PLC production, but 8-bit CPU is used in some advanced applications, such as a large number of operations (including floating-point operations) and embedded systems (now UCOS can also be transplanted to MCS-51) However, with DSP, we can already meet the general requirements, and also use ladder diagram programming. We can convert the ladder diagram into C51, and then use keil's C51 to compile. It is not difficult to find that different models of PLC will choose different CPUs. In fact, it means that PLC is a set of completed single chip microcomputer system.
In this way, PLC is not mysterious. Many PLCs are very simple. In addition to its fast speed, other functions of its internal CPU are not as good as ordinary single chip microcomputer. Usually, PLC adopts 16 bit or 32-bit CPU with 1 or 2 serial channels to communicate with the outside world. There is only one timer inside. If you want to improve reliability, the problem can be solved by adding a watchdog timer.
3. In addition, the key technology of PLC is that it solidifies a program and auxiliary communication program that can interpret the ladder language. The efficiency of the interpretation program of the ladder language determines the performance of PLC, and the communication program determines the difficulty of exchanging information between PLC and the outside world. For simple applications, it usually operates in the form of an independent controller, which does not need to exchange information with the outside world, but only needs internal fixation There is a program that can explain the ladder diagram language.
4. In fact, the main work of designing PLC is to develop and explain the program of ladder diagram language. Now the single chip microcomputer can completely replace PLC. The previous single chip microcomputer has no way to compare with PLC because of its weak stability and anti-electromagnetic interference ability. Now the single chip microcomputer has achieved high stability and strong anti-interference ability, and has been replaced in some fields.

Commax-Tech Electronic Co., Ltd      Electronic component specialist

B23, second floor, ASEAN building, Longhua District, Shenzhen

sales@commax-tech.com

https://commax-tech.com

Keyword:MCU   PLC   Commax-Tech Electronic