PLC梯形图中内嵌C语言编程的实现 - 机电工程
第29 卷第4 期 机 电 工 程 Vol. 29 No.4
A-PDF Split DEMO : Purchase from www.A-PDF.com to remove the watermark
2012 年4 月 Journal of Mechanical & Electrical Engineering Apr. 2012
PLC梯形图中内嵌C语言编程的实现
黄小强,严 义,邬惠峰,吴盼盼
(杭州电子科技大学 计算机学院,浙江 杭州 310018)
摘要:针对现有梯形图语言适合实现逻辑控制而不适合实现复杂算法这一问题,从基于构件技术的梯形图实现原理出发,对构件的
属性定义以及编译方法进行了分析,提出了一种PLC 梯形图内嵌C 语言实现混合编程的方法,并在CASS (computer assist special
system)梯形图算法生成平台上进行了验证。实验结果表明,提出的方法适于复杂算法的实现,并且能够减少程序的代码量。
关键词:梯形图;C语言;混合编程;CASS
中图分类号:TH39 ;TP311 文献标志码:A 文章编号:1001-4551 (2012 )04-0421-04
ImplementationofembeddingClanguageprogramming
inPLCladderdiagram
HUANG Xiao-qiang ,YAN Yi ,WU Hui-feng ,WU Pan-pan
(College of Computer ,Hangzhou Dianzi University ,Hangzhou 310018 ,China)
Abstract:Aiming that the ladder diagram (LD )language is incompetent in realizing complex algorithms ,a mix programming method of
ladder diagram and C language was proposed. The component technology for ladder diagram implementation was analyzed and the way to
embed C language inside ladder diagram was introduced. Experiments were carried out based on the computer assist special system (CASS)
platform. Results show that the proposed method is fit for complex algorithm implementation ,and the code size could also be reduced.
Keywords:ladder diagram (LD );C language ;mixed programming ;computer assist special system(CASS)
方面做了研究,例如文献[4 ]给出了在西门子S7-200
0 引 言
PLC 的梯形图上实现模糊神经网络算法,但是该算法
[1]
可编程逻辑控制器(PLC )是一种以微处理器技 实现困难,并且会使代码量大大增加,延长开发周
术、电子信息技术、网络通信技术和自动控制技术为依 期。因此,研究一种能将复杂的算法嵌入到梯形图中
托的新型通用自动控制装置,它在工业控制领域备受 实