Home > Common Problem > body text

What is the difference between microcontroller and plc

青灯夜游
Release: 2022-10-21 10:03:58
Original
31679 people have browsed it

Difference: 1. The development cost of microcontroller is low, but it is troublesome to develop; while the development cost of PLC is high, but the development cycle is short, the results are quick, and the reliability is high. 2. PLC has a certain degree of interchangeability, guaranteed quality, and programming software is moving towards standardization; while microcontroller application systems have widely varying functions and uneven quality, making it difficult to learn, use, and maintain. 3. The programming language of the microcontroller is C or assembly language, or its own programming language is used; there are many programming languages ​​for PLC, such as ladder diagram language, instruction list language, function module diagram language, and structured text language.

What is the difference between microcontroller and plc

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

Single-chip microcomputer, as the name suggests, is a computer system integrated into one chip, also called single-chip microcontroller, English: mcu, which has all the functions of a computer. PLC is the abbreviation of Programmable Logic Controller in English, which translates to programmable logic controller. PLC is an electronic system for digital operation and is widely used in industrial control. So what's the difference between the two? Let’s take a look below.

PLC

PLC (Programmable Logic Controller) is a programmable logic controller, an electronic device for digital operation specially designed for industrial production. It uses a Programmable-like memory used to store programs internally, perform user-oriented instructions such as logical operations, sequence control, timing, counting and arithmetic operations, and control various types of machinery or production processes through digital or analog input/output . It is the core part of industrial control.

What is the difference between microcontroller and plc
PLC

Single-chip microcomputer

Single-chip microcomputer (Microcontrollers) is an integrated circuit chip that uses very large-scale integrated circuit technology Integrate the central processing unit CPU with data processing capabilities, random access memory RAM, read-only memory ROM, various I/O ports and interrupt systems, timers/counters and other functions (may also include display drive circuits, pulse width modulation circuits, analog Multiplexer, A/D converter and other circuits) are integrated on a silicon chip to form a small but complete microcomputer system, which is widely used in various fields.

Such as mobile phones, automotive electronics, industrial stepper motors, robot arm control, etc., microcontrollers can all be seen. The characteristics of single-chip microcomputer are that programming and maintenance are relatively complicated. C language or assembly language is commonly used for programming. The cost is low and the I/O interface is relatively limited.

What is the difference between microcontroller and plc
MCU

The difference between MCU and PLC

1. PLC is built on MCU On the product, the microcontroller is a programmable integrated chip.

2. PLC is more suitable for use in harsh industrial environments and is relatively stable; while the working environment of microcontrollers is higher.

3. Prices are different. The development cost of a single-chip microcomputer is low, ranging from a dozen to dozens of yuan per single-chip microcomputer, but it is troublesome to develop. The price of PLC is hundreds, thousands, or tens of thousands, but the development cycle is short, the results are quick, and the reliability is high.

4. PLC has a certain degree of interchangeability, quality is guaranteed, and programming software is moving towards standardization. However, the functions of single-chip microcomputer application systems vary widely, and the quality is uneven, making it difficult to learn, use and maintain.

5. The programming language of the microcontroller is C language or assembly language, or its own programming language (such as the ASM language of the 51 microcontroller). The programming languages ​​of PLC include: Ladder Diagram Language (LD), Instruction List Language (IL), Function Block Diagram Language (FBD), Sequential Function Flowchart Language (SFC), and Structured Text Language (ST).

6. PLC is a relatively mature control system composed of single-chip microcomputer. It is a product of mature and stable single-chip microcomputer application system that has been debugged and has strong versatility. Microcontrollers can form a variety of application systems and have a wider range of uses. As far as a "single-chip microcomputer" is concerned, it is just an integrated circuit and must be combined with other components and software to form a system before it can be used.

7. For large-volume supporting projects, the use of single-chip microcomputer systems has the advantages of low cost and high efficiency, but it requires considerable R&D strength and industry experience to make the system operate stably and reliably. The best way is to embed the functions of the PLC into the single-chip microcomputer system, which can greatly simplify the development time of the single-chip microcomputer system, ensure performance, and ensure benefits.

Characteristics of PLC

PLC widely uses ladder diagrams instead of computer languages, which has certain advantages for programming. You can think of ladder diagram as a programming language, just like assembly and other calculator languages, but with a different scope of use. And the usual approach is for the PLC software to convert your ladder diagram into C or assembly language (determined by the CPU used by the PLC), and then use the assembly or C compilation system to compile it into machine code. The PLC only runs machine code, and the ladder diagram only makes it easier for users to use it.

