Font Size: a A A

Optimization Design And Application Research Of PLC System Software Based On STM32

Posted on:2020-06-01Degree:MasterType:Thesis
Country:ChinaCandidate:S XuFull Text:PDF
GTID:2428330590950866Subject:Control theory and control engineering
Abstract/Summary:PDF Full Text Request
PLC system has been widely used in the industrial field because of its good stability and controllability.The PLC system designed by this subject is composed of STM32 controller and FPGA.On the basis of downloading the PLC source program by the DMA method designed in the early stage of the project team,the PLC source program is downloaded by the host computer software PLC Player.By analyzing the structure and working principle of the PLC system,the storage space of the PLC system is reasonably divided.The software framework of PLC system is designed by ?COS-II system.The decoding principle of PLC instructions is deeply analyzed by combining the coding table of PLC instructions.The decoding function is designed to decode the source program of PLC.Through the dual-port RAM storage space built in the FPGA,the data communication between STM32 and the FPGA is realized by using FSMC to ensure the fast and effective operation of the PLC system.The main research results are as follows:(1)The overall design of the PLC system.It includes three parts: structure design and working principle analysis of PLC system,storage space allocation of PLC system and communication design of PLC system.Firstly,based on the PLC system structure designed in the early stage of the project team,the working principle of the PLC system is deeply analyzed to further optimize the PLC system structure.Then combined with the working principle of PLC system,plan the storage space of PLC system and verify its rationality.Finally,a brief overview of the communication process between the various parts of the PLC system is given.The overall design of the PLC system laid the foundation for the subsequent reseach on PLC source program decoding and dynamic execution.(2)Software design of PLC system.Firstly,the design and functional characteristics of ?COS-II system are introduced.Then,the software framework of PLC system is designed by using ?COS-II system function and combining with the operation requirements of PLC system.Then,the decoding principle of PLC instructions is deeply analyzed by using the code table of PLC instructions.On this basis,basic instructions,other basic instructions,step instructions and application instructions decoding programs are designed to decode different types of PLC instructions.(3)Data communication between STM32 and FPGA.Firstly,the principle of FSMC is inroduced.According to the type and size of dual-port RAM memory in PLC system,the NOR Flash/PSRAM controller of FSMC is selected,and the first mapping address is chosen as the data storage control interval(address mapping range is 0X6000 0000-0X63 FF FFFF).Then the communication requirement between STM32 and dual-port RAM is analyzed,and the FSMC is initialized with the pin schematic diagram of STM32.According to FSMC data transmission protocol,different timing control is adopted for read-write dual-port RAM,which improves data transmission efficiency.(4)Further analysis of the structure characteristics and process flow of the duplex plastic injection and blow molding machine,design the functional configuration of the input and output ports of the system.
Keywords/Search Tags:PLC system, Instruction decoding, data communication, Dual port RAM
PDF Full Text Request
Related items