[1]屈武江.基于 API 函数库实现串口数据通信的分析与设计[J].计算机技术与发展,2020,30(04):167-170.[doi:10. 3969 / j. issn. 1673-629X. 2020. 04. 032]
 QU Wu-jiang.Analysis and Design of Serial Port Data Communication Based on API Function Library[J].COMPUTER TECHNOLOGY AND DEVELOPMENT,2020,30(04):167-170.[doi:10. 3969 / j. issn. 1673-629X. 2020. 04. 032]
点击复制

基于 API 函数库实现串口数据通信的分析与设计()
分享到:

《计算机技术与发展》[ISSN:1006-6977/CN:61-1281/TN]

卷:
30
期数:
2020年04期
页码:
167-170
栏目:
应用开发研究
出版日期:
2020-04-10

文章信息/Info

Title:
Analysis and Design of Serial Port Data Communication Based on API Function Library
文章编号:
1673-629X(2020)04-0167-04
作者:
屈武江
大连海洋大学 应用技术学院,辽宁 大连 116300
Author(s):
QU Wu-jiang
Institute of Applied Technology,Dalian Ocean University,Dalian 116300,China
关键词:
串口数据通信VS2012API 函数库分析与设计
Keywords:
serial port data communicationVS2012API function libraryanalysis and design
分类号:
TP302
DOI:
10. 3969 / j. issn. 1673-629X. 2020. 04. 032
摘要:
串口数据通信能够实现计算机与外部设备之间的数据传输,广泛应用于实时监控和工业自动化系统中,为此开发高效、快速、实用的串口数据通信系统尤为重要。 从串口数据通信实现的过程出发,详细介绍了使用 VB6.0 的 MSComm 控件、使用 SerialPort 串口通讯类和调用 API 库中的通信函数三种方法实现串口数据通信的过程。 并以农业生产蔬菜大棚自动杀虫灯数据采集分析程序为例,应用 VS2012 集成开发环境从基于 API 函数库实现串口数据通信系统的设计思路、打开串口和接收数据等通用类方法设计入手,实现了自动杀虫灯数据采集分析串口数据通信程序在 VS2012 中的设计。 实验结果显示,在 VS2012 系统中采用 API 函数库实现的串口数据采集通信系统,编程效率较高、可移植性强,同时适合于对通信质量要求较高,传输距离较远的应用场合。
Abstract:
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 articularly 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.
更新日期/Last Update: 2020-04-10