引用本文
  •    [点击复制]
  •    [点击复制]
【打印本页】 【下载PDF全文】 查看/发表评论下载PDF阅读器关闭

←前一篇|后一篇→

过刊浏览    高级检索

本文已被:浏览 444次   下载 302 本文二维码信息
码上扫一扫!
基于VC的上位机与PLC可靠通信的实现方法
0
()
摘要:
针对目前市场上上位机通信软件专用、封闭、不兼容等问题,提出了用VC实现上位机与PLC通信的方法。采用西门子公司的S7-200系列PLC为下位机,按照RS-485标准与上位机通信;通信协议为以自由口模式创建用户自定义的协议,数据传输格式为16进制ASCⅡ编码,求和校验;上位机采用VC编程的可视化界面,在编程过程中采用不可中断方式和多缓冲区结构,并建立相应的控制指针。试验结果表明,当数据传输速率为9.6kbit/s时误码率〈10^-5能够实现现场网络的在线监控、调试及数据修改。
关键词:  串行通信 可编程控制器 VC编程 PLC
DOI:10.11841/j.issn.1007-4333.2005.02.048
投稿时间:2004-11-04
基金项目:
A VC-based approach to realize a reliable communication between PLC and IPC
Abstract:
The interfaces of most PC(IPC)communication software in the market has the problems of individual, enclosed, and less compatibility. The paper developed a VC-based communication approach for the communications between PLC and IPC and adopted PLC-S7-200 of SIEMENS as slave device, which communicate with IPC by RS-485 standard, in the realized system. A user-defined protocol created by freeport mode was taken as the communication protocol, and hexadecimal ASCII code as the form of data transform to verify the sum of ASCII. A non-maskable-interrupt and a multi-buffer structure were adopted and a corresponding controlling pointer was set up during the course of date receiving and sending. The test results indicated that the functions of online surveillance and remote debugging and amending could be realized with code-error less than 10 -5 when transferring data at a speed of 9.6 kbit/s.
Key words:  serial communication  programmable controller  VC programming  PLC