单片微机测控系统
摘要:以PC机为代表的各种档次的个人计算机,由于他们优越的性能价格比和丰富的软件资源,己成为计算机应用的主要机种。在工业应用中,经常用到若干任务需要同时执行的情况,而单片机可以根据预先设置的指令获取现场数据并完成规定的控制功能,因此被广泛应用于工业检测系统中。因此,单片机与PC机之间的通信也就变得越来越重要了。
本文主要讲述了在工业控制现场,如何实现智能温控仪与PC
机之间的数据传送。在分析了温控仪的接口特性后详细地探讨了如何利用Visual
Basic语言来开发串行通信软件。
Abstract: As a result of personal
computer excellent performance and abundant software resource, they
have become computer applied leading sorts. In industrial
applying,we often barge up against the condition that many tasks
need synchronous executive. And according to beforehand setting
statements, MCU can obtain field data and accomplish stated control
function, so MCU have been proverbially applied to industrial
systems. Therefore,the communication between MCU and
PC
become more and more
important.
The paper mainly
presents how to realize the data transfer between the temperature
intelligence control system and PC on the industrial control spot.
On the basis of analyzing the characteristic of hardware interfaces,
it discusses how to write serial communication software with Visual
Basic.
关键词: 单片机;Visual Basic;串行通讯;RS-232;
目录
绪论………………………………………………………………………………………1
1微机测控系统简介……………………………………………………………………2
1.1 背景介绍………………………………………………………………………
2
1.2 测控系统工作流程…………………………………………………………… 2
1.3 通信流程图…………………………………………………………… 2
2单片机串行通信概述…………………………………………………………………3
2.1 串行通信概述………………………………………………………………… 3
2.2 通信控件的使用……………………………………………………………… 4
2.3 RS232 通信协议介绍………………………………………………………… 5
3软件设计介绍…………………………………………………………………………5
3.1 软件设计环境…………………………………………………………………
5
3.2 软件需求分析…………………………………………………………………
5
3.3 软件总体设计…………………………………………………………………
6
3.4 软件详细设计…………………………………………………………………
6
3.5 数据库的构建…………………………………………………………………14
4通讯系统………………………………………………………………………………14
4.1 通讯简介…………………………………………………………………………14
4.2 仪表简介…………………………………………………………………………14
4.3 仪表参数功能介绍………………………………………………………………20
5调试…………………………………………………………………………………… 22
5.1调试………………………………………………………………………………22
5.2 错误检测…………………………………………………………………………22
6
总结……………………………………………………………………………………24
7
致谢……………………………………………………………………………………25
8参考文献………………………………………………………………………………26
附录………………………………………………………………………………………27