,,,
(1. 同济大学电子与信息工程学院,上海 200092,2. 上海宇航系统工程研究所,上海 201109)
Design and Realization of Double-buffer and High-speed SerialCommunication System Based on LabVIEW
SHI Pei1,WU Yuanbing2,ZHANG Zhiming1,YU Youling1
(1.College of Electronics and Information Engineering,Tongji University,Shanghai 200092,China;
2.Aerospace Research System Engineering Shanghai 201109,China)
LabVIEW平台下双缓冲高速串口通信系统的设计与实现
施培1,吴源兵2,张志明1,余有灵1
(1. 同济大学电子与信息工程学院,上海 200092,2. 上海宇航系统工程研究所,上海 201109)
Design and Realization of Double-buffer and High-speed SerialCommunication System Based on LabVIEW
SHI Pei1,WU Yuanbing2,ZHANG Zhiming1,YU Youling1
(1.College of Electronics and Information Engineering,Tongji University,Shanghai 200092,China;
2.Aerospace Research System Engineering Shanghai 201109,China)
摘要:采用多线程机制、双缓冲和队列技术,基于LabVIEW平台和高速RS422串口,在高速通信模式下实现数据的实时采集、处理、显示及存储。实际项目应用表明,系统运行稳定,执行效率高,具有良好的可移植性和可扩展性,能较好地完成高速串口通信功能。
关键词:LabVIEW;高速串口通信;多线程技术;双缓冲技术
中图分类号:TP273;TP311
文献标识码:A
文章编号:1001-2257(2015)03-0017-03
收稿日期:2014-12-17
Abstract:High-speed serial communication system was developed based on LabVIEW and RS422 communication protocol. Multi-threads mechanism,double-buffer technique and queue scheduling in LabVIEW were applied for the real-time data acquisition and processing,GUI display and database storage. Application result indicates the proposed frame can improve the operation efficiency and veracity,expand the program's functions effectively.
作者简介:施培(1987-),男,上海崇明人,硕士研究生,研究方向为嵌入式系统开发与应用。

Key words:LabVIEW;high-speed serial communication;multithread technique;double-buffer technique
0引言
串口通信是一种使用灵活方便,数据传输可靠的通信方式,在工业控制、数据采集和实时监控中被广泛的应用。高速串口数据采集系统的设计不同于普通串口通信系统,在接收到数据采集终端或者其他设备所发送过来的大量数据的同时,需要对已接收到的数据进行处理并且实时显示,通常情况下也要准确完整地存储数据[1CD*22]。由于数据的传输速度较快,数据量大,如采用传统的单线程编程方式,常常会出现接收数据内容不完整或者不正确的情况。某型地面试验系统中,控制中心机与DSP下位机终端之间采用RS422全双工通信,传输格式采用1位起始位,8位数据位,1位停止位,115200bps的传输速率,DSP终端每隔10 ms上传64字节长度的数据帧。……