期刊文献+

基于C#的西门子PLC以太网通讯接口的实现 被引量:7

Implementation of SIEMENS PLC Ethernet Communication Based on C#
下载PDF
导出
摘要 针对工业控制系统中西门子系列PLC与上位机通信问题,提出了一种基于C#的西门子PLC以太网通讯的实现方法。具体方法为:用C#语言编写上位机界面,采用Socket通讯方式,根据西门子PLC的通讯协议,直接对PLC地址内容进行读写操作。并以1212C型PLC为例,实现了对PLC的读取,并将程序封闭,方便调用。实践表明:提出的方法可扩展到西门子其他型号的PLC;克服了以往通信系统受固定通信协议与组态软件的限制,降低成本;采用了先进的编程语言C#,C#对比VB具体多线程的优势,可同时连接多个PLC进行通讯,系统不会出现中断或反应速度变慢的情况;C#对比C/C++具有更简便的可视化编程,能够快速的编写上位机界面,使用更灵活。 In view of the actual problem of communication between SIEMENS serial PLC and host computer in industrial control system, this paper introduces a method to realize SIEMENS PLC Ethernet communication based on C#. The concrete method is to write the upper computer interface using C# language, and adopt the Socket communication mode. According to the communication protocol of SIEMENS PLC, the content of PLC address is read and written directly. The 1212C PLC is taken as an example, the PLC can be successfully read. The program is with a closed structure, so is easy to be called. Experiments show that the method can be extended to other types of SIEMENS PLC, overcomes the restriction of fixed signal protocol and configuration software in communication systems. It also reduces the cost. Finally the method adopts more advanced programming language, comparing with VB, the C# language can simultaneously connect multiple PLC communication systems, and avoid to interrupt or slow down the reaction rate;compared with the C/C++, its visual programming is more convenient, can quickly write in PC interface, and more flexible be used.
作者 陈雪娇 缪文南 CHEN Xuejiao;MIAO Wennan(Guangzhou College South China University of Technology, Guangzhou 510800)
出处 《微型电脑应用》 2019年第4期117-119,共3页 Microcomputer Applications
关键词 C# 西门子PLC 以太网通讯 Socket模块 C# SIEMENS PLC Ethernet communication Socket module
  • 相关文献

参考文献5

二级参考文献15

共引文献52

同被引文献46

引证文献7

二级引证文献7

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部