融合C语言特性的ST语言的扩展与编译

张磊, 李响, 陈宏君, 叶立文, 曾凯

集成电路与嵌入式系统 ›› 2024, Vol. 24 ›› Issue (2) : 74-80.

PDF(916 KB)
PDF(916 KB)
集成电路与嵌入式系统 ›› 2024, Vol. 24 ›› Issue (2) : 74-80. DOI: 10.20193/j.ices2097-4191.2024.02.010
研究论文

融合C语言特性的ST语言的扩展与编译

作者信息 +

Extension and compilation of ST language integrating characteristics of C language

Author information +
文章历史 +

摘要

针对标准ST语言无法完全适应风机控制等应用场景的问题,提出并实现了一种融合C语言特性的扩展ST语言及其编译系统。该扩展ST语言将递归函数、无返回值函数、动态数组、功能块数组以及调用程序等特性融入标准ST语言内;在完全兼容标准ST语言的同时弥补了其不足。该编译系统支持扩展ST语言的词法分析、语法分析、语义分析与交叉编译,并生成控制器能够识别的可执行文件。扩展后的ST语言及其编译系统能够完全适应风力发电控制以及其他应用场景。在实际工程中的应用表明,扩展ST语言能够完全支持实际工程中的特殊应用,并能提高控制程序的编写及执行效率。

Abstract

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.

关键词

结构化文本语言 / 可编程逻辑控制器 / C语言

Key words

ST language / PLC / C langyage

引用本文

导出引用
张磊, 李响, 陈宏君, . 融合C语言特性的ST语言的扩展与编译[J]. 集成电路与嵌入式系统. 2024, 24(2): 74-80 https://doi.org/10.20193/j.ices2097-4191.2024.02.010
ZHANG Lei, LI Xiang, CHEN Hongjun, et al. Extension and compilation of ST language integrating characteristics of C language[J]. Integrated Circuits and Embedded Systems. 2024, 24(2): 74-80 https://doi.org/10.20193/j.ices2097-4191.2024.02.010
中图分类号: TP31 (计算机软件)   

参考文献

