数据采集系统串口通信的设计与实现
DOI:
作者:
作者单位:

1.青岛远洋船员职业学院图文信息中心青岛266071;2.青岛大学自动化工程学院青岛266071

作者简介:

通讯作者:

中图分类号:

TP31

基金项目:

国家自然科学基金(51475013,51105008)、北京市教委科研计划面上项目(KM201310005034)、杭州电子科技大学重中之重学科开放基金项目


The design and implementation of serial port communication of data collection system
Author:
Affiliation:

1.Qingdao Ocean Shipping Mariners College, Center of library and information, Qingdao 266071,China; 2.Qingdao University, Automation engineering college, Qingdao 266071,China

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    串口通信因其简单、可靠和高标准化在工业自动化和电子仪器控制中得到广泛的应用。介绍数据采集系统串口通信的设计和实现。首先以Visual C++的编程环境为例,给出了用MSComm控件实现计算机与下位机之间的串口通信关键代码设计,介绍了MSComm控件的创建和属性的设置后,又从数据的发送和接收2个方面详细阐述了其关键代码的实例。然后,进行了通信传输协议的设计,以图形和代码示例详细展示了如何实现数据块的传输。接着给出了通信握手协议的设计,以流程图的形式讲述了上位机与下位机之间如何实现握手的。最后展示了系统运行的结果。还做了思路扩展,提出了实现计算机与下位机之间远程串口通信的2种方案。

    Abstract:

    As a simple, reliable and highly standard way of communication, serial port communication is widely used in industrial automation and electrical equipment controller. The paper presents the way to implement serial port communication of a data collection system. Take Visual C++ programming as example, the key code for MSComm control is presented to implement serial port communications between computer and lower computer. It presents how to create and set up the MSComm control properties. Detailed key code design is discussed from sending perspective and receiving perspective. The communication transfer protocol is designed in details with figure illustration and code examples. The communication handshake protocol is designed in details with process presented to show how the handshake does between computer and lower compute. At the end, the running result for the system is shown. The paper also extends its strategy to long distance communications between computer and lower computer. Two designs are mentioned.

    参考文献
    相似文献
    引证文献
引用本文

蒋萍花,张楠.数据采集系统串口通信的设计与实现[J].电子测量技术,2015,38(6):139-142

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2015-06-05
  • 出版日期: