摘要:本中心测量仪上位机管理软件在Visual Studio 2010开发环境下,使用VC#.NET程序设计语言来编程。结合.NET Framework类库中提供的SerialPort 类来编写接收来自测量仪下位机发送的数据。对下位机数据的采集、存储和打印都是通过控制软件来完成得,通过对存储数据的分析继而测量出中心位的目的。本上位机管理软件与下位机进行数据通信主要通过串口通信来完成的。串行通信不但线路简易而且还具有传输距离较长、抗干扰能力较强、应用灵活等特点。计算机串行通信主要在数据通信、故障检测和计算机远程监控等方面有广泛的应用与利用价值,尤其是在Windows下的串口通信,充分利用Windows下的软件资源条件,完成多任务条件下的对外部数据传输、信息收集以及处理。随着日益成熟的计算机通信技术,下位机的运行、文护与优化都有上位机控制软件来操作已经得到了广泛的推广。本中心测量仪就是这样一个应用实例,我们可以通过串行通讯方式使上位机与中心测量仪下位机进行通讯,进行参数设置和实验数据采集与保存。23448
毕业论文关键词: Visual Studio 2010;串口通信;VC.NET;波特率
The center measuring instrument PC management software based on VC.NET
Abstract: The center measuring host computer management software in Visual Studio 2010 development environment, using VC#.NET programming language programming. Combined with the.NET Framework class libraries provide SerialPort class to write from a radiation alarm receiving the data sent the machine. To realize the collection, storage, print to MCU data, and then to store data analysis to achieve the purpose of alarm value of radiation. The PC management software mainly through serial communication with the computer data communication. The advantages of serial communication is not only simple lines and has long transmission distance, strong anti-jamming capability, flexible application. Computer serial communication with extensive application value in the data communication, fault detection, remote computer monitoring and other aspects, especially the serial communication under the Windows can make full use of the resource advantages of the Windows software, realizing multi-duties conditions of external data transmission, information collection and processing. With the development of computer communication technology matures, optimization of a wide range of applications running, and maintenance through the computer to control a machine. The center measuring instrument is such an application example, we can through the serial communication between PC and radiation to the communication alarm machine, set parameters and experimental data collection and preservation.
Keywords:Visual Studio 2010; Serial communication;VC#.NET; Frequency
目 录
1 绪 论 2
1.1 课题研究背景 2
1.2 课题研究难点与要点 2
1.3 课题研究的目的和意义 3
2 开发语言与开发环境简介 4
2.1 VC#.NET和.NET Framework 4
2.2 Visual Studio 2010 简介 4
3 串行通信 6
3.1 串口通信接口定义 6
3.2 串行通信协议 6
3.3 串行通信的基本参数 9
3.4 实现串行通信的方法 11
3.4.1 SerialPort类 12
3.4.2 SerialPort类使用 14
4 数据的处理 20
4.1 存取文件 20
4.1.1 文件的保存 20
4.1.2 文件的读取 21
4.2 打印文件 22
5 上位机软件界面的设计 26
6 上位机软件的调试 30 中心测量仪上位机控制软件的开发与设计:http://www.youerw.com/jisuanji/lunwen_16509.html