Font Size: a A A

Design And Implementation Of A Static Bug Detection Tool For PLC Program

Posted on:2018-01-19Degree:MasterType:Thesis
Country:ChinaCandidate:X T XuFull Text:PDF
GTID:2348330515988515Subject:Engineering
Abstract/Summary:PDF Full Text Request
With the development of industrial automation and informationzation,China’s industrial demand for PLC gradually increased and PLC is more and more widely used.The most popular language for PLC is ladder diagram(LD)in our country at present,but LD lacks of safety mechanism and a program in it usually includes many bugs.Even an insignificant bug can cause a catastrophe.The domestic tools for PLC is not enough efficient on bug detection.The main method to debug is running on a simulator.The way is relatively low efficiency,because the detail about errors or bugs is not sufficient,and the error is difficult to locate.In addition,logic operations take the majority of a PLC program’s operations.A program’s control path is very dependent on its input,and the input explosion leads high cost and incomplete test.Therefore,it is necessary to resolve inefficient bug detection of PLC program.The staitic code analysis plays a role in bug detection of traditional computer program.No one static code analyzer for PLC has not been developed utill now.This thesis studys application of static code analysic to LD’s bugs,relieving PLC engineer’s debug task by detecting bug in period of creating program.The main work of this thesis is as follows:(1)Demands on static bug detection tool for PLC program and analyse these demands.According to feedback and experience of PLC engineers obtained in practice,a list of demand is present and every item in this list is analysed.(2)Design of static bug detection tool for PLC program.Modular and detailed designs are carried out according to demand list.Some solution to specific problem are proposed,including detail implementation,algorithm and data structure invoved.(3)Implementation and test of static bug detection tool for PLC program.The tool is archived in Java on wondows platform.The LD is converted into instruction list(IL)to detect bugs,at the same time,an analysis tree and a control flow graphic are created.Datatype and address out of bounds bugs are detected by data flow analysis.The thesis designs and fulfills a static bug detection tool.This tool parses a ladder diagram,converts it into a instruction list,and then makes use of currently mature static code analysis to look for bugs in it.
Keywords/Search Tags:PLC program, ladder program, static code analysis, bug detection, dataflow analysis, instruction list
PDF Full Text Request
Related items