摘要
对于进行数据采集和处理的微机系统 ,常要把数据传输到主计算机中作进一步的分析和利用。实现与主机的数据通信 ,现在普遍采用串行口与主机进行通信。编写串行通信程序在不同的操作平台下 ,方法不同 ,效率也不同。该文主要研究了在Windows平台下利用微软控件 -MSComm控件的编程方法。因为串行通信编程是一件复杂和伤脑筋的工作 ,所以先介绍MSComm控件的工作模式、属性以及事件 ,再以炮兵分队虚拟现实训练系统中数据手套与主机的串行通信为例 ,阐述了串行通信的编写方法 ,最后总结了串行通信的编写经验。通过实践证明该方法能够提高软件的开发效率 ,便于程序的管理和维护。
It's always necessary to send the data to the host computer to analyze and use farther for microcomputer systems with plenty of data to be collected and processed .The welcome method is serial communication to realize the data communication with the host computer. In different operation systems there are different methods and efficiency. In this paper, we mainly research the programming method with the use of Microsoft controls in windows operation system. Because serial communication programming is difficult and complex, at the beginning we introduce the work mode, properties and events of the MSComm control. Then we provide the programming method using the example of the Data Glove communicating with mainframe in Artillery Company Virtual Reality Training System. At last, we make a conclusion of programming serial communication . From our practice, our method is efficient and convenient for the management and maintenance of program.
出处
《计算机仿真》
CSCD
2005年第2期127-129,共3页
Computer Simulation
关键词
虚拟现实
微软控件
串行通信
操作模式
Virtual reality
Microsoft controls
Serial communication
Operation mode