OPC TechnologyWord文件下载.docx
- 文档编号:5779178
- 上传时间:2023-05-05
- 格式:DOCX
- 页数:12
- 大小:88.91KB
OPC TechnologyWord文件下载.docx
《OPC TechnologyWord文件下载.docx》由会员分享,可在线阅读,更多相关《OPC TechnologyWord文件下载.docx(12页珍藏版)》请在冰点文库上搜索。
Figure1.
etc)-->
Introduction
COM/OLEapplicationsarewidelyusedinIndustrialAutomationandProcessControldomains.Sincenotmanyprogrammersareawareofthesetechnologies,IthoughttosharemyexperienceinOPCandmostdeveloperswouldlovetoexpandtheirknowledgeaboutCOM/OLEapplicationareas.
ThisismyfirsteverarticleonCodeProject,soifyoufeelanythingneedstobeimproved,dropmealine.Yoursuggestionsandcommentsaremostwelcome.
Thegoalofarticle:
Give
simple&
understandable
overviewofOPC.MoredetailedinformationandspecificationscanbedownloadedfromOPCFoundationandwebsitesmentionedinResourcessection.
Sofirst,abouttheabovediagram...
TheoryaboutFigure1:
Onleft-bottomisahardwaredevice.Itcouldbea
PLC
(programmablelogiccontroller),atemperaturesensor,rollerbeltcontroller,orjustaboutanyindustrialdevice.CentralpartistheOPCserver.Rightsideistheclientthatwantsto
operatethedevice.TheOPCServergivesoutstandardCOMinterfacessothatanyclientawareofthese
OPCInterfaces
caninterfacewithserverandoperatethedevice-withoutprogrammingdevicedriverforthathardware.HardwarecanbeasvariedasOPCservercanhandleandclientscanstillreadandwritefromthishardware.
Nowback
toourOPCcourse.ThisarticlegivesanoverviewofOPCandcoversfollowingtopics.Sourcecodeisnotavailable,sincemostofservercodeisspecifictohardware.Andclientwouldstillneedaservertoconnectto.Butyes,ifyouwanttoexperimentwithOPC,checkouttheResourcessectionbelow.
HistoryofOPC
In1996,agroupofcompaniesRockwellSoftware,Intellution,et.al.cametogethertoformaconsortiumthatdefinedastandardforprocesscontrol.SCADAandsimilarstandardizationeffortswerebeingmadeatthattimeinprocesscontrolandautomationindustry.ThisgroupcreatedaninitialdraftthatwasbasedonMicrosoft'
sObjectLinkingandEmbedding(OLE).Itwascalled
OLEfor
Process
Control(OPC).
OPCFoundation
publishesspecificationsandmanageseverythingthatgoesintoOPCtechnology.
Todaymorethan300companiesarepartofOPCFoundation.Microsoft,GE,Siemens,Rockwell,ABB,Ford,HoneywellandmorearemembersthatactivelycontributeandconsumeOPCtechnology.
In2005,OPCFoundationreleasedOPCUnifiedArchitecturedraft.Therearepredecessordraftsreleasedbefore-OPCHDA,OPCDX,OPCAE,OPCCommands,OPCSecurity.Wewillbrieflystudytheminthisarticle.
Bynow,youmusthaveaquestioninyourmind.Letmeansweritbelow...
WhydoweneedOPC?
IwasalsoafirsttimertoOPC(comingfromvariedexperienceinDevTools,eLearning,CAD/PLM,Multimedia),andhadnoclueastowhydoweneedit.Ifoundthatlearningitthroughacasestudywasveryhelpful,soIamgoingtodothesameforyou.Tounderstandtheneedforstandardizationinprocesscontrolindustry,letmegiveyouanactualcasestudyperformedbyagiantorganizationinPetrochemicalsbusiness.
Refertofigure2.Itshowsthedevicesandsoftwareapplicationthatwereinactiononthisparticularpetrochemicalplant.
Figure2.
PLC,Vibrationsensor,andCalculationengineworkondifferentcommunicationprotocols-TSAA,Modbus,andDDE.SothesoftwareapplicationsthatneeddatafromthesedevicesalsoneedtobeawareofTSAA,Modbus,andDDEprotocol.Additionallyeachdeviceneedstoserveallthethreeapplications.Theprocesshistorian,GUIapplicationprovidinghumanmachineinterfaceandthemachineconditionmonitorallcommunicatingwithalldevicesresultsinacomplexity.Thisdeploymenttookthecompanyaround10days.AnditscostwasapproximatelyUS$50,000.
Now,someonelikeme:
)cametothemandsaid,"
heyguys,whydon'
twethinksmartandimplementasinFigure3?
"
.Observethereducedcomplexity.NowallsoftwareapplicationstalkonlytotheOPCServers.AndalldevicesalsorespondonlytotheOPCserver.OPCServerprovidesthe
BlackBox
forsoftwareapplicationsaroundhardware.
Figure3.
Thenewimplementationtookjust2daystodeployandcostincurredwasapproximatelyUS$10,000.Theycouldhaveeliminated2OPCserversaswellandimplementeddevicedriversrightinsideasingleOPCserver.ThisisatradeoffandofftheshelfOPCserversmayhavestandardprotocolssupportlikeDDE,ModbusandTSAA.
Asyouobservedcorrectly,thebenefitsare:
∙Reducedloadondevice.
∙Scalabilityofsystemhasincreased.
∙OPCserverprovidescachingofdata.
∙Clientapplicationsneednotknowhardwareprotocoldetails.
∙Increasedlifefordevice(itneednotservemultipleclientsanymore).
∙Interoperability(Unix/LinuxandWindows-bothplatformsaresupportedbyOPC)
∙Standardization
NowthatyouhavesomeinsightintoOPCbenefitsandhistory,let'
stakeonestepaheadtounderstandOPCterminologyandconcepts.
OPCConcepts&
OPCspecificationdefinesaconsistentterminologytoidentifyvariousentitiesinvolved.ThebestanalogytoOPCwayofdatarepresentationisthatofafilesystemhierarchy.OPCcallsitasOPCAddressSpace.Withinthisaddressspaceeveryentitycanbeuniquelyidentifiedbyits"
full-path"
.Forexample,refertofigure4.
Figure4.
OPCAddressSpace
ishierarchical.Itstartswitharoot.Thentherearelogical
folders
and
sub-folders.Leafnodesare
OPCItemsorTags.Generallyyoursensorsandactuatorsformtheleafnodes.Thisisanimportantpointtounderstandandwewillspendsometimeonit.Forexample,youhaveadevicethatcansensetemperature,Pressure,andHumidity.Thentheseattributesaregenerallymappedasleafnodesundersomefolder-subfolderhierarchy.Wewillseewhatthathierarchycanbeinamoment.Ifyouhaveanactuator(say,Turn_ON_Boiler),thenthatalsobecomesaleafnode.Youcanwriteto
Turn_ON_Boiler
valuesof1or0forexample,andnecessaryactionwillbetaken-ofcoursewejustassumedthatyourhardwarecontrolmechanismbehavesthisway.Youcanreadfrom
Temperature
toknowsensedvalue.
Hopeweareallcleartillthispoint.Nowlet'
sunderstandthis"
logical"
folderstuff.Thelogicalfoldersandsub-foldersareusedtorepresentstateofyourIndustrialAutomationsystem.Thisconfigurationcanactuallymaptosomephysicalconfigurationorevengeographicalsetup.Let'
sspendsometimetounderstandthisoneaswell.Forexample,inthisdiagramwehaveanethernetcommunicationchanneltowhichawirelessmeterisconnected.Andwithinwirelessmeter,therearetwoclasses"
Average"
and"
Channel1"
.Thesefoldersandsub-foldersareveryeffectivemeansofgroupingyourprocesscontrolparametersandvalues.
Thisaddressspaceis"
published"
toallclientsofOPCserver.TheOPCclientscanbesimplespreadsheetslikeExcel,processhistoriansthatkeeprecordofdatacomingfromvariousindustrialplantentities.Everyclientcancreatealogicalentitycalledas
group
insideOPCserver.Each
OPCGroup
cancontainasetofOPCItems.
Synchronous&
AsynchronousOPCItemreading
OPCspecificationsupportssynchronousaswellasasynchronousreadingandwritingonhardwaredevices.Sincenotallhardwaredeviceoperationsarefast-enough,theasynchronousmechanismofreadingandwritingtoadevicecomesveryhandy.
COMInterfaces&
Well,sonowsupposeyouwishtowriteyourfirstOPCclient.Ifyouweredevelopingaclientthatrunsonlocalmachineasthatofserver,andifyouwereawareofallOPCServerProgIDs,thenwewouldnothaveanyworries.Butsincethatisnotpossible,weneedanenumerationmechanism.Followingisanenumerationmechanism.
Collapse
OPCComponentCategories
EnumerationissueisaddressedbyrequiringOPCserverstoimplement
componentcategories.Forexample,allserversthatareOPCDA1.0
(moreaboutthisinlatersections)compliantimplementCOMcategory
withCatID{63D5F430-CFE4-11d1-B2C8-0060083BA1FB}.Similarlythe
serverscompliantwithOPCDataAccess2.0implementcategorywith
CatID{63D5F432-CFE4-11d1-B2C8-0060083BA1FB}.
SoOPCFoundationdistributesaWindowsServicecalledasOPCEnum.
EnumeratingOPCServers
OPCEnum.exerunsasaWindowsServiceandprovidesenumeration
functionality.UsingOPCEnum,theclientapplicationscanquery
availableOPCServersonlocalaswellasremotenetworkedmachines.
Nowlet'
slookatservercomponentinterfaces.
Figure5.
TherearevariousCOMinterfacesthatOPCServermustsupportaccordingtheOPCSpecificationcompliancerequired.Thesebasicinterfaceshavespecificfunctionality.
IOPCBrowse
ThisinterfacehasmethodsthatallowbrowsingOPCAddressSpace.Clientcanquerylevelbylevelfoldersandsubfolderstilltheleafnodes.Thehierarchylookslikeshownin
figure4.
IOPCItemIO
InterfaceisusedforperformingOPCItemreadandwriteoperations.
sunderstandhowOPCClientinteractswiththeOPCServer.Importantstepsinvolvedaresummarizedinfigure6,below.
Figure6.
Iknowyoumuststillbewonderingaboutthis
term.Let'
sspendsometimeunderstandingit.EveryclientwhenopensasessionwithOPCServer,needstocreatealogicalgroupofitemsthatitwantstoreadorwrite.Clientcanmaintainmultiplegroups.Eachgroupisgivenauniquenameandhasfollowingattributes:
∙Updaterate[milliseconds]atwhichthevaluesofitemsareread.
∙ActiveorIn-activeFlag[Boolean]onlyifgroupisactivethattheitemsareprocessed.
∙Deadband[%]variationsinsidethisbandareconsideredNULL.
∙IOMode[S
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- OPC Technology
![提示](https://static.bingdoc.com/images/bang_tan.gif)