摘要
文章依照现场总线技术要求,设计一种简化的、仅包括通信模型(ISO/OSI模型)的第1、2层及传输几比特节点信息,采用主从方式数据链路协议的分布式监控系统。其中以IBM-PC机作为主机,各AT89C4051单片机作为从机。主、从机之间传输介质为双绞线,按RS-485串行总线标准及接口技术实现信息交换。讨论了在VisualC++开发平台下,利用一种封装好的串口类CserialPort来设计串行通信的实现方法(兼有WindowsAPI通信函数法和使用串口通信组件如ActiveX控件MSComm法的特点),并对通信协议、出错处理等作了较为详尽的叙述。
According to the requirement of field bus technology, a kind of distributed measuring & controlling system is developed in this paper which contains the first and second layer communication models(ISO/OSI model) to transfer only several bytes of information of each node and adopts the data link protocol of master-slave mode. In the system, an IBM-PC works as the host processor while the slave processors are the AT89C4051 chip microprocessor. The transfer medium between the host and slave processors is twisted-pair wire, and the information exchange is accomplished according to the RS-485 serial bus standard and the interface technology. Also discussed is the method of serial communication using an enveloped serial class named as CserialPort on the Visual C++ developing platform, which has the merits of using Windows API functions means and that of using the serial communication control, such as the MSComm of ActiveX, and the protocol and error processing are studied.
出处
《合肥工业大学学报(自然科学版)》
CAS
CSCD
2004年第10期1355-1358,共4页
Journal of Hefei University of Technology:Natural Science
关键词
分布式测控系统
通信协议
串口类
distributed measuring & controlling system
communication protocol
serial class