Computer Engineering and Applications ›› 2012, Vol. 48 ›› Issue (14): 68-73.

Previous Articles     Next Articles

Design of PLC source coding and interpretation algorithm

ZHUO Baote1,2, LUAN Yong2,3, LIU Wei2,3, LIU Zhanqing2,3   

  1. 1.Graduate University, Chinese Academy of Sciences, Beijing 100049, China
    2.Shenyang Institute of Computing Technology, Chinese Academy of Sciences, Shenyang 110168, China
    3.Shenyang Golding NC Tech. Co., Ltd., Shenyang 110168, China
  • Online:2012-05-11 Published:2012-05-14

PLC源程序编码方法与解释执行算法设计

卓保特1,2,栾  勇2,3,刘  伟2,3,刘占清2,3   

  1. 1.中国科学院 研究生院,北京 100049
    2.中国科学院 沈阳计算技术研究所,沈阳 110168
    3.沈阳高精数控技术有限公司,沈阳 110168

Abstract: Traditional PLC source program compilation methods, although fast, small footprint, but are not flexible enough and poor portability; traditional interpretation methods of PLC source program have good flexibility, but the execution is slow and it takes up storage space.In order to take into account the storage space, execution speed and portability, it gives a PLC source coding method to reduce the storage space, simplify the interpretation algorithm, based on the expression evaluation and the traditional PLC source interpretation algorithm, to take full advantage of the nature of logic operation, it proposes an improved PLC source interpretation algorithm, greatly reducing the number of logical steps, and improves the speed of the PLC system operation.

Key words: programmable logic controllers, SIPROM, coding, logical operation, interpretation algorithm

摘要: 传统PLC源程序的编译方法,虽然执行速度快,占用资源少,但可移植性差不够灵活;传统PLC源程序的解释方法虽然灵活性好,但执行速度慢且占用存储空间大。为了兼顾存储空间、执行速度和可移植性,给出了一种PLC源程序的编码方法,减少了存储空间,简化了解释执行算法,并在表达式求值算法和传统PLC解释执行算法的基础之上,充分利用逻辑运算的性质,提出了改进的PLC解释执行算法,大大减少了逻辑运算的步数,提高了PLC系统运行的速度。

关键词: 可编程控制器, SIPROM, 编码, 逻辑运算, 解释算法