| Soft-PLC technology is a kind of new-style control technology based on PC, rising in the field of industrial automation internationally. Embedded Soft-PLC technology is developed and came forth based on deeply analyse and research of traditonal PLC technology, Soft-PLC technology and Embedded system. For the reasons that at present most of the PLC instruction used in industrial control is fundemental, Embedded Soft-PLC is prior to traditional PLC for bad compatibility and extensibility and low performance cost ratio of traditional PLC, taking the advantage of larger Soft-PLC system for bigger scale and resource waste. In this thesis, a kind of embedded Soft-PLC is developed, which has the property of agility and cleverish, and easy to use.After serious analyse and study the status of development of the traditional PLC, Soft-PLC and embedded system, the significance and the key technology of the research and development of embedded Soft-PLC system is given. The embedded Soft-PLC technology is devided to four modules, that is, the ladder diagram editor system, the PLC instruction running system, the serial communication system between the upper computer and the lower computer, the I/O system. In this thesis, the main tasks focus on the development of PLC instruction running system.Deeply researched the traditional PLC instruction system, using the compile principle knowledge, the Soft-PLC instruction frame is designed. The PLC instruction is computed by the stack struction. After the research of the property of the MCU resource and the running speed, the PLC instruction interpreting system is redesigned to adapt to the embedded system based on MCU. The PLC instruction interpreting and compiling process is made a valid optimization, thus the PLC instruction running is much more fix to run on MCU.The PLC instruction interpreting is firstly developed and realized by VC++6.0 on PC, and an I/O control modules is developed to test the basic logic PLC instruction, an elevator modules is designed to test the much more complex instruction, including the step instruction for the the Soft-PLC instruction interpreting system. Based on all this, the embedded Soft-PLC instruction interpreterting system is developed by KeilC51.At last, a prototype system based on MCU is designed. It is a design after the comprehensive application of the research results of the whole thesis, including the ladder diagram editor of upper computer, the interpreting system of lower computer, the serial communication system between the upper computer and lower computer, the input and output system. The experiment shows that the system meets the need of required standards, and the performance of the instruction intertpreting system after instruction simplified is enhanced, realized the embedded Soft-PLC system. |