Font Size: a A A

Design And Realization Of The Instruction Emulation System For Soft PLC

Posted on:2011-03-11Degree:MasterType:Thesis
Country:ChinaCandidate:L WeiFull Text:PDF
GTID:2132360308958598Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
PLC (Programmable Logic Controller) is a kind of industrial control equipment. It runs instruction, and then uses output voltage signal of I/O device to control external machinery or equipment operation. PLC is adaptable, ease to use, high reliability, strong anti-interference, simple to program and so on.Soft PLC provides the same functionality of Hard PLC. Soft PLC provides the unique advantages of PC environment too.Soft PLC is a PC-based control system.It has the advantages of functionality, reliability, speed, troubleshooting and so on.Soft PLC integrated analog volume control, switching control, mathematics, network communication, numerical processing, PID regulation and other functions.Through a multi-tasking kernel, it provide a powerful instruction set, fast scan cycle, reliable operation and open architecture of the network.This paper designed preprocessing module, operation module, display module and input control module.Preprocessing module is used to pre-process and package instruction. Operation module is used to to run the instruction.Display module is used to display simulation system running status in real time.Input control module monitors the user's input control and treated them accordingly.In order to achieve an simulation system which can run PLC instruction and monitor the status of software PLC, this paper designed two core threads: running thread and display thread.The former thread simulates the scan cycle of the PLC.The latter thread shows simulation results in real time for users to monitor the simulation status.Simulation system uses a listener to receive user's input control on the PLC.In the above threads, this paper designed and implemented two important algorithms.One algorithm was designed to run the instruction of PLC in real time.The second algorithm was designed to convert the instruction to the ladder diagram. This paper used multithreading technology to ensure the real-time of operation, display and input control of the simulation system.The system has realized the simulation of most of the PLC basic instructions and 5 types of components. The scanning cycle of the simulation system can be achieved within a millisecond, to meet real-time requirements of most industrial controlling. The simulation system can be designed to control the peripheral equipment through the driver interface.
Keywords/Search Tags:PLC, Instruction, Real-time simulation executing algorithm
PDF Full Text Request
Related items