基于IEC61131-3标准的PLC底层开发
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
IEC61131-3标准作为工业自动化控制系统编程语言的国际标准,其开放性和先进性得到了广泛关注和充分肯定。开发符合IEC61131-3标准的自动化产品意义重大,也是必要的。
     本文根据IEC61131-3标准定义的编程模型,实现了下位机系统程序设计和与上位机的通信功能。
     下位机采用ATmega64微处理器,实现了对上位机用户程序的装载和执行,包括串口通信、功能块的执行、用户变量的地址分配等。上位机基于Visual C++6.0开发了符合IEC61131-3编程标准的PLC用户编程环境程序。
     本课题使用的处理器采用了ATMEL公司的ATmega64单片机,软件开发环境采用了ICCAVR编译器和AVR Studio仿真器。在ICCAVR编写完成系统程序后,通过JTAG接口下载到PLC的FLASH存储区,并加密。
     下位机系统程序,对用户变量实现了动态分配,也就是根据用户使用的变量的个数分配内存空间。目前市场上多数PLC采用固定内存分配,即每款产品的不同类型的变量都有最大个数的限制,并分配固定的内存空间。与固定内存分配相比,动态分配内存既避免了用户编程时受到最大支持变量个数的限制,也节省了下位机内存空间。另外,下位机在装载上位机的用户程序的过程中,进行了指令扩展和代码转换,大大提高了PLC的运行速度。这两点是本课题的创新所在。
     为了便于读者理解和文章的完整性,本文首先对硬件和上位机用户编程环境做了简单介绍;后根据下位机系统程序流程依次介绍各个模块的设计。本课题按照预期设计思想完成了PLC下位机系统程序的开发,并下载到处理器中,在仿真情况下能够正常运行,达到了期望效果。
As the standard of programming language of automation control system, IEC61131-3 standard is widely used and gains agreement. It's very important to develop products based on this standard.
     Based on the content about programming module in IEC61131-3, develop the system program of PLC and the communication function with PC.
     The users' programming environment is developed on Windows operating system and VC++, based on IEC61131-3 standard.
     The key technology has three parts. The first part is the design of physical hardware, which is finished by a hardware engineer. The second is the development of users' programming environment, including edit window development, algorithm of translating ladder diagram to executive codes, and serial port communication. The two parts are introduced simply.
     The main part is the system program of PLC, which is the bridge of physical hardware and users' program. The third part is the main point of this paper. The system program performed loading the users control program, users' program explanation and execution, error application, interrupt response and so on.
     The CPU of PLC used was Atmega64 singlechip. The development tools were necessary, and I used the ICCAVR compiler and AVR Studio emulator. After finishing the system program of PLC under ICCAVR complier, download it to flash memory of PLC through JTAG interface.
     The system program finished dynamic storage allocation, locating the memeory based on the number of variables users used. Most PLCs adopted fixed storage allocation, allocating the memory by supportable maximum. Compared with fixed storage allocation, the dynamic storage allocation avoided the limitation of sullortable maximum to users, and save a lot of memeroy. On the other hand, the system program expanded the instructs and converted the codes from four bytes to six bytes, which increased the program execution speed.
     To good comprehension, the paper first introduced the hardware and users' programming environment of PLC. Secondly, give a detailed introduction about the system program. The system programs were downloaded to the Atmega64 singlechip, and achieved the expectation effect in the emulation state.
