摘要
针对标准ST语言无法完全适应风机控制等应用场景的问题,提出并实现了一种融合C语言特性的扩展ST语言及其编译系统。该扩展ST语言将递归函数、无返回值函数、动态数组、功能块数组以及调用程序等特性融入标准ST语言内;在完全兼容标准ST语言的同时弥补了其不足。该编译系统支持扩展ST语言的词法分析、语法分析、语义分析与交叉编译,并生成控制器能够识别的可执行文件。扩展后的ST语言及其编译系统能够完全适应风力发电控制以及其他应用场景。在实际工程中的应用表明,扩展ST语言能够完全支持实际工程中的特殊应用,并能提高控制程序的编写及执行效率。
In response to the issue that the standard ST language cannot fully adapt to application scenarios such as wind turbine control,the article proposes and implements an extended ST language and its compilation system that integrates the characteristics of C language.The extended ST language integrates general recursive function,function without return value,dynamic array,function block array and calling program into the standard ST language.While fully compatible with the standard ST language,it compensates for the shortcomings of the standard ST language.The compiler system supports lexical analysis,parsing,semantic analysis and cross compilation of extended ST language,and generates executable files that can be recognized by the controller.The expanded ST language and its compilation system can fully adapt to wind power generation control and other application scenarios.After application in practical engineering,it has been shown that the extended ST language can fully support special applications in practical engineering and improve the writing and execution efficiency of control programs.
作者
张磊
李响
陈宏君
叶立文
曾凯
ZHANG Lei;LI Xiang;CHEN Hongjun;YE Liwen;ZENG Kai(NR Electric Co.,Ltd.,Nanjing 211102,China)
出处
《集成电路与嵌入式系统》
2024年第2期74-80,共7页
INTEGRATED CIRCUITS AND EMBEDDED SYSTEMS
基金
国网电力科学研究院科技项目自主可控通用型PLC软件平台研制(JS22011447)。