基于主动发送/串口监听模式的实时数据采集
Real-Time Data Acquisition Method Based on Active Data Sending/Serialport Data Monitoring
-
摘要: 针对数据采集中的实时性问题,提出了一种新的数据采集方案.该方案建立智能设备主动向串口发送数 据,应用计算机多线程技术建立串口监听线程.去掉了传统数据采集方案串口通信中握手和断开连接的过程,同 时也保证了数据传输的可靠性.实验结果表明,每次传输20字节时,传输时间可以缩短到原来的约20%。该方 案方案已经得到了实际应用.Abstract: To resolve the real-time problem in data acquisition, a new real-time data acquisition method was proposed. In this method, actively sending data to serialport is created on intelligent equipment and a thread program of serialport monitoring is created based on multithreading technology. Handshake and end-connecting processes in conventional serialport communication are taken out from the procedure of data acquisition, and the reliability of the system can be guaranteed. The experimental results show that data transmitting time is shortened to 20% of the original transmitting time when transmitted data are 20 bytes per time. The proposed method has been applied to practice.
-
Key words:
- serial interface /
- communication /
- serialport data monitoring /
- data acquisition /
- real-time character
点击查看大图
计量
- 文章访问数: 1197
- HTML全文浏览量: 54
- PDF下载量: 107
- 被引次数: 0