期刊文献+

基于API函数库实现串口数据通信的分析与设计 被引量:4

Analysis and Design of Serial Port Data Communication Based on API Function Library
下载PDF
导出
摘要 串口数据通信能够实现计算机与外部设备之间的数据传输,广泛应用于实时监控和工业自动化系统中,为此开发高效、快速、实用的串口数据通信系统尤为重要。从串口数据通信实现的过程出发,详细介绍了使用VB6.0的MSComm控件、使用SerialPort串口通讯类和调用API库中的通信函数三种方法实现串口数据通信的过程。并以农业生产蔬菜大棚自动杀虫灯数据采集分析程序为例,应用VS2012集成开发环境从基于API函数库实现串口数据通信系统的设计思路、打开串口和接收数据等通用类方法设计入手,实现了自动杀虫灯数据采集分析串口数据通信程序在VS2012中的设计。实验结果显示,在VS2012系统中采用API函数库实现的串口数据采集通信系统,编程效率较高、可移植性强,同时适合于对通信质量要求较高,传输距离较远的应用场合。 Serial data communication can realize the data transmission between the computer and external equipment,which is widely used in real-time monitoring and industrial automation systems,so it is particularly important to develop an efficient,fast and practical serial data communication system.Starting from the process of realizing serial data communication,we introduce in detail the process of realizing serial data communication by using MSComm control of VB6.0,SerialPort serial communication class and calling communication function in API library.Taking the data acquisition and analysis program of automatic insecticidal lamp for agricultural production vegetable greenhouse as an example,the design idea of serial data communication system based on API function library,the design of open serial port and receive data and other general class methods are applied in the integrated development environment of VS2012.The design of serial data communication program of automatic insecticidal lamp data acquisition and analysis is realized in VS2012.The experiment shows that the serial data acquisition and communication system based on API function library in VS2012 system has high programming efficiency and mobility,and is suitable for applications with high communication quality and long transmission distance.
作者 屈武江 QU Wu-jiang(Institute of Applied Technology,Dalian Ocean University,Dalian 116300,China)
出处 《计算机技术与发展》 2020年第4期167-170,共4页 Computer Technology and Development
基金 2017年辽宁省教育科学研究项目(QL201722)。
关键词 串口数据通信 VS2012 API函数库 分析与设计 serial port data communication VS2012 API function library analysis and design
  • 相关文献

参考文献10

二级参考文献36

共引文献90

同被引文献31

引证文献4

二级引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部