检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:赵奎 陈宏君[1] 吴波[1] 张磊[1] 文继锋[1] Zhao Kui;Chen Hongjun;Wu Bo;Zhang Lei;Wen Jifeng(NR Electric Co.,Ltd.,Nanjing 211102,China)
出 处:《单片机与嵌入式系统应用》2018年第12期15-18,共4页Microcontrollers & Embedded Systems
摘 要:提出了一种符合IEC61131标准的结构化文本语言虚拟机指令高效解释执行的实现方案。结构化文本语言编译器将程序组织单元编译为二进制文件,该文件包括数据区、指令区。解释器内嵌各条指令对应的C执行函数和系统库函数。解释器在初始化中读取指令文件,构建数据区、指令节点链表、以跳转标号为关键字的指令序号hash表。指令节点记录形参地址、执行函数指针。在周期执行的任务中,顺次遍历指令链表。对于常规运算指令,调用指令节点关联的内嵌函数。对于跳转指令,根据跳转标号从hash表获取指令序号,动态调整当前执行的节点位置。该方案解决了线性指令表结构顺序执行时无法支持跳转和可变形参的问题,提高了解释器的执行效率,满足了工控系统的实时性要求。In the paper,an efficient implementation scheme is proposed for the interpretation and execution of structured text language virtual machine instructions in accordance with IEC61131 standard.The structured text language compiler compiles a program organization unit into a binary file that includes data areas and instruction areas.C execution functions and system library functions corresponding to each instruction are embedded in the interpreter.The interpreter reads the instruction file during initialization,and constructs the data area,the instruction node chain table,and the instruction sequence number hash table with the jump label as the key word.The instruction node records the actual parameter address and the execution function pointer.For normal operation instructions,the embedded function associated with the instruction node is called.For the jump instruction,the instruction sequence number is obtained from the hash table according to the jump label,and the node position currently executed is dynamically adjusted.This scheme solves the problem that jump and deformable parameter cannot be supported in the sequential execution of the linear instruction list,improves the execution efficiency of the interpreter,and satisfies the real-time requirement of the industrial control system.
分 类 号:TP314[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.40