摘要
上位机在Visual Basic 6.0环境下与下位S7-200 PLC的自由口通讯是一种成本低、结构简单、性能优异的串行通讯方式。VB提供了两种串口通讯程序开发方式,调用ActiveX控件MSComm方式和调用API动态链接库方式。前者较后者编程简单,系统稳定性好。本文阐述了如何运用MSComm控件与S7-200PLC实现串行通信,具体给出了自由口通讯所需要的硬件配置要求以及上位机与下位机程序设计方法。
The free port communication of PC environment in Visual Basic 6.0 and the next crew S7-200 PLC is a low cost,simple structure,good performance serial communication.VB provides two kinds of development way for serial communication program,calling the ActiveX control method and the API MSComm dynamic link library way.The former is simple for programming and has good system stability than the latter.This paper describes how to use S7-200PLC MSComm for the serial communication,detailed description of the free port communication needs as well as PC hardware configuration requirements and the next crew programming.
出处
《现代科学仪器》
2011年第1期48-51,共4页
Modern Scientific Instruments