您好,欢迎来到佳博论文网!

基于VC++云台串口控制设计

论文编号:CK055论文字数:15682,页数:55

摘 要

随着社会的不断进步,智能化不断的融入我们的生活与生产当中。我们不再亲自用手去控制,只要远程遥控就能控制仪器的运行,从而到达我们所需的要求。在这样的大背景下产生出了许许多多的智能化产品,当然关于类似的研究也随处可见。VC作为一个主流的开发平台,一直深受编程爱好者的喜欢,而本文所要阐述的是在VC++环境下实现云台的转动控制。通过RS-485把PC机与云台相连,采用PELCO-P协议,用串口通信控件MSComm,在VC++中编程,实现PC机对云台的转动控制。本文论述利用PC机控制采用HZ-01ET解码器的云台。

关键词 : 串口控制;云台;VC编程

Abstract

As society progresses, the intellectualization is constantly melting into our life and production. We no longer personally use hand to control the operation of equipment, instead of which, we apply remote control so as to meet our requirement. In the context of this produces a large number of intelligent products, of course, a similar study on this can been seen everywhere. VC as a mainstream development platform, has been well received by programming enthusiasts, but this article is to be set in the VC + + environment to achieve control of head rotation. By connecting PC with the head through the RS-485 and using PELCO-P protocol, with serial communication control MSComm, in VC + +, programming, we can make PC control the rotation of the head. This article discusses the use of PC-controlled by the HZ-01ET PTZ decoder.

Key Words: serial communication control; Head; VC programming

目 录

摘要 I

目录 IV

1前言 . 1

VC++介绍 1

串口通信介绍 1

2 系统设置思路简介 2

3 系统硬件结构简介 4

3.1 云台简介 4

3.1.1 云台分类 4

3.1.2 云台的内部结构 4

3.1.3 通用型云台的性能指码 4

3.2 HZ-01ET 解码器 6

3.2.1 设备概述 6

3.2.2 系统设置 6

3.3 数据传输协议——PELCO-P协议 8

3.4 PC机RS-232串口与RS-485接口 9

3.4.1 RS-232简介 9

3.4.2 RS-232C 串口通信接线方法(三线 11

3.4.3 云台串口协议 11

4 VC++编程 . 14

4.1 Mscomm 控件 19

4.2 新建VC窗口 21 4.3 设置界面 24

4.3.1 设置主界面 24

4.3.2 创建串口设置对话框 25

4.3.3 添加()程序和按钮需要加载的图标 26

4.4 程序类分析与实现 26

4.4.1 CCtrlBtn 新建的方向按钮控件类 27

4.4.2 CYuntaiDlg类 30

4.4.3 CSettingDlg类 35

5 实验结果 36

6 总结 37

致谢 39

参考文献 40

附录 41

基于VC++云台串口控制设计......