As mentioned, MCS-51 microcontroller can also be used for PLC production, but the 8-bit CPU can be used in some advanced applications such as: large amounts of calculations (including floating point calculations), embedded systems (now UCOS can also be transplanted to MCS-51 ), etc., it’s just that they are a little unable to do what they want. However, adding DSP can already meet the general requirements, and also uses ladder diagram programming. We can convert the ladder diagram into C51 and then use KEIL's C51 for compilation. It is not difficult to find that different models of PLC will use different CPUs. In fact, it also shows that PLC is a set of ready-made microcontroller systems.

Looking at it this way, PLC is actually not mysterious. Many PLCs are very simple. In addition to being fast, the internal CPU has other functions than ordinary microcontrollers. Usually PLC uses a 16-bit or 32-bit CPU, with 1 or 2 serial channels to communicate with the outside world. It only needs an internal timer. If you want to improve reliability, add a watchdog timer to solve the problem.

In addition, the key technology of PLC is that it has a program that can interpret the ladder language and an auxiliary communication program internally solidified. The efficiency of the ladder language interpreter determines the performance of the PLC, and the communication program determines the relationship between the PLC and The difficulty of exchanging information with the outside world. For simple applications, it usually operates as an independent controller without exchanging information with the outside world. It only needs to have a program that can interpret the ladder diagram language internally.

In fact, the main task of designing a PLC is to develop a program that interprets the ladder diagram language. Today's microcontrollers can completely replace PLCs. The previous single-chip microcomputer was incomparable with PLC due to 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.

Can microcontroller replace PLC?

Some people say this is a pseudo question. Microcontrollers are components, and PLCs are systems composed of components and huge software. There is no comparability between the two in this regard - Most PLCs The control chip is actually a single-chip microcomputer, which means that the PLC can be regarded as a secondary development of the single-chip microcomputer. In terms of industrial protection level alone, the stability and reliability of microcontrollers cannot compare with IP67 products such as PLC (IP is a marked letter, the first marked number indicates the level of contact protection and foreign object protection, the second marked number indicates the waterproof protection level ). Moreover, a redundant system has been developed for PLC, a product that can cope with harsh industrial environments.

I/O function

The I/O points of the microcontroller are really limited, but what about the PLC? For different field signals, there are corresponding I/O points that can be directly connected to industrial field devices (such as buttons, switches, sensing current transmitters, motor starters or control valves, etc.), and connected to the CPU motherboard through the bus. connect. Almost any production line in the industry has hundreds or even thousands of I/O points, which are completely unmatched by microcontrollers.

Development cycle

There are more than 200 brands of PLC. Almost every brand has different programming software, and they are constantly improving their programming software to make It can serve electrical engineers more and more easily, and various program blocks are becoming more and more user-friendly and can be called at will, such as PID modules, motion control modules, etc., which greatly reduces the development pressure of engineers and shortens the development cycle. .

How to implement the microcontroller? If there are no ready-made modules to use, you can only develop them. Then engineers who have worked on non-standard automation equipment will encounter the problem of insufficient construction time. PLC, a highly integrated and modular product, has a very limited development cycle to meet the requirements of the equipment, let alone a single-chip microcomputer that is like a blank piece of paper.

Communication distance

Most assembly lines now need to be integrated and monitored across regions. The communication methods used are mostly Ethernet plus repeaters, or direct civilian use. Broadband optical fiber, the thing used in the end is probably Microsoft's IE browser. Obviously the PLC has an RJ-45 interface. Even if the main body does not have an RJ-45, it can be equipped with an Ethernet module. The PCB board equipped with the microcontroller can Add this interface and develop Ethernet communication? How long does development take?

Programming language

This is an advantage for microcontrollers, but it is also a disadvantage. As mentioned above, there are more than 200 brands of PLC, and there are even more programming software. Although the programming languages ​​​​of most PLCs are similar, every time they come into contact with a PLC of a different brand, electrical engineers must learn from the PLC's hardware parameters, soft components, Programming software and other aspects need to be learned from scratch before you can use it easily. The programming language of the microcontroller is C language or assembly language, which is common to any microcontroller. In other words, if you learn C language or assembly language, you can use any microcontroller to develop the desired functions (provided you have relevant electrical and electronics foundation).

But then again, electrical engineers are not electronic engineers. Their job is not just to consider how the microcontroller drives the relay to control the machine tool. Even some electrical engineers do not know MCU such as C language and assembly language. Development language. In recent years, with the promotion of the IEC-61131-3 standard, more and more PLCs support multiple programming languages, such as ST language, which is similar to C language, and CFC language, which is similar to circuit diagrams. This convenient function is really impossible to achieve in the traditional microcontroller development environment.

In the field of industrial control, PLC has an absolute advantage. Judging from the current situation (function, stability, ease of use, programming and maintenance of single-chip microcomputers, etc.), it will be impossible for single-chip microcomputers to replace PLC, or in other words Tall tasks with deadlines that tend toward infinity.

What is the difference between microcontroller and plc

For more related knowledge, please visit the FAQ column!

The above is the detailed content of What is the difference between microcontroller and plc. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!