[1]
LARSON K. RTU Features IEC61131-3 Programming[J]. Control, 2021, 34(1):46-49.
[2]
VOGEL-HEUSER B, FISCHER J, HESS D, et al. Managing Variability and Reuse of Extra-functional Control Software in CPPS[C]// Design,Automation and Test in Europe Conference and Exhibition, 2021:755-760.
[3]
TM ANTONSEN. PLC Controls with Structured Text (ST),V3:IEC 61131-3 and best practice ST-programming[M]. Books On Demand, 2020.
[4]
VLADIMIR E Z, ANDREI S R, IGOR S A, et al. poST:A Process-Oriented Extension of the IEC61131-3 Structured Text Language[J]. IEEE Access, 2022(10):35238-35250.
[5]
FISCHER J, VOGEL-HEUSER B, HABEN F, et al. Reengineering Workflow for Planned Reuse of IEC 61131-3 Legacy Software[C]// 2020 IEEE International Conference on Industrial Engineering and Engineering Management.IEEE, 2020:1126-1130.
[6]
NEUMANN E M, VOGEL-HEUSER B, FISCHER J, et al. Identifying Runtime Issues in Object-Oriented IEC 61131-3-Compliant Control Software using Metrics[C]//IECON 2020-46th Annual Conference of the IEEE Industrial Electronics Society.IEEE, 2020.
[7]
JNANAMURTHY, H K JETLEY, RAOUL HENSKENS, et al. Multi-level analysis of IEC 61131-3 languages to detect clones[J]. International Journal of Computer Applications in Technology, 2020, 63(4):64-77.
[8]
ROSIAK K, SCHLIE A, LINSBAUER L, et al. Custom-Tailored Clone Detection for IEC 61131-3 Programming Languages[J]. Journal of Systems and Software, 2021.
[9]
BIRGIT V H, EVA-MARIA N, JULIANE F. MICOSE4aPS: Industrially Applicable Maturity Metric to Improve Systematic Reuse of Control Software[J]. ACM Transactions on Software Engineering and Methodology, 2021, 31(1).
[10]
KOZIOLEK H, BURGER A, PLATENIUS-MOHR M, et al. Rule-based code generation in industrial automation: four large-scale case studies applying the CAYENNE method[C]//ICSE '20:42nd International Conference on Software Engineering, 2020.
[11]
ALJOSHA K, TOM J, ALEXANDER F. A Method to Automatically Generate Semantic Skill Models from PLC Code[C]//IECON 2021 - 47th Annual Conference of the IEEE Industrial Electronics Society. IEEE, 2021.
[12]
FLORIAN H, BARBARA R. IEC 61131-3 Software Testing:A Portable Solution for Native Applications[J]. IEEE Transactions on Industrial Informatics, 2020, 16(6):3942-3951.
[13]
HE W, SHI J, SU T, et al. Automated test generation for IEC 61131-3 ST programs via dynamic symbolic execution[J]. Science of Computer Programming, 2021, 206(1).
[14]
MARCEL C W, KLAUS S. From IEC 61131-3 Function Block Diagrams to Sequentially Constructive Statecharts[C]//2022 Forum on Specification & Design Languages, 2022.
[15]
AN Y, QIN F W, CHEN B, et al. Onto PLC:Semantic Model of PLC Programs for Code Exchange and Software Reuse[J]. IEEE Transactions on Industrial Informatics, 2020(99).
[16]
XIA M, XIN L, YAN H H, et al. Programmable Logic Controllers Past Linear Temporal Logic for Monitoring Applications in Industrial Control Systems[J]. IEEE Transactions on Industrial Informatics, 2022, 18(7):4393-4405.
[17]
XIONG J W, BU X X, HUANG Y H, et al. Safety Verification of IEC 61131-3 Structured Text Programs[J]. IEEE Transactions on Industrial Informatics, 2021, 17(4):2632-2640.
[18]
RUGGERO L, MASSIMO M, ANDREI M. Industrial Control Systems Security via Runtime Enforcement[J]. ACM Transactions on Privacy and Security, 2022, 26(1).
[19]
CHEN Y, POSKITT C M, SUN J. Code Integrity Attestation for PLCs using Black Box Neural Network Predictions[C]// 29th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, 2021.
[20]
ZHONG C, DONG X, SUN H, et al. Research on Function Block Programmable Technology of Machine Vision[J]. Journal of Physics:Conference Series, 2020,1570.
[21]
WANG K, WANG J, Poskitt C M, et al. K-ST:A Formal Executable Semantics of PLC Structured Text Language[J]. IEEE Transactions on Software Engineering, 2022(2).
[22]
IEC61131-3,Programmable controllers-Part 3:Programming languages[S]. United States of America: International Electrotechnical Commission, 2022.
[23]
BASHEV V, ANUREEV I, ZYUBIN V. The Post Language:Process-Oriented Extension for IEC 61131-3 Structured Text[C]//2020 International Russian Automation Conference, 2020.
[24]
GROOTE J F, MOREL R, SCHMALTZ J, et al. Logic Gates,Circuits,Processors,Compilers and Computers[M].Springer Cham, 2021.
[25]
BACELAR ALMEIDA J C, BARBOSA M, BARTHE G, et al. A formal treatment of the role of verified compilers in secure computation[J]. The journal of logical and algebraic methods in programming, 2022, 125(2):100736-100757.
[26]
李学良, 赵千川, 杨文, 等. PLC指令表程序的一种语法分析方法及其在代码静态测试上的应用[J]. 清华大学学报(自然科学版), 2021, 61(10):1159-1165.
LI X L, ZHAO Q CH, YANG W, et al. A syntax analysis method for PLC instruction table programs and its application in static code testing[J]. Journal of Tsinghua University(Science and Technology), 2021, 61(10):1159-1165 (in Chinese).
[27]
KOLP M, WAUTELET Y, HENG S. Design Patterns for Social Intelligent Agent Architectures Implementation[M].IGI Global, 2021.

基金

国网电力科学研究院科技项目-自主可控通用型PLC软件平台研制(JS22011447)

编辑: 薛士然
PDF(916 KB)

Accesses

Citation

Detail

段落导航
相关文章

/