Font Size: a A A

A Study On Code Optimization Method Of EOLC Control Algorithm

Posted on:2015-01-13Degree:MasterType:Thesis
Country:ChinaCandidate:L D LuoFull Text:PDF
GTID:2268330428964528Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
Ladder diagram (LD) with visual image, easy to use, easy to master advantages,is the main mode of programmable controller.It adopts the cycle scanning mechanismof "from top to bottom, from left to right" when codes are executed on controller.Thelength of scanning cycle is the main index of the performance of controllers, and itmainly depends on the quality of the codes which are compiled by the softwaredevelopment platform. Many invalid instructions in the codes result to waste theprocessor’s resources and reduce the response speed of the system.At home andabroad solving this problem mainly through improving the processor speed willincrease the cost.Using compiler optimization algorithm of development platform toreduce the processor execution of invalid instructions, not only can avoid this problemeffectively, but also have a strong universality.Compilation algorithm optimization byCASS-ePLC control algorithm generation platform, reduces the processor executionof invalid instructions effectively, shortens ePLC scan cycle and improves theperformance of the ePLC.Paper made a more in-depth research about the process of control algorithmcodes compiled into IL instructions and the optimization of invalid instructions,mainly finished the following work.(1) Studied the literature related the controller performance optimization at homeand abroad and the IEC61131-3standard relevant description of the ladder diagram,and put forward the algorithm framework of optimizating ePLC control algorithmcode.(2) Proposed the algorithm of AOV graph structure into a logical expressionmethod and the level algorithm of the AOV graph. Converted the AOV diagram of thenodes by series and parallel rules, and got the corresponding logical expression AOVdiagram, and got the level relationship of AOV graph by traversing logic express.(3) Put forward the reconstruction algorithm of single AOV graph and the mergerreconstruction algorithm of multiple AOV graphs based on the AOV graph propertiesof exchange and combination. The reconstruction algorithm of single AOV graphexchanged and reconstructed according to the level relationships of the AOV graph’slogical expression, it made the logic of an individual AOV graph clearer. The merge reconstruction algorithm of multiple AOV graphes merged the AOV graphes, if twoAOV graphes didn’t exist the flow dependence relationship based on the analysis ofthe flow dependence relationship, it induced the number of the AOV graphes.(4) Analyzed the cause of generating the invalid instructions complied by AOVdiagram, this paper proposed the optimization method by changing ePLC program’scontrol process to reduce invalid instruction execution. Changing the original orderexecution flow to the optimal jump execution process reduced the invalid instructionsexecution, shortened the scan period of IL instructions, and improved operationefficiency.Finally, paper optimized the control algorithm code of some control systems,such as the automatic winding machine, the batch foaming machine control system.The experiment’s results show that the optimization method put forward by the paperobviously shortened the PLC’s scan cycle, improved the response speed of the system.
Keywords/Search Tags:AOV diagram, data dependence, refactoring, compilationoptimization, instruction list
PDF Full Text Request
Related items