PLC指令表程序的一种语法分析方法及其在代码静态测试上的应用  被引量:5

A syntax analysis method of PLC instruction list program and its application in static testing

在线阅读下载全文

作  者:李学良 赵千川[1] 杨文[1] Syed Naeem HAIDER LI Xueliang;ZHAO Qianchuan;YANG Wen;Syed Naeem HAIDER(Center for Intelligent and Networked Systems,Beijing National Research Center for Information Science and Technology,Department of Automation,Tsinghua University,Beijing 100084,China)

机构地区:[1]清华大学自动化系,北京信息科学与技术国家研究中心,智能与网络化系统研究中心,北京100084

出  处:《清华大学学报(自然科学版)》2021年第10期1159-1165,共7页Journal of Tsinghua University(Science and Technology)

基  金:国家重点研发计划项目(2017YFC0704100,2016YFB0901900);国家自然科学基金项目(61425027);高等学校学科创新引智计划资助项目(BP2018006);北京信息科学与技术国家研究中心项目(BNR2019TD01009);国家高速列车技术创新中心研发项目(CX/KJ-2020-0006)。

摘  要:可编程逻辑控制器(PLC)是工业控制领域中广泛使用的自动控制装置。由于PLC程序缺乏具有普适性的测试工具,开发人员往往只能采用人工方式排查代码错误,导致测试效率低下。工业用户亟需一种标准化PLC代码检测方法,自动完成PLC程序语法检测与分析。该文以IEC61131-3标准为基础,建立基于Backus-Naur范式(BNF)的指令表语法模型。基于该模型构造抽象语法树,进而设计出一种具有线性复杂度的PLC指令表代码语法检测算法。利用2段控制工程中的PLC指令表代码对所提出的算法与商用软件CODESYS Static Analysis进行对比测试,验证了所提算法的可用性。Programmable logic controllers(PLC) are automatic controllers widely used for industrial control. Because PLC program testing is lack of general testing tools, developers can only manually check code syntax errors, which is inefficient. Thus, industrial users need a standardized PLC code testing method to automatically complete the PLC program syntax detection and analysis. This paper presents an instruction list syntax model based on the Backus-Naur form(BNF) and the IEC61131-3 standard for industrial users. A PLC code syntax fault detection algorithm with linear complexity is then built with an abstract syntax tree to automatically check the PLC code syntax. Compared wich the CODESYS Static Analysis, analysis of two industrial PLC programs demonstrates the usability of this PLC code static analysis method.

关 键 词:可编程逻辑控制器(PLC) 指令表(IL) 静态分析 IEC61131-3 

分 类 号:TP273.5[自动化与计算机技术—检测技术与自动化装置]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象