节点文献
PLC与上位机的高速通信实现
High-speedCommunication between PLC and host computer
【摘要】 本文先介绍了S7-200系列PLC的三种通信方式,及其在网络中通信的RS-232和RS-485标准。在实例中,采用西门子公司的S7-200系列PLC为下位机,按照RS-485标准与上位机通信;通信协议为以自由口模式创建用户自定义的协议,数据传输格式为16进制ASCⅡ编码,求和校验;上位机采用VC编程的可视化界面,在编程过程中采用不可中断方式和多缓冲区结构,实现了可靠且高速的通信方式。
【Abstract】 Three communication mode of S7-200 serial PLC,and the RS-232 and RS-485 standard are introduced firstly. In the examples,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 protocol. A user defined protocol cre-ated by freeport mode was taken as the communication and hexadecimal ASCⅡ code as the form of data transform to verify the sum of ASCⅡ. 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 that realized high-speed and fixed communication mode.
【Key words】 PLC; serial communication; high speed communication; VC; freeport mod;
- 【文献出处】 微计算机信息 ,Microcomputer Information , 编辑部邮箱 ,2007年34期
- 【分类号】TP273.5
- 【被引频次】22
- 【下载频次】395