三轴转台调试系统的数据采集软件设计

 2022-01-26 10:01

论文总字数:32396字

摘 要

本文主要针对实验室现有的三轴转台,采用C 程序语言设计了一个能够对高速串口数据和网络数据进行同步采集的软件。该软件具备两个数据接口:一为串口接收来自三轴转台的测量数据;一为网口接收被测设备的输出数据。此外,为了满足数据测试和分析需要,该软件具备报文解析、数据保存以及实时显示(包括图形显示)的功能。在软件具体设计阶段,根据软件需求,划分软件的功能模块,采用分模块设计的方式进行软件开发。各模块都通过对不同实现方法的比较,选择合适的实现方案。串口通信模块选用CSerialPort类简单有效的实现串口数据接收。而网络通信模块则选择UDP通信协议,并且使用套接字方式实现。最后,本文重点讨论了串口数据和网口数据的同步接收的实现。

仿真及实验结果表明,本文设计的三轴转台的数据采集软件,串口和网口均可以实时准确的接收外界信息,并且是同步接收,完成报文解析、存数和动态曲线绘制。因此,本文所设计的软件是符合基本要求且合理可行的。

关键词:三轴转台;UDP通信;串口通信;线程同步

THE DESIGN OF DATA ACQUISITION SOFTWARE FOR THREE-AXIS TURNTABLE DEBUGGING SYSTEM

Abstract:Three-axis turntable is the important equipment in the course of the development of inertial navigation systems and inertial components,widely used in simulation and test of aerospace and navigation field, so that its performance is directly related to the reliability of the simulation test and credibility, and also is the base of guaranteeing the accuracy and performance of products and weapon systems of aviation and the navigation fields.With the development of navigation and aviation industry, the requirement of accuracy of inertial components is improving.Therefore, the requirement of the performance of test turntable is also improving. And the real-time acquisition of the multi-source data of the three-axis turntable is not only its key technology,.Exactly,real-time and accurately receiving multi-source data is the key to guarantee the performance of test turntable.

According to the three-axis turntable in the laboratory, this paper uses c programming language to design a data acquisition software with the function of synchronous acquisition for high-speed serial data and network data . The software has two data interface: one is a serial port to receive measurements data from the three-axis turntable,and the other is a network port to receive the output data of the device under test . In addition, in order to meet the requirements of data test and analysis, the software is also equipped with data analysis processing, preservation and display function (including graphics display). In detailed design stage,it divides the software function module according to the software requirements, then use module design as the way of software development. Each module chooses appropriate implementation scheme by comparing different implementation methods. A serial port communication module selects the CSerialPort class to simply and effectively implement a serial port data reception.Network communication module, it selects UDP communication protocol and use the socket to realize data acquisition.Lastly, this paper mainly discusses how to realize synchronous acquisition of serial data and network data.

Simulation and experimental results show that the data acquisition software of the three-axis turntable designed can realize the function of accurately receiving outside data both for serial port and network port,what’s more, the data acquisition is real-time and syncing.Meanwhile,it will complete message parsing.Then file storage and dynamic curve drawing can be possible.In conclusion, the data acquisition software designed in this paper is feasible and in accordance with the basic requirements.

Key words:three-axis turntable; UDP communication; serial-port communication; thread synchronization

目 录

第一章 绪 论 1

1.1课题背景和意义 1

1.2测试转台发展概况 2

1.2.1测试转台在国外的发展概况 2

1.2.2测试转台在国内的发展概况 3

1.2.3测试转台的展望 4

1.3串口通信综述 4

1.4网络通信综述 6

1.5主要研究内容和实现方案 7

1.5.1主要研究内容 7

1.5.2实现方案 7

1.5本章小结 8

第二章 软件设计及原理 9

2.1.软件总体设计 9

2.1.1前言 9

2.1.2系统结构 9

2.1.3软件功能结构 10

2.2功能模块算法和原理分析 11

2.2.1 数据采集模块 11

2.2.2 数据处理模块 15

2.3 本章小结 17

第三章 软件具体实现 18

3.1 建立工程及资源创建 18

3.2来自转台的串口数据实时接收的实现 18

3.2.1人工添加串口消息响应函数 18

3.2.2初始化串口 20

3.2.3 启动串口监听线程 20

3.3来自被测设备的网口数据实时接收的实现 20

3.3.1初始化套接字 20

3.3.2网络数据接收处理线程 21

3.4串口数据和网口数据的同步接收 21

3.5数据处理模块具体实现 22

3.5.1报文解析 23

3.5.2文件存储 26

3.5.3数据可视化 26

3.6来自转台的串口数据实时接收的实现 27

第四章 应用软件测试 28

4.1功能模块测试 28

4.1.1使用虚拟串口和串口调试软件进行串口通信部分的测试 28

4.1.2网口接收测试 30

4.2总体测试 31

4.3 本章小结 33

第五章 结论 34

致 谢 35

参考文献 36

第一章 绪 论

1.1课题背景和意义

航空、航天技术是二十世纪以来人类在认识自然和改造自然中最活跃、发展最迅速、对人类社会生活最有影响的科学技术领域之一,也是表征一个国家科学技术先进性的重要标志[1]。航天、航空及航海技术是高度综合的复杂以及高新科技。它们在基础科学和基础科技的根基上,集中应用了许多20世纪以来的工程技术新成就,其中惯性导航系统的应用显得尤为突出。

剩余内容已隐藏,请支付后下载全文,论文总字数:32396字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;