摘要
本文先介绍了S7-200系列PLC的三种通信方式,及其在网络中通信的RS-232和RS-485标准。在实例中,采用西门子公司的S7-200系列PLC为下位机,按照RS-485标准与上位机通信;通信协议为以自由口模式创建用户自定义的协议,数据传输格式为16进制ASCⅡ编码,求和校验;上位机采用VC编程的可视化界面,在编程过程中采用不可中断方式和多缓冲区结构,实现了可靠且高速的通信方式。
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 created by freeport mode was taken as the communication and hexadecimal ASCII code as the form of data transform to verify the sum of ASCII. A non-maskable-interrupt and a muhi-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.
出处
《微计算机信息》
北大核心
2007年第34期52-54,共3页
Control & Automation
关键词
PLC
串行通信
高速通信
VC
自由口模式
PLC, serial communication, high speed communication, VC, freeport mod