Font Size: a A A

Design And Application Of The Small PLC Instruction List Converted To Ladder Diagram Compiler

Posted on:2019-12-05Degree:MasterType:Thesis
Country:ChinaCandidate:D MaoFull Text:PDF
GTID:2428330611972335Subject:Control theory and control engineering
Abstract/Summary:PDF Full Text Request
With the continuous update of information technology,PLC has become an important pillar of the modern automation industry.This project is based on the small-scale PLC system structure independently developed by the project team.The hardware platform is composed of ARM-FPGA.The STM32F407IGT6 and EP4CE10F17C8 N are used as the core controller to complete the design and application of the compiler software for converting the small PLC instruction table into ladder diagrams.Realize the data transmission function between PC host computer and PLC host.The main achievements are as follows:(1)Selection of software and hardware development environment.Based on the design requirements for standardization and real-time development of compiling software,the tools of software and hardware development and related auxiliary debugging have been established.Design the frame structure of software and hardware for PLC programming system.Based on this framework structure,the three modules of editing,compiling and communication are designed.(2)Design of editing interface.Based on the VS2010 development environment through the MFC framework to create multi-document program to development the editing module.Design the editing interface of the instruction list,ladder diagram and dialog box,and realize the basic functions such as creating,opening,entering,saving and searching instruction statements.(3)Research on Compilation Algorithm.Understand the structural features of ladder diagrams and instruction list languages and the instruction encoding rules.Analyze the problems existing in previous project research,design a multiple operands logic instruction format and corresponding data storage structures based on streamlined command systems.Firstly,design an algorithm for converting the instruction list and the instruction code.Then use the post-order traversal mode based on the binary tree intermediate sentence structure to generate the instruction table of the ladder diagram program and further convert it into program code.Finally,design the algorithm that converts the instruction list to the ladder diagram.Use the in-order traversal method to generate the ladder diagram,thereby realizing the function of converting the three languages to each other.At the same time,an automatic detection module for instruction statements is added for the compilation process.(4)The realization of communication function.Design the communication protocol format,complete the hardware connection between the the host computer programming system and the PLC operating system,and realize the data transmission function between them.Increase the number of valid data bytes in the transmission frame format,improve the transmission efficiency of the source code.Optimize the way of serial port IAP to transfer source code,design the download mode of serial DMA to send and receive data,improve the efficiency of CPU in communication process.(5)Overall testing of PLC compilation software.First,the test verifies that the editing interface of the instruction list and the ladder program is friendly,and the compilation algorithm can realize the function of converting between the instruction list and the ladder diagram.Then the upper computer programming system entered and executed the automatic plastic blow molding machine system program.By monitoring the data exchange process between the PC host computer programming system and the PLC operating system,comparing and analyzing the transmitted program code,the correctness of the serial port DMA transceiving method designed by the project is verified,and the program downloading and uploading functions are realized.
Keywords/Search Tags:PLC, MFC, Compilation, Communication protocol, DMA
PDF Full Text Request
Related items