Font Size: a A A

Design Of Editing Software Based On ARM And FPGA Small PLC System

Posted on:2020-02-14Degree:MasterType:Thesis
Country:ChinaCandidate:Y C ZhaoFull Text:PDF
GTID:2428330590450870Subject:Control theory and control engineering
Abstract/Summary:PDF Full Text Request
The continuous development of computer technology has made PLC play an increasingly important role in the modern industrial automation production operation,which makes the traditional hard PLC exposed the disadvantages of poor compatibility,weak field control ability and high cost.In contrast,soft PLC technology shows the advantages of flexibility,field control,and a variety of programming languages and hardware devices.This topic is based on the above considerations.Based on the ARM+FPGA small PLC system independently built by the research group,a PC upper machine editing that can realize the conversion of three programming languages: ladder diagram,instruction list and hexadecimal instruction encoding is designed.software.The main research results have been obtained:(1)The function of the host computer interface of the ladder diagram and the instruction list is realized.The MFC framework based on VS2010 builds the editing interface of each ladder and instruction list.It can realize the newly created,opened and saved ladder diagram or instruction list program file;at the same time,it can establish a complete ladder diagram element library,instruction list operation code and operand instruction;in the original addition,change,delete,On the basis of the insertion,an editing function that supports shortcut operation is newly added.(2)It realizes the mutual conversion between three kinds of instructions: ladder diagram,instruction list and hexadecimal instruction encoding.For the 32-bit new instruction encoding,the function of converting the ladder programming language into the corresponding instruction list statement is realized by establishing the binary tree structure;the instruction is divided into three types: extended type,merged type and jump-out type.For different types,By setting up the stack arPasStack,arNowStack to store the information of the converted completion instruction and the information of the conversion instruction,and converting the completed ladder diagram according to the chain structure storage method,the basic instruction and the function instruction can be converted into the corresponding ladder diagram programming.The function of the language;according to the respective language characteristics of the basic instruction and the function instruction,the instruction and the code are in one-to-one correspondence,and the compiling and decompiling functions between the instruction table instruction and the hexadecimal instruction code are realized.(3)Improved the original communication method.In the later stage,the small PLC system ARM chip was changed from LPC1788 to STM32F407,so the original IAP serial communication mode was changed to DMA(Direct Memory Access)serial communication mode.Through the protocol setting with ARM and the serial program programming of the upper computer editing software,the function of uploading and downloading data between PLC editing software and PLC system is realized.This communication method greatly improves the working efficiency of the host CPU.(4)Through the online debugging with the ARM chip of the small PLC system,the modules of the designed editing software were tested.The test work mainly includes editing interface test,error module test,compiler module test and serial communication module test,which verifies the feasibility of the existing functions of the small PLC editing software.
Keywords/Search Tags:Ladder diagram, Instruction list, Interface design, DMA
PDF Full Text Request
Related items