引文
[1]汪志锋.可编程控制器原理与应用(第一版).西安:西安电子科技大学出版社,2004
    [2]王莺.工业可编程控制器的现状与发展趋势[J].航天技术与民品,1999,5:12-15
    [3]王月生.1EC61131-3标准与ARM嵌入式控制系统[J].单片机与嵌入式系统应用,2006,5:17-23
    [4]Labrosse Jean J,邵贝贝译.嵌入式实时操作系统[M].北京:北京航空航天大学出版社,2003
    [5]彭瑜.工控编程语言IEC 6113123的现状和发展[J].国内外机电一体化技术,2004(1):15-18
    [6]崔龙,崔启明,江文瑞.基于ARM的实时测控系统开发平台[J].单片机与嵌入式系统应用,2003,1:49-50
    [7]马忠梅,徐英慧,叶勇建.AT91系列ARM核微控制器结构与开发[M].北京:北京航空航天大学出版社,2003
    [8]幺开宇.基于IEC 61131-3标准的嵌入式软PLC虚拟机[J].制造技术与机床,2005,15:67-70
    [9]黄江海,李宇成.基于IEC61131-3的新型PLC系统的设计[刀.北京工业大学机电工程学院,2004,3:35-39
    [10]袁兆辉,高胜,吴泽龙.软件PLC技术及其应用特点[J].江苏工业学院学报,2004,1:29-31
    [11]李捷,霍光青.可编程控制器中的新技术一软PLC[J].林木加工机械,2004,4:9-11
    [12]K.Ooshima,N.Akino.Application of PLC to dynamic control system for liquid He cryogenic pumping facility on JT-60U NBI system(J).Fusion Engineering and Design,2008,83:276-279
    [13]S.Matsuda,M.Akiba,M.Araki,M.Dairaku,N.Ebisawa and H.Horiike et al.The JT-60neutral beam injection system(J),Fusion Eng,1987,5:85-100
    [14]K.Shibanuma,N.Akino,M.Dairaku,S.Kunieda,M.Kuriyama and S.Matsuda et al.Suppression contxol of thermal imbalance in cooling of cryopumps for JT-60 neutral beam injector(J).Atom.Energy Soc,1991,33:1171-1179
    [15]朱文凯.基于嵌入式PC的开放式软PLC[J].机械与电子,2003,1:56-59
    [16]罗华丽,李斌,汤志斌.开放式数控系统中的软件PLC技术研究[J].组合机床与自动化加工技术,2003,2:34-37
    [17]罗伯特·杉布,王蔚庭.IEC 61131-3国际标准简介[J].国内外机电一体化技术,2001,1:55-60
    [18]罗伯特·杉布,王蔚庭.IEC 61131-3软件:一种先进的工业控制编程系统[J].国内外机电一体化技术,2001,2:53-70
    [19]罗伯特·杉布,王蔚庭.IEC61131-5:PLC的通讯[J].国内外机电一体化技术,2001.2:23-26
    [20]罗伯特·杉布,王蔚庭.符合IEC61131-3实际编程系统[J].国内外机电一体化技术,2001.5:18-21
    [21]A.Honda,E Okano,K.Ooshima,N.Akino,K.Kikuchi,Y.Tanai,et al.PLC control of NBI cryogenic facility for JT-60U(J).Japan Atomic Energy Agency 2006,020
    [22]Mario Grabner,Gerhard Leonhartsberger,Alexander Leutgeb,Josef Altmann.Java in Industrial Automation-A Virtual PLC(J).Proceedings of the 25th International Computer Software and Applications Conference on Invigorating Software Development.2001,10:477-483
    [23]Karl-Heinz John.IEC 61131-3:工业自动化系统的程序编制[J].中国机电一体化技术应用协会出版,2002,1:45-57
    [24]杨磊,徐蓉萍.IEC 61499—工业控制技术发展的新阶段[J].计算机测量与控制,2002,10:721-724
    [25]杜品圣,张龙.基于IEC61131标准编程语言的Phoenix Contact自动控制系统[J].国内外机电一体化技术,2003,9:33-36
    [26]彭瑜.IEC61131-3的现状与发展[J].世界仪表及自动化,2002,8,21-24
    [27]吕映芝,张素琴,蒋维杜.编译原理[M].北京:清华大学出版社,1999
    [28]S.Da'na,PA.Sagahyroon,A.Elrayes,A.R.Al-Ali,R.Al-Aydi.Development of a monitoring and control platform for PLC-based applications(J).Computer Standards &Interfaces,2008,30
    [29]Thomas W.Jackson,Anthony Burgess,Janet Edwards.A simple approach to improving email communication(J).Communications of the ACM,2006,49:6
    [30]王慧,金以慧.计算机控制系统[M].北京:化学工业出版社,2000
    [31]M.R.Lucas,D.M.Tilbury.A study of current logic design practices in the automotive manufacturing industry(J).International Journal of Human-Computer Studies,2003,59:5
    [32]韩立新,冠东生,可编程序控制器的实时多任务特性,制造业自动化,2003(2)
    [33]G Gadda.Bridging structural and software design of PLC-based system families(J).Proceedings of the 1st International Conference on Engineering of Complex Computer Systems,1995,11
    [34]Jae Ick Lee,Sung Wook Chun,Soon Ju Kang.Virtual prototyping of PLC-based embedded system using object model of target and behavior model by converting RLL-to-statechart directly(J).Journal of Systems Architecture:the EUROMICRO Journal,2002,48:1-3
    [35]卢松涛,李震宇,软PLC在自动化立体仓库中的应用,国内外机电一体化技术,2003(6)
    [36]朱小壤.ModBus通信协议及编程[J].电子工程师,2005,33(07):53-55
    [37]王捷,艾红.集散控制系统应用研究[J].仪器仪表学报,2003,12(01):13-16
    [38]潘世永,郑萍,李英.集散控制系统得发展和展望[J].自动化与仪器仪表,2003,4:34-37
    [39]王锡俊.德国科维软件:真正的IEC61131-3编程软件[EB/OL].FA/PA专栏
    [40]彭瑜.工控编程语言国际标准IEC 61131-3及其影响[EB/OL].PLCOpen专栏
    [41]付树东.基于IEC61131-3标准的PLC系统研究与应用[D].大连,大连理工大学,2006
    [42]陈永利.基于PLC的高炉槽下配料控制系统[D].重庆大学,2006
    [43]Chang Mok Park,Sachin Man Bajimaya,PSang C.Park,Gi Nam Wang,Jong Geun Kwak,Kwan Hee Han.Development of Virtual Simulator for Visual Validation of PLC Program(J).Proceedings of the International Conference on Computational Inteligence for Modelling Control and Automation and International Conference on Intelligent Agents Web Technologies and International Commerce,2006
    [44]Eiji Konaka,Takashi Mutou,Tatsuya Suzuki,Shigeru Okuma.Optimal Design of Sensor Parameters in PLC-Based Control System Using Mixed Integer Programming(J).IEICE Transactions on Fundamentals of Electronics,Communications and Computer Sciences,2005,E88-A:4
    [45]Inmaculada Plaza,Carlos Medrano.Exceptions in a Programmable Logic Controller implementation based on ADA(J).Computers in Industry,2007,58:4
    [46]许世法.基于PC的软PLC—上位机系统设计与实现[D].西华大学,2007
    [47]万涛.基于IEC61 131-3标准编程环境的研究与开发[D].武汉大学,2005
    [48]张刚.开放式PLC系统得研究与开发[D].辽宁工程技术大学,2007
    [49]郭福帅.基于IEC61131-3标准的可编程控制器的研究与实现[D].大连理工大学,2006
    [50]IEC61131标准[S]
    [51]Ping-Huang Wu,PChin-Hwa Kuo,Chin-Chung Lin,Pei-Lin Wu.Design and Implementation of the PLC Control Lab Using GSM System(J).Proceedings of the Sixth IEEE International Conference on Advanced Learning Technologies,2006
    [52]Anders Hellgren,Bengt Lennartson,Martin Fabian.Modelling and PLC-Based Implementation of Modular Supervisory Control(J).Proceedings of the Sixth International Workshop on Discrete Event Systems,2002
    [53]Josef Tapken,Henning Dierks.MOBY/PLC-Graphical Development of PLC-Automata(J).Proceedings of the 5th International Symposium on Formal Techniques in Real-Time and Fault-Tolerant Systems,1998

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700