基于opc的數(shù)據(jù)通訊接口程序設(shè)計(jì)(本科畢業(yè)論文設(shè)計(jì)).doc
約62頁DOC格式手機(jī)打開展開
基于opc的數(shù)據(jù)通訊接口程序設(shè)計(jì)(本科畢業(yè)論文設(shè)計(jì)),基于opc的數(shù)據(jù)通訊接口程序設(shè)計(jì)(本科畢業(yè)論文設(shè)計(jì))摘要opc全稱是ole for process control,即過程控制中的對(duì)象鏈接嵌入技術(shù)。opc技術(shù)是基于microsoft的com/dcom(組件對(duì)象模型/分布式組件對(duì)象模型)技術(shù)所要求的功能,制定的一個(gè)開放和互用式的工控行業(yè)的軟件接口標(biāo)準(zhǔn),在當(dāng)今過程控制領(lǐng)域...
內(nèi)容介紹
此文檔由會(huì)員 cglina 發(fā)布
基于OPC的數(shù)據(jù)通訊接口程序設(shè)計(jì)(本科畢業(yè)論文設(shè)計(jì))
摘 要
OPC全稱是OLE for Process Control,即過程控制中的對(duì)象鏈接嵌入技術(shù)。OPC技術(shù)是基于Microsoft的COM/DCOM(組件對(duì)象模型/分布式組件對(duì)象模型)技術(shù)所要求的功能,制定的一個(gè)開放和互用式的工控行業(yè)的軟件接口標(biāo)準(zhǔn),在當(dāng)今過程控制領(lǐng)域,是一種非常流行的數(shù)據(jù)交換技術(shù),是實(shí)現(xiàn)控制系統(tǒng)現(xiàn)場(chǎng)設(shè)備級(jí)與過程管理級(jí)信息交互、實(shí)現(xiàn)控制系統(tǒng)開放性的中間件技術(shù)。
OPC技術(shù)采用CLIENT/SERVER模式,規(guī)定了OPC Client與OPC Server之間遵循標(biāo)準(zhǔn)的接口。OPC服務(wù)端一般由控制設(shè)備的生產(chǎn)廠商,將硬件設(shè)備驅(qū)動(dòng)程序和通信程序封裝成獨(dú)立的OPC服務(wù)器,向OPC客戶端實(shí)時(shí)地提供數(shù)據(jù)。OPC客戶端由使用設(shè)備的客戶自己開發(fā),可以不包含任何通訊接口程序,不必關(guān)心底層的硬件設(shè)備特性,也不必考慮軟硬件如何通訊,只要遵循OPC規(guī)范,就能夠從OPC服務(wù)器中獲取數(shù)據(jù),從而實(shí)現(xiàn)數(shù)據(jù)的靈活配置和多種系統(tǒng)的真正集成。由于OPC服務(wù)端與客戶端之間的接口是標(biāo)準(zhǔn)的,因此可以開發(fā)出通用的OPC客戶端,使不同的應(yīng)用訪問同一臺(tái)設(shè)備或使同一個(gè)應(yīng)用訪問不同的設(shè)備。
論文首先介紹了OPC技術(shù)產(chǎn)生的背景,以及它的主要特點(diǎn)與發(fā)展?fàn)顩r,深入剖析了其核心COM/DCOM技術(shù)。然后重點(diǎn)分析了OPC數(shù)據(jù)訪問規(guī)范(OPC DA)及OPC客戶端與服務(wù)器的通信機(jī)制,介紹了如何用VC++開發(fā)客戶端程序,重點(diǎn)內(nèi)容就是分別編寫客戶端讀取服務(wù)器數(shù)據(jù)的2種機(jī)制的程序,這是本論文的核心。
關(guān)鍵詞:OPC;COM;OPC DA;OPC客戶端;數(shù)據(jù)訪問規(guī)范
ABSTRACT
OPC is the generic OLE for Process Control,literally translated as the Object Linking and Embedding technology in process control.OPC specification is an open and interoperable software interface standards in the field of process control,based on the functions required by Microsoft's COM(Component Object Model)and DCOM(Distributed Component Object Model)technology.Today,in the field of process control,it is a very popular data exchange technology and the middleware technology that realizes information exchange between open system field equipment in control system and process management level,and lets the control system to be an open system.
OPC specification uses Client/Server mode,and defines the standard interface between OPC Client between OPC Server.In the OPC Server end,the controlequipment manufacturers package the hardware device drivers and the communicationprogram to be an independent OPC server providing real-time data to OPC Client.TheOPC Client developed by customers who use the equipment is able to obtain data fromthe OPC server as long as following the OPC data interface protocol,also it maynclude no communication interface program, does not have to care about the hardware characteristics of the bottom,has no need to consider how to communicate between hardware and software.Thus it realizes the integration of flexible configuration of avariety of data and multi-system.Because the OPC Server and Client interface is thestandard,it can develop a universal OPC Client that different applications with a visit tothe same equipment or applications with a visit to different devices.
First,the paper introduces the background of OPC technology as well as its maincharacteristics and development,analyzes its core technology of COM/DCOM. Then,the paper studies the OPC Data Access specification and the communication mechanismbetween OPC client and server,introduces how to develop client program using theVisual C++.What is the key content is the two kinds of procedures mechanism for the client to read the data from the server respectively.This is the core of this thesis.
Keywords: OPC,COM,OPC DA,OPC Client, Data Access Standard
目 錄
摘 要 I
ABSTRACT II
目 錄 III
1 緒 論 1
1.1 課題的背景及意義 1
1.2 國內(nèi)外研究現(xiàn)狀與發(fā)展趨勢(shì) 3
1.2.1 國外對(duì)OPC技術(shù)的研究與應(yīng)用 3
1.2.2 國內(nèi)對(duì)OPC技術(shù)的研究與應(yīng)用 4
1.3 本文研究的主要內(nèi)容及所作的工作 5
1.4 本文的組織結(jié)構(gòu) 6
2 OPC技術(shù)的基礎(chǔ)-COM 7
2.1 COM概述 7
2.2 COM對(duì)象 7
2.3 COM接口 8
2.3.1 接口的定義和標(biāo)識(shí) 8
2.3.2 接口描述語言IDL 9
2.3.3 COM接口特性 9
2.3.4 IUnknown接口 10
2.4 COM結(jié)構(gòu) 11
2.4.1 客戶/服務(wù)器模型 11
2.4.2 COM庫 11
2.5 COM擴(kuò)展 12
2.5.1 可連接對(duì)象 12
2.5.2 分布式COM(DCOM) 13
2.6 小結(jié) 13
3 OPC數(shù)據(jù)的訪問規(guī)范 14
3.1 OPC規(guī)范簡介 14
3.2 OPC數(shù)據(jù)訪問規(guī)范基礎(chǔ) 14
3.2.1 OPC數(shù)據(jù)訪問規(guī)范簡介 14
3.3 OPC數(shù)據(jù)訪問對(duì)象與接口 16
3.3.1 OPC服務(wù)器對(duì)象及其接口 17
3.3.2 OPC組對(duì)象及其接口 18
3.3.3 OPC客戶端接口 21
3.4 小結(jié) 22
4 OPC客戶端軟件的開發(fā) 23
4.1 客戶端開發(fā)方法 23
4.2 客戶端開發(fā)的準(zhǔn)備工作 23
4.3 客戶端程序?qū)崿F(xiàn) 25
4.3.1 初始化 26
4.3.2 添加組對(duì)象和項(xiàng)對(duì)象 27
4.3.3 對(duì)數(shù)據(jù)項(xiàng)進(jìn)行同步讀寫訪問和異步讀寫訪問 28
4.3.4 刪除創(chuàng)建的對(duì)象 29
4.3.5 卸載COM庫 30
4.4 OPC客戶端與服務(wù)器交互 30
4.4.1 OPC服務(wù)器的同步讀取過程 31
4.4.2 OPC服務(wù)器的異步讀取過程 36
4.5 小結(jié) 40
5 總結(jié)與展望 41
5.1 主要結(jié)論 41
5.2 后續(xù)研究工作的展望 41
致謝 42
參考文獻(xiàn) 43
附錄A:同步讀取數(shù)據(jù)程序 45
附錄B:異步讀取數(shù)據(jù)程序 51
摘 要
OPC全稱是OLE for Process Control,即過程控制中的對(duì)象鏈接嵌入技術(shù)。OPC技術(shù)是基于Microsoft的COM/DCOM(組件對(duì)象模型/分布式組件對(duì)象模型)技術(shù)所要求的功能,制定的一個(gè)開放和互用式的工控行業(yè)的軟件接口標(biāo)準(zhǔn),在當(dāng)今過程控制領(lǐng)域,是一種非常流行的數(shù)據(jù)交換技術(shù),是實(shí)現(xiàn)控制系統(tǒng)現(xiàn)場(chǎng)設(shè)備級(jí)與過程管理級(jí)信息交互、實(shí)現(xiàn)控制系統(tǒng)開放性的中間件技術(shù)。
OPC技術(shù)采用CLIENT/SERVER模式,規(guī)定了OPC Client與OPC Server之間遵循標(biāo)準(zhǔn)的接口。OPC服務(wù)端一般由控制設(shè)備的生產(chǎn)廠商,將硬件設(shè)備驅(qū)動(dòng)程序和通信程序封裝成獨(dú)立的OPC服務(wù)器,向OPC客戶端實(shí)時(shí)地提供數(shù)據(jù)。OPC客戶端由使用設(shè)備的客戶自己開發(fā),可以不包含任何通訊接口程序,不必關(guān)心底層的硬件設(shè)備特性,也不必考慮軟硬件如何通訊,只要遵循OPC規(guī)范,就能夠從OPC服務(wù)器中獲取數(shù)據(jù),從而實(shí)現(xiàn)數(shù)據(jù)的靈活配置和多種系統(tǒng)的真正集成。由于OPC服務(wù)端與客戶端之間的接口是標(biāo)準(zhǔn)的,因此可以開發(fā)出通用的OPC客戶端,使不同的應(yīng)用訪問同一臺(tái)設(shè)備或使同一個(gè)應(yīng)用訪問不同的設(shè)備。
論文首先介紹了OPC技術(shù)產(chǎn)生的背景,以及它的主要特點(diǎn)與發(fā)展?fàn)顩r,深入剖析了其核心COM/DCOM技術(shù)。然后重點(diǎn)分析了OPC數(shù)據(jù)訪問規(guī)范(OPC DA)及OPC客戶端與服務(wù)器的通信機(jī)制,介紹了如何用VC++開發(fā)客戶端程序,重點(diǎn)內(nèi)容就是分別編寫客戶端讀取服務(wù)器數(shù)據(jù)的2種機(jī)制的程序,這是本論文的核心。
關(guān)鍵詞:OPC;COM;OPC DA;OPC客戶端;數(shù)據(jù)訪問規(guī)范
ABSTRACT
OPC is the generic OLE for Process Control,literally translated as the Object Linking and Embedding technology in process control.OPC specification is an open and interoperable software interface standards in the field of process control,based on the functions required by Microsoft's COM(Component Object Model)and DCOM(Distributed Component Object Model)technology.Today,in the field of process control,it is a very popular data exchange technology and the middleware technology that realizes information exchange between open system field equipment in control system and process management level,and lets the control system to be an open system.
OPC specification uses Client/Server mode,and defines the standard interface between OPC Client between OPC Server.In the OPC Server end,the controlequipment manufacturers package the hardware device drivers and the communicationprogram to be an independent OPC server providing real-time data to OPC Client.TheOPC Client developed by customers who use the equipment is able to obtain data fromthe OPC server as long as following the OPC data interface protocol,also it maynclude no communication interface program, does not have to care about the hardware characteristics of the bottom,has no need to consider how to communicate between hardware and software.Thus it realizes the integration of flexible configuration of avariety of data and multi-system.Because the OPC Server and Client interface is thestandard,it can develop a universal OPC Client that different applications with a visit tothe same equipment or applications with a visit to different devices.
First,the paper introduces the background of OPC technology as well as its maincharacteristics and development,analyzes its core technology of COM/DCOM. Then,the paper studies the OPC Data Access specification and the communication mechanismbetween OPC client and server,introduces how to develop client program using theVisual C++.What is the key content is the two kinds of procedures mechanism for the client to read the data from the server respectively.This is the core of this thesis.
Keywords: OPC,COM,OPC DA,OPC Client, Data Access Standard
目 錄
摘 要 I
ABSTRACT II
目 錄 III
1 緒 論 1
1.1 課題的背景及意義 1
1.2 國內(nèi)外研究現(xiàn)狀與發(fā)展趨勢(shì) 3
1.2.1 國外對(duì)OPC技術(shù)的研究與應(yīng)用 3
1.2.2 國內(nèi)對(duì)OPC技術(shù)的研究與應(yīng)用 4
1.3 本文研究的主要內(nèi)容及所作的工作 5
1.4 本文的組織結(jié)構(gòu) 6
2 OPC技術(shù)的基礎(chǔ)-COM 7
2.1 COM概述 7
2.2 COM對(duì)象 7
2.3 COM接口 8
2.3.1 接口的定義和標(biāo)識(shí) 8
2.3.2 接口描述語言IDL 9
2.3.3 COM接口特性 9
2.3.4 IUnknown接口 10
2.4 COM結(jié)構(gòu) 11
2.4.1 客戶/服務(wù)器模型 11
2.4.2 COM庫 11
2.5 COM擴(kuò)展 12
2.5.1 可連接對(duì)象 12
2.5.2 分布式COM(DCOM) 13
2.6 小結(jié) 13
3 OPC數(shù)據(jù)的訪問規(guī)范 14
3.1 OPC規(guī)范簡介 14
3.2 OPC數(shù)據(jù)訪問規(guī)范基礎(chǔ) 14
3.2.1 OPC數(shù)據(jù)訪問規(guī)范簡介 14
3.3 OPC數(shù)據(jù)訪問對(duì)象與接口 16
3.3.1 OPC服務(wù)器對(duì)象及其接口 17
3.3.2 OPC組對(duì)象及其接口 18
3.3.3 OPC客戶端接口 21
3.4 小結(jié) 22
4 OPC客戶端軟件的開發(fā) 23
4.1 客戶端開發(fā)方法 23
4.2 客戶端開發(fā)的準(zhǔn)備工作 23
4.3 客戶端程序?qū)崿F(xiàn) 25
4.3.1 初始化 26
4.3.2 添加組對(duì)象和項(xiàng)對(duì)象 27
4.3.3 對(duì)數(shù)據(jù)項(xiàng)進(jìn)行同步讀寫訪問和異步讀寫訪問 28
4.3.4 刪除創(chuàng)建的對(duì)象 29
4.3.5 卸載COM庫 30
4.4 OPC客戶端與服務(wù)器交互 30
4.4.1 OPC服務(wù)器的同步讀取過程 31
4.4.2 OPC服務(wù)器的異步讀取過程 36
4.5 小結(jié) 40
5 總結(jié)與展望 41
5.1 主要結(jié)論 41
5.2 后續(xù)研究工作的展望 41
致謝 42
參考文獻(xiàn) 43
附錄A:同步讀取數(shù)據(jù)程序 45
附錄B:異步讀取數(shù)據(jù)程序 51
TA們正在看...
- 重癥支氣管哮喘護(hù)理及體會(huì)護(hù)理論文.doc
- 上消化道出血的搶救觀察和護(hù)理(最新論文).doc
- 佳兆業(yè)房地產(chǎn)xx公司營銷策略改進(jìn)研究.doc
- plc控制的機(jī)械臂實(shí)驗(yàn)裝置設(shè)計(jì)-開題報(bào)告.doc
- plc控制的機(jī)械臂實(shí)驗(yàn)裝置設(shè)計(jì).doc
- plc外文翻譯theprogrammablelogiccontroller可編程...doc
- 信訪局長嚴(yán)以修身專題研討發(fā)言稿.doc
- 市委常委嚴(yán)以修身專題研討發(fā)言稿.doc
- 黨組成員嚴(yán)以律己分專題發(fā)言稿.doc
- 財(cái)務(wù)管理本科畢業(yè)論文--污水處理項(xiàng)目成本控制探析.doc