Trying to figure out what is the difference between PLC and microcontroller, searched a lot on the Internet, see the head is big, or a fog. Finally, some of the sentences to the point, combined with a serious analysis and summary, I think the difference between PLC and microcontroller should be:
1.PLC is the application of microcontroller constitute a more mature control system, is already debugging mature and stable microcontroller application system products. There is a strong generality.
2. And microcontroller can constitute a variety of applications, the use of a wider range. On the "microcontroller" alone, it is only an integrated circuit, but also with other components and software to form a system in order to apply.
3. From the point of view of the use of the project, for a single project or repeat the number of projects is very small, the use of PLC fast and convenient, high success rate, good reliability, but at a higher cost.
4. For a large number of supporting projects, the use of microcontroller systems have the advantages of low cost and high efficiency, but this requires considerable R & D strength and industry experience to make the system stable.
In essence, PLC is actually a set of microcontroller has been done (a wide range of microcontroller) system.
Characteristics of PLC
But PLCs also have their own characteristics: PLCs make extensive use of ladder diagrams instead of computer languages, which has certain advantages for programming. You can understand the ladder diagram as a programming language as the same as the calculator language such as assembly, only the scope of use is different!

And it's common practice for the PLC software to convert your ladder diagram into C or assembly language (determined by the CPU used by the PLC), and then compile it into machine code using an assembly or C compilation system! The PLC runs just the machine code. The ladder diagram just makes it easier for the user to use.
Microcontroller direct development control system
As said, then of course, MCS-51 microcontroller can also be used for PLC production, only 8-bit CPU in some advanced applications such as: a large number of operations (including floating-point operations), embedded systems (now UCOS can also be transplanted to the MCS-51) and so on, some of the power is not enough, but with the addition of the DSP has been able to meet the general requirements, and the same use of the ladder programming, we can ladder! We can convert the ladder diagram to C51 and then use KEIL's C51 for compilation. We can also find no model of PLC will choose a different CPU, in fact, also shows that the PLC is a set of microcontroller system has been done.

That being the case, it is of course possible to develop a control system directly with a microcontroller, but it is quite demanding on the developer, with long development cycles and high costs. For some large-scale system you need to do experiments, printed circuit boards require a considerable amount of money, you can say that you use the emulator, using the experimental board to develop. However, I want to tell you, that you just verify the feasibility of hardware and software, does not mean that can be used in industrial control systems, because industrial control systems on the anti-jamming requirements are very high, stability first, rather than the first performance, so the design of your board must be constantly experimental, improve.
When you have solved the above problems, you will find that you have made a PLC, of course, if you need others can be easily used you also need a set of use of the software, so that you can not need to tell others your circuit. You can't tell anyone else either.
PLC key technology
This look at the PLC is actually not mysterious, many PLC is very simple, its internal CPU in addition to speed, other functions are not as good as an ordinary microcontroller. Usually PLC using 16-bit or 32-bit CPU, with 1 or 2 serial channels to communicate with the outside world, there is a timer can be internal, if you want to improve the reliability and then add a watchdog timer problem is solved.
In addition, the key technology of the PLC is its internal solidified a ladder language can explain the program and auxiliary communication programs, ladder language interpretation of the efficiency of the program determines the performance of the PLC, the communication program determines the PLC and the outside world to exchange information easily.
For simple applications, usually operate as an independent controller, do not need to exchange information with the outside world, only need to be internally cured to interpret the ladder language program can be. In fact, the main job of designing a PLC is to develop a program that interprets the ladder language.
Now the microcontroller can completely replace the PLC, the previous microcontroller due to the stability and resistance to electromagnetic interference ability is relatively weak and PLC is no way to compare Now the microcontroller has done a high stability and strong anti-interference ability in some areas has been realized to replace.




