基于VC的OPC客户端软件研究与实现

  • 格式:pdf
  • 大小:1.28 MB
  • 文档页数:70

下载文档原格式

  / 70
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

摘要

随着控制技术、计算机技术、网络通信技术的发展,自动化系统对大范围信息共享的需求越来越迫切,因而对工业控制系统的开放性提出了越来越高的要求。而工业界所广泛使用的传统的DCS、FCS等类系统由于采用自定义的专用网络和协议,没有统一的接口标准,难以与其他厂家的系统或仪表互连、互操作。各家自成体系,所形成的“信息孤岛”难以与外界交换数据。OPC技术把对象链接和嵌入技术应用于工业过程控制领域,为工业控制领域提供了一种标准的数据访问机制。

本文在深入研究OPC DA规范和COM技术的基础上进行了OPC客户端软件程序的设计和开发,采用Visual C++6.0作为开发工具,从整体到局部详细分析了客户端的具体实现。本文给出了主要的实现方法和步骤,提供了主要函数的定义和关键部分的代码,并针对OPC服务器的注册、交互问题进行了细致的研究,提出了解决这些问题的方法。本文对客户端的性能进行了测试,结果表明OPC客户端的功能基本实现,得到了客户端软件设计的一般方法。这对研究系统软件封闭、互操作性差的异构系统集成意义重大,是一个很有意义的课题。

关键词OPC 定制接口数据访问规范 MFC

Abstract

With the development of Control technology, Computer technology, Network Communication technology, automation system is more and more urgent to share large scale information, and needs more opened industry control system. But traditional DCS, FCS control system applied in industry use its network and agreement, lack unified interface standard, it would be difficult to connect other systems and meters. “Information isolated island” is formed and difficult to change data with external systems and meters.OPC applies OLE (Object linking and Embedding) technology into industry Process Control Fields, and provides a kind of standard data access method.

The paper studies deeply OPC DA specification,designs and develops OPC client software based on COM technology, adopted Visual C ++6.0 as the development tool of cilent, made a detailed analysis from whole to part on the concrete realization of the OPC cilent. The paper provides main methods to implement it, provides main function and critical code, goes deep into register of OPC server and alternation. Tests have been made to testing the function of the OPC client software, the result of testing indicated that the basic function of this OPC cilent has universality, finally we obtained the general method of design OPC client. It is critical to realize integration of distributed and isomerous system which is close in system software and is bad interoperability, this thesis has its significance.

Key OPC Custom Interface Data Access Standard MFC

目录

第一章绪论 (1)

1.1 OPC技术的概念和特点 (1)

1.2 OPC技术的意义 (3)

1.3 OPC技术应用与发展 (3)

1.4 论文的课题背景及意义 (4)

1.5 本文研究的主要内容及所作的工作 (5)

1.6 论文结构组织 (5)

第二章OPC技术介绍 (7)

2.1 OPC的对象和接口 (7)

2.1.1 OPC的自动化接口对象 (7)

2.1.2 OPC的定制接口对象 (11)

2.2 OPC数据访问规范 (13)

2.2.1 OPC规范基本概念 (13)

2.2.2 OPC数据访问规范 (13)

2.3 OPC技术基础 (15)

2.3.1 COM技术[13] (15)

2.3.2 客户/服务器模型 (16)

2.3.3 COM库 (18)

2.3.4 COM特性 (19)

2.3.5 COM组件的创建 (20)

2.3.6 COM组件的开发工具——MFC与ATL (21)

第三章OPC客户端软件的总体设计 (24)

3.1 OPC客户端软件的功能设计 (24)

3.2 OPC客户端软件的总体框架设计 (24)

3.3 OPC客户端软件技术的研究 (25)

3.3.1 MFC (25)

3.3.2 ATL (27)

3.3.3 消息映射[19] (28)

第四章OPC客户端软件的设计与实现 (30)

4.1 OPC客户端软件功能的具体实现 (30)

4.1.1 初始化 (32)

4.1.2 添加组对象和标签对象 (33)

4.1.3 对数据项进行同步读写访问和异步读写访问 (37)