Follow+Star Public Account Number, don’t miss the wonderful content
Compilation | strongerHuang
WeChat Public Account | Embedded Column
Can microcontrollers replace PLCs? This question is like asking if flour can replace noodles, the answer is no. The first time you hear this answer, many people may have doubts. Microcontrollers are clearly powerful and resource-rich, so why can’t they replace PLCs?So today, let’s understand what microcontrollers and PLCs are, and what the differences are between them.
Microcontroller
A microcontroller (Single Chip Microcomputer), also known as a Microcontroller Unit (MCU), is an integrated circuit chip that uses very large scale integration technology to integrate a Central Processing Unit (CPU), Random Access Memory (RAM), Read-Only Memory (ROM), various I/O ports, interrupt systems, timers/counters, and other functions (which may also include display driver circuits, pulse width modulation circuits, analog multiplexers, A/D converters, etc.) into a single silicon chip to form a small and complete microcomputer system, widely used in various fields. Examples include mobile phones, PC peripherals, remote controls, as well as automotive electronics and industrial stepper motor and robotic arm controls, where the presence of MCUs can be observed.
The history of microcontrollers is not long, but it has developed rapidly. Its emergence and development are roughly synchronous with the emergence and development of microprocessors. Since Intel first launched the 4-bit microprocessor in 1971, its development can be roughly divided into five stages.Initial stage of microcontroller development (1971-1976): In November 1971, Intel first designed the 4-bit microprocessor Intel 4004 with an integration of 2000 transistors/chip, equipped with RAM, ROM, and shift registers, forming the first MCS-4 microprocessor. Subsequently, the 8-bit microprocessor Intel 8008 was launched, along with other 8-bit microprocessors released by various companies.Low-performance microcontroller stage (1976-1980): Represented by the MCS-48 series launched by Intel in 1976, it adopted a single-chip structure integrating an 8-bit CPU, 8-bit parallel I/O interface, 8-bit timer/counter, RAM, and ROM on a semiconductor chip. Although its addressing range was limited (not exceeding 4 KB), it had no serial I/O, small RAM and ROM capacity, and a simple interrupt system, its functions could meet the needs of general industrial control and intelligent instruments and meters.High-performance microcontroller stage (1980-1990): The high-performance 8-bit microcontrollers launched during this stage generally had serial ports, multi-level interrupt processing systems, and multiple 16-bit timers/counters. The capacity of on-chip RAM and ROM increased, and the addressing range reached 64 KB, with some on-chip also equipped with A/D conversion interfaces.16-bit microcontroller stage (1983-1989): In 1983, Intel launched the high-performance 16-bit microcontroller MCS-96 series, which adopted the latest manufacturing technology, resulting in a chip integration of 120,000 transistors/chip.Comprehensive high-level development stage (1990-present): So far, microcontrollers have shown a trend of transitioning from traditional 8-bit processor platforms to 32-bit advanced RISC processor platforms, but 8-bit microcontrollers remain difficult to replace. 8-bit microcontrollers are low-cost, inexpensive, and easy to develop, and their performance can meet most needs. Only in high-tech fields such as aerospace, automotive, and robotics, where high-speed processing of large amounts of data is required, 16/32-bit microcontrollers need to be selected. In general industrial fields, 8-bit general-purpose microcontrollers remain the most widely used microcontrollers. Microcontrollers are developing towards higher levels in terms of integration, functionality, speed, reliability, application fields, etc.The characteristics of microcontrollers are that programming and maintenance are relatively complex, the programming methods commonly used are C language or assembly language, and the cost is relatively low with limited I/O interfaces.
PLC
PLC, short for Programmable Logic Controller, is a digital operation electronic system specifically designed for applications in industrial environments. It uses a programmable memory to store instructions for executing logic operations, sequential control, timing, counting, and arithmetic operations, controlling various types of machinery or production processes through digital or analog input/output.
Why Microcontrollers Cannot Replace PLCs?
1. Stability and ReliabilitySome say this is a pseudo-question; microcontrollers are components, while PLCs are systems composed of components and extensive software, making them incomparable in this regard. This statement is not incorrect, as most PLC control chips are actually microcontrollers. In other words, PLCs can be viewed as secondary development of microcontrollers. In terms of industrial protection levels, the stability and reliability of microcontrollers cannot compare to PLCs, which are IP67 rated products (IP being the marking letters, with the first marking number indicating contact protection and foreign object protection levels, and the second marking number indicating waterproof protection levels). Moreover, PLCs have developed a redundancy system to cope with harsh industrial environments. If the comparison of stability and reliability is meaningless, then let’s analyze from other aspects.2. I/O FunctionsThe I/O points of microcontrollers are indeed limited, while PLCs have corresponding I/O points for different field signals that can be directly connected to industrial devices (such as buttons, switches, current sensors, motor starters, or control valves) and connected to the CPU motherboard via bus. Almost any production line in the industry has hundreds or even thousands of I/O points, which microcontrollers completely cannot compare.3. Expansion FunctionsA complete industrial production line requires not only control but also communication, upper-level control, configuration, motion control, and display, etc. These require a complete industrial system and communication protocols, such as Siemens’ PROFIBUS-DP communication, Mitsubishi Heavy Industries’ CC-LINK, etc. However, communication between microcontrollers and PCs or between microcontrollers is mostly done via serial ports. The serial port of microcontrollers is full-duplex asynchronous communication. So can microcontrollers implement communication protocols like MODBUS, PROFIBUS, CAN open, Ethernet, etc.? Perhaps microcontrollers can do it, but this leads to the next analysis point: development cycle.4. Development CycleThere are over 200 brands of PLCs, and almost every brand has different programming software, which is constantly being improved to better serve electrical engineers. Various program blocks are becoming increasingly user-friendly and convenient to call, such as PID modules and motion control modules, which significantly reduce the development pressure on engineers and shorten the development cycle. How can microcontrollers achieve this? Without ready-made modules, they can only be developed from scratch. Engineers who have worked on non-standard automation equipment will encounter a problem—insufficient construction time. PLCs, being highly integrated and modular products, face challenges in meeting the development cycles required for equipment, let alone microcontrollers that are like blank slates.5. Communication DistanceMost production lines now require cross-regional integration and monitoring, with communication methods typically using Ethernet with repeaters or directly using civilian broadband fiber optics. The final product may end up using Microsoft’s IE browser. Clearly, PLCs have RJ-45 interfaces, and even if the main body does not have RJ-45, Ethernet modules can be equipped. Can microcontroller PCB boards add this interface and develop Ethernet communication? How long will development take?6. Programming LanguageThis is an advantage for microcontrollers but also a disadvantage. As mentioned above, there are over 200 brands of PLCs, and even more programming software. Although most PLC programming languages are quite similar, every time an electrical engineer encounters a different brand of PLC, they must understand the hardware parameters, soft components, programming software, and other aspects from scratch to use it proficiently. The programming languages for microcontrollers are C language or assembly language, which are universal for any microcontroller. In other words, mastering C language or assembly language allows for the development of desired functions on any microcontroller (provided there is a foundation in electrical and electronic knowledge). However, electrical engineers are not electronic engineers; their work does not solely involve considering how microcontrollers drive relays to control machine tools. Some electrical engineers may not even know C language or assembly language, which are MCU development languages. In recent years, with the promotion of the IEC-61131-3 standard, more and more PLCs support multiple programming languages, such as ST language similar to C language, and CFC language similar to circuit diagrams. This convenient feature is something that traditional microcontroller development environments cannot achieve.
Conclusion
From the above, we can see that PLCs can actually be seen as secondary applications of microcontrollers, but they also have their own distinct characteristics. So far, the application of microcontrollers and embedded system development in China has gone through more than twenty years, with various fields such as national economic construction, military, and household appliances, especially in industries like mobile phones, automotive navigation devices, PDAs, smart toys, smart home appliances, and medical equipment, all utilizing microcontrollers. Currently, there are over 100,000 engineers engaged in microcontroller development and applications in high-end industries.Disclaimer: The materials in this article are sourced from the internet, and the copyright belongs to the original author. If there are any copyright issues, please contact me to delete.———— END————● Column “Embedded Tools”● Column “Embedded Development”● Column “Keil Tutorial”● Selected Tutorials from Embedded ColumnFollow the public account Reply “Join Group” to join the technical exchange group according to the rules, reply “1024” to see more content.Click “Read the Original” to see more shares.