首页 | 本学科首页   官方微博 | 高级检索  
     

基于多线程的串口通信软件的设计与实现
引用本文:吴先亮,刘春生.基于多线程的串口通信软件的设计与实现[J].控制工程,2004,11(2):171-174.
作者姓名:吴先亮  刘春生
作者单位:南京航空航天大学,自动化学院,江苏,南京,210016;南京航空航天大学,自动化学院,江苏,南京,210016
摘    要:针对串口通信实时性和系统资源利用的不足,提出了基于多线程技术和自定义消息机制的异步串口通信的设计思想。结合串口通信的机理和多线程同步方式,分析了Win32系统下多线程异步串口通信程序的开发方法。用Delphi实现了加油站中央控制系统中PC机与单片机间的串行通信软件,给出了软件的设计思路,一般步骤和部分程序代码。目前该通信软件已稳定地运行在各加油站中央控制系统中,促进了石油行业自动化的发展,也为相关行业实现自动化提供了帮助。

关 键 词:多线程  串口通信  Delphi  消息机制
文章编号:1671-7848(2004)02-0171-04
修稿时间:2003年7月11日

Programming of Serial Communication Design and Implement Based on Multi-thread
WU Xian-liang,LIU Chun-sheng.Programming of Serial Communication Design and Implement Based on Multi-thread[J].Control Engineering of China,2004,11(2):171-174.
Authors:WU Xian-liang  LIU Chun-sheng
Abstract:In light of disadvantages of serial communication in real time and using of system resource, the idea of asynchronous serial communication design based on the multi-thread technology and self-defined message is presented. The serial communication mechanism and thread synchronization are employed in the achievement to the idea. The way to 32-bits operation system multi-thread asynchronous serial communication programming is analyzed. The serial communication programming in Delphi language between PC and single- chip is implemented in gas station computer central controlling system. And the idea and common steps of programming and its implemented segment code are presented. The serial communication programming is developed successfully in gas station computer central controlling system. It promotes the automation of petroleum industry and helpes to develop automation of others correlation to petroleum industry.
Keywords:multi-thread  serial communication  Delphi  message mechanism  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号