Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

OPC Unified Architecture


Published on

This presentation demonstrates the OPC UA Data Communication, Information Model, Security, Mapping and Profiles.

Published in: Engineering
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
    Are you sure you want to  Yes  No
    Your message goes here

OPC Unified Architecture

  1. 1. OPC UAOPC UA Ch. Vishwa MohanCh. Vishwa Mohan Freelance Software Consultant &Freelance Software Consultant & Corporate TrainerCorporate Trainer
  2. 2. AgendaAgenda IntroductionIntroduction Information ModellingInformation Modelling MappingMapping ServicesServices ArchitectureArchitecture System and InfrastructureSystem and Infrastructure SecuritySecurity Technology MappingTechnology Mapping Migration from Classic OPC to OPC UAMigration from Classic OPC to OPC UA Performance, Profiling and TuningPerformance, Profiling and Tuning 22
  3. 3. Introduction to OPC UAIntroduction to OPC UA
  4. 4. IntroductionIntroduction OPC UA is a standard for communication and Information modeling in Automation industries. OPC UA supplements existing OPC industry standard with important features such as Platform Independency, Scalability, High Availability and Internet Connectivity. OPC Foundation provides stacks, wrappers and proxies. OPC UA specifications are standardized as IEC 62541. OPC UA allows the implementation of servers in embedded systems. OPC Foundation definesOPC Foundation defines howhow the data is transferred whereasthe data is transferred whereas cooperating organizations (cooperating organizations (ISA, MIMOSA, PLCOpenISA, MIMOSA, PLCOpen, etc.,), etc.,) definesdefines whatwhat data and information is and information is transferred. 44Ch.Vishwa MohanCh.Vishwa Mohan
  5. 5. OPC UA BasisOPC UA Basis 55Ch.Vishwa MohanCh.Vishwa Mohan ArchitectureArchitecture Designed for FederationDesigned for Federation Information ModelingInformation Modeling Complex DataComplex Data SecuritySecurity Enterprise IntegrationEnterprise Integration Robustness and ReliabilityRobustness and Reliability CommandsCommands Companion StandardsCompanion Standards Web StandardsWeb Standards Optimized for Internet (Performance)Optimized for Internet (Performance)
  6. 6. OPC UA in Embedded DevicesOPC UA in Embedded Devices OPC UA allows the implementation of servers in embedded systems, thus opening the doors to new automation concepts 66Ch.Vishwa MohanCh.Vishwa Mohan
  7. 7. OPC UA allows multi-platform communication between applications 77Ch.Vishwa MohanCh.Vishwa Mohan Multi Platform CommunicationMulti Platform Communication
  8. 8. Limitations of Classic OPCLimitations of Classic OPC Closely tied toClosely tied to MicrosoftMicrosoft WindowsWindows and its base technologyand its base technology COM / DCOMCOM / DCOM.. Configuration requires expensive expertise and complicatesConfiguration requires expensive expertise and complicates the use of OPC.the use of OPC. Lack of following features:Lack of following features: Security supportSecurity support Protection against data lossProtection against data loss Redundancy capabilitiesRedundancy capabilities Support for complex data types.Support for complex data types. Internet capabilities.Internet capabilities. 88Ch.Vishwa MohanCh.Vishwa Mohan
  9. 9. Advantages of OPC UAAdvantages of OPC UA 99Ch.Vishwa MohanCh.Vishwa Mohan Simplification by Unification. Standardized communication over Internet & across firewalls. Protection against unauthorized data access. Data Security and Reliability. Platform independency and scalability. Simplified use across computers Quick and easy engineering through embedded OPC UA Support of complex data structures Optional redundancy capabilities High Performance.
  10. 10. OPC UA defines anOPC UA defines an integrated address spaceintegrated address space and anand an information modelinformation model in which in whichin which in which process dataprocess data,, alarmsalarms,, historical datahistorical data andand programs callsprograms calls can be represented.can be represented. 1010Ch.Vishwa MohanCh.Vishwa Mohan Simplification By UnificationSimplification By Unification
  11. 11. 1111Ch.Vishwa MohanCh.Vishwa Mohan Is OPC will become Obsolete ?Is OPC will become Obsolete ?
  12. 12. OPC UA SpecificationOPC UA Specification OPC UA multipart specifications categorized into threeOPC UA multipart specifications categorized into three groups.groups. 1212Ch.Vishwa MohanCh.Vishwa Mohan
  13. 13. OPC UA FrameworkOPC UA Framework The following three concepts inThe following three concepts in OPC UA FrameworkOPC UA Framework makesmakes complex.complex. The Query capabilities of OPC UA.The Query capabilities of OPC UA. The Publish mechanism.The Publish mechanism. Connection Establishment.Connection Establishment. 1313Ch.Vishwa MohanCh.Vishwa Mohan
  14. 14. Typical application composed of three software layers :Typical application composed of three software layers : OPC UA Software LayersOPC UA Software Layers 1414Ch.Vishwa MohanCh.Vishwa Mohan
  15. 15. OPC UA Stack LayerOPC UA Stack Layer OPC UA defines three Stack layers and different profiles for each layer. Message Encoding LayerMessage Encoding Layer Message Security LayerMessage Security Layer Message Transport LayerMessage Transport Layer 1515Ch.Vishwa MohanCh.Vishwa Mohan
  16. 16. Protocol BindingsProtocol Bindings At present OPC UA defines four (4) protocol bindings.At present OPC UA defines four (4) protocol bindings. Native UA Binary (Native UA Binary (mandatorymandatory)) HTTPS with UA BinaryHTTPS with UA Binary HTTPS with SOAP and XML encodingHTTPS with SOAP and XML encoding HTTP with SOAP &WS-SecureConversation and XML Encoding.HTTP with SOAP &WS-SecureConversation and XML Encoding. 1616Ch.Vishwa MohanCh.Vishwa Mohan
  17. 17. OPC UA Toolkit architecture : OPC UA Tool KitOPC UA Tool Kit 1717Ch.Vishwa MohanCh.Vishwa Mohan
  18. 18. Information ModelInformation Model
  19. 19. What is an Information ModelWhat is an Information Model OPC UA not only addresses data communication but also provides a meta model allowing standardized information model built on top of it. OPC UA provides a framework that can be used to represent complex information as Objects in the address space. Objects consists of differentObjects consists of different NodesNodes connected byconnected by referencesreferences.. An Information Model Defines: NodesNodes Type Definitions, Reference types and Data types.Type Definitions, Reference types and Data types. Modeling Rules.Modeling Rules. Standard Properties and methods.Standard Properties and methods. Standard Objects and ViewsStandard Objects and Views ConstraintsConstraints 1919Ch.Vishwa MohanCh.Vishwa Mohan
  20. 20. OPC UAOPC UA defines graphical symbols for all NodeClasses and how References of different types can be visualized. OPC UA notation is actually stereotyped UML. All Nodes in OPC UA would be mapped to instances of UML. The OPC UA NodeClasses would be mapped to UML-Classes. In OPC UA ObjectTypes become instances of that UML-Class. 2020Ch.Vishwa MohanCh.Vishwa Mohan OPC UA Graphical NotationOPC UA Graphical Notation
  21. 21. NodeClass Graphics ElementsNodeClass Graphics Elements OPC UA defines eight node classes. Each node in the address space is an instance of one of these node classes. 2121Ch.Vishwa MohanCh.Vishwa Mohan
  22. 22. NodeClass & AttributesNodeClass & Attributes 2222Ch.Vishwa MohanCh.Vishwa Mohan
  23. 23. Data Types HierarchyData Types Hierarchy 2323Ch.Vishwa MohanCh.Vishwa Mohan
  24. 24. Data Types HierarchyData Types Hierarchy 2424Ch.Vishwa MohanCh.Vishwa Mohan
  25. 25. Base Information ModelBase Information Model ContentContent 2525Ch.Vishwa MohanCh.Vishwa Mohan
  26. 26. ContentContent 2626Ch.Vishwa MohanCh.Vishwa Mohan Attributes & DescriptionAttributes & Description
  27. 27. Node ClassNode Class Used to define nodes in the UA Address Space.Used to define nodes in the UA Address Space. Node classes are use to represent the following three types ofNode classes are use to represent the following three types of objects:objects: Define instances.Define instances. Define types for instances.Define types for instances. Define data types.Define data types. All nodes are derived fromAll nodes are derived from BaseBase node class.node class. No references are specified forNo references are specified for BaseBase node class.node class. Attributes of Base Node class are:Attributes of Base Node class are: NodeidNodeid,, NodeClassNodeClass,, BrowseNameBrowseName,, DisplayNameDisplayName,, DescriptionDescription,, WriteMaskWriteMask,, UserWriteMaskUserWriteMask.. 2727Ch.Vishwa MohanCh.Vishwa Mohan
  28. 28. Object Node ClassObject Node Class ThisThis ObjectObject Node class is used to define real-world objects,Node class is used to define real-world objects, software objects and system objects and system components. TheThe ObjectObject node class derived fromnode class derived from BaseBase node class.node class. Attributes defined byAttributes defined by ObjectObject Node class:Node class: EventNotifierEventNotifier.. Object node is represented as rectangle including textObject node is represented as rectangle including text represents string part ofrepresents string part of DisplanyNameDisplanyName attribute as below:attribute as below: If the Object is created based on an instance declaration, it shall have the same BrowseName as its instance declaration. In addition all nodes referenced with hierarchical reference in forward direction shall have unique BrowseName value in the context of this Object. 2828Ch.Vishwa MohanCh.Vishwa Mohan
  29. 29. Ch.Vishwa MohanCh.Vishwa Mohan Variable Node ClassVariable Node Class TheThe VariableVariable node class used to define variables. Two types ofnode class used to define variables. Two types of variables are defined:variables are defined: PropertiesProperties Data VariablesData Variables VariableVariable nodenode never appear themselvesnever appear themselves in the address the address space. Always they are defined asAlways they are defined as propertiesproperties andand data variablesdata variables ofof other nodes.other nodes. Clients may read or write Variable values, or monitor them for value changes. This node has at most oneThis node has at most one HasModelingRuleHasModelingRule referencereference pointing topointing to ModelingRuleModelingRule node.node. It can have at mode oneIt can have at mode one HasModelingParentHasModelingParent reference.reference. 2929
  30. 30. Ch.Vishwa MohanCh.Vishwa Mohan Variable Node ClassVariable Node Class PropertiesProperties are defined usingare defined using VariableVariable node class. Representsnode class. Represents characteristics of a node.characteristics of a node. DataVariablesDataVariables node represents the content of an object. It alsonode represents the content of an object. It also defined usingdefined using VariableVariable node class.node class. Addition toAddition to BaseBase node attributes it supports following attributesnode attributes it supports following attributes ValueValue DataValueDataValue ValueRankValueRank ArrayDimensionsArrayDimensions AccessLevelAccessLevel UserAccessLevelUserAccessLevel MinimumSamplingIntervalMinimumSamplingInterval HistorizingHistorizing 3030
  31. 31. Type DefinitionsType Definitions Type definition describes theType definition describes the semanticssemantics andand structurestructure of itsof its instance Nodes.instance Nodes. OPC UA definesOPC UA defines ObjectObject andand VariableVariable type definitions aretype definitions are ObjectTypeObjectType andand VariableTypeVariableType.. To link an instance with its type definitionTo link an instance with its type definition HasTypeDefinitionHasTypeDefinition reference used.reference used. For any data variable type definition not available then serverFor any data variable type definition not available then server will usewill use BaseDataVariableTypeBaseDataVariableType as its type its type definition. PropertyType used as type definition for all properties. It is possible to subtype a type definition. 3131Ch.Vishwa MohanCh.Vishwa Mohan
  32. 32. ObjectType Node ClassObjectType Node Class ThisThis ObjectTypeObjectType node class provides definition for objects.node class provides definition for objects. In addition toIn addition to BaseBase node attribute it supports additionalnode attribute it supports additional IsAbstractIsAbstract attribute.attribute. TheThe ObjectTypeObjectType node class supports following references:node class supports following references: HasComponentHasComponent HasPropertyHasProperty HasSubtypeHasSubtype GeneratesEventsGeneratesEvents Its notation is a shadowed rectangle including textIts notation is a shadowed rectangle including text representing string part ofrepresenting string part of DisplayNameDisplayName attribute.attribute. ObjectsObjects are always based on anare always based on an ObjectTypeObjectType. (. (i.e., they havei.e., they have HasTypeDefinitionHasTypeDefinition reference pointing to itsreference pointing to its ObjectTypeObjectType).). 3232Ch.Vishwa MohanCh.Vishwa Mohan
  33. 33. Ch.Vishwa MohanCh.Vishwa Mohan DataType Node ClassDataType Node Class Used to define simple & complex data types.Used to define simple & complex data types. Each Variable and VariableType node is pointing with its DataType attribute to a node of the DataType node class: EachEach DataTypeDataType can have several data type encoding andcan have several data type encoding and encoding type shown by pointing toencoding type shown by pointing to DataTypeEncodingTypeDataTypeEncodingType.. Its notation in address space is shadowed hexagon includingIts notation in address space is shadowed hexagon including text representstext represents DisplayNameDisplayName attribute.attribute. It deinfes only single propertyIt deinfes only single property IsAbstractIsAbstract.. 3333
  34. 34. Ch.Vishwa MohanCh.Vishwa Mohan This node class is used to provide type definition for variablesThis node class is used to provide type definition for variables VariableVariable node usesnode uses HasTypeDefintionHasTypeDefintion reference point to itsreference point to its VariableTypeVariableType.. TheThe VariableTypeVariableType defines following attributes:defines following attributes: Value,Value, DataTypeDataType ValueRankValueRank AArrayDimensionrrayDimension IsAbstractIsAbstract This node class represented with shadowed rectangle with rounder corner included with DisplayName attribute. The VariableType node also defines HasProperty, HasComponent, GenerateEvents references. 3434 VariableType Node ClassVariableType Node Class
  35. 35. ReferencesReferences References allows nodes to be connect together. All the References have ReferenceType that specify the semantics of the relationship. References can be Hierarchical or Non-Hierarchical. HiHierarchical references are used to create the structure of Objects. Non-hierarchical are used to create arbitrary associations . Applications can define their own ReferenceTypes by creating subtypes of the existing ReferenceType. Each node can reference another node with the same ReferenceType only once. 3535Ch.Vishwa MohanCh.Vishwa Mohan
  36. 36. References NotationReferences Notation References between Nodes are represented by lines between them. Arrows expose the direction. 3636Ch.Vishwa MohanCh.Vishwa Mohan
  37. 37. Reference Model HierarchyReference Model Hierarchy 3737Ch.Vishwa MohanCh.Vishwa Mohan
  38. 38. EventsEvents OnlyOnly ObjectObject andand ViewView nodes class used to subscribe events.nodes class used to subscribe events. TheseThese two nodes havetwo nodes have EventNotifierEventNotifier attribute.attribute. Event subscription usesEvent subscription uses MonitoringMonitoring andand SubscriptionSubscription The OPC UA server’sThe OPC UA server’s ServerServer Object supports server specificObject supports server specific In OPC UA all events are derived fromIn OPC UA all events are derived from BaseEventTypeBaseEventType.. All event types exposed in the server are need to present inAll event types exposed in the server are need to present in Address space.Address space. Type definition of event is represented withType definition of event is represented with ObjectTypeObjectType node.node. Event types can beEvent types can be subtypedsubtyped butbut can’t extendcan’t extend an existingan existing event type.event type. 3838Ch.Vishwa MohanCh.Vishwa Mohan
  39. 39. Event Type HierarchyEvent Type Hierarchy 3939Ch.Vishwa MohanCh.Vishwa Mohan
  40. 40. MethodsMethods In OPC UA methods are light weight functions.In OPC UA methods are light weight functions. Scope is bounded by an owningScope is bounded by an owning ObjectObject oror ObjecTypeObjecType.. Each method is described by a node ofEach method is described by a node of MethodMethod node class.node class. NodeNode contains method metadata.contains method metadata. Method are represented by aMethod are represented by a OvalOval including text representingincluding text representing the string part of thethe string part of the DisplayNameDisplayName attribute ofattribute of MethodMethod node.node. Methods are invoked by usingMethods are invoked by using CallCall service.service. Method invocations always run to completion. Each method is invoked in the context ofEach method is invoked in the context of existing sessionexisting session.. Methods areMethods are statelessstateless. But it can affect the state of owning. But it can affect the state of owning 4040Ch.Vishwa MohanCh.Vishwa Mohan
  41. 41. MethodMethod TheThe MethodMethod node class inherits fromnode class inherits from BaseBase node class.node class. MethodMethod node defines the following attributes.node defines the following attributes. ExecutableExecutable UserExecutableUserExecutable Properties are defined on method usingProperties are defined on method using HasPropertyHasProperty referencereference Predefined propertiesPredefined properties InputArugmentsInputArugments andand OutputArguementsOutputArguements are array ofare array of ArugmentArugment type.type. To specifyTo specify modeling rulemodeling rule on a method it can useon a method it can use HasModelRuleHasModelRule Method can useMethod can use GenerateEventsGenerateEvents reference to identify thatreference to identify that method can generate eventsmethod can generate events of specified event type or subtype.of specified event type or subtype. 4141Ch.Vishwa MohanCh.Vishwa Mohan
  42. 42. Attributes SummaryAttributes Summary 4242Ch.Vishwa MohanCh.Vishwa Mohan
  43. 43. BitMask forBitMask for WriteMask and UserWriteMaskWriteMask and UserWriteMask 4343Ch.Vishwa MohanCh.Vishwa Mohan
  44. 44. Information ModelInformation Model Information Model uses OO concepts and allow full-meshed network of nodes related by multiple types of references. AllAll information in an OPC UA server will be composed of the standard OPC UA Object types (ServerTypes, EventTypes, VariableTypes, BaseTypes, etc., ) EEvery OPC UA server will have an OPC UA Root object. Every OPC UA server will have at least one Server Object. Every OPC UA server will support at least one View Object 4444Ch.Vishwa MohanCh.Vishwa Mohan
  45. 45. Object in UA Address SpaceObject in UA Address Space 4545Ch.Vishwa MohanCh.Vishwa Mohan A simpleA simple ReservationReservation object in UA Address space:object in UA Address space: Relationship betweenRelationship between ObjectObject and itsand its Type definitionType definition::
  46. 46. 4646Ch.Vishwa MohanCh.Vishwa Mohan Diagnostic Information ModelDiagnostic Information Model
  47. 47. Data Access Information ModelData Access Information Model 4747Ch.Vishwa MohanCh.Vishwa Mohan
  48. 48. Definition of “Definition of “AnalogMeasurementAnalogMeasurement” type and its instance.” type and its instance. 4848Ch.Vishwa MohanCh.Vishwa Mohan Type Definition & InstancesType Definition & Instances
  49. 49. NamespacesNamespaces Namespaces in OPC UA have a globally unique string called a NamespaceURI and a locally unique integer called a NamespaceIndex. NNamespaceIndex is unique only within the context of a Session. Two types of values in OPC UA are qualified with NamespacesTwo types of values in OPC UA are qualified with Namespaces NodeId QualifiedNamesQualifiedNames OPC UA Information Models generally define globally unique NodeIds for the TypeDefinitions defined by the Information Model. 4949Ch.Vishwa MohanCh.Vishwa Mohan
  50. 50. Ch.Vishwa MohanCh.Vishwa Mohan OPC UA MetaModelOPC UA MetaModel The OPC UA meta model is represented by UML classes and UML objects marked with the stereotype <<TypeExtension>>. Stereotyped UML objects represent data types or reference types. In Object Diagram, OPC Attributes are represented as UML attributes without data types and marked with the stereotype <<Attribute>>. OPC references are represented as UML associations marked with 5050
  51. 51. Nodes UML DiagramNodes UML Diagram 5151Ch.Vishwa MohanCh.Vishwa Mohan
  52. 52. UML Meta Model forUML Meta Model for ReferenceTypesReferenceTypes 5252Ch.Vishwa MohanCh.Vishwa Mohan
  53. 53. UML Meta Model forUML Meta Model for Method Node ClassMethod Node Class 5353Ch.Vishwa MohanCh.Vishwa Mohan
  54. 54. BaseObjectTypeBaseObjectType TheThe BaseObjectTypeBaseObjectType is used as type definition whenever thereis used as type definition whenever there is anis an ObjectObject having no concrete type definition available.having no concrete type definition available. All otherAll other ObjectTypesObjectTypes are directly or indirectly derived from theare directly or indirectly derived from the BaseObjectTypeBaseObjectType.. The following types are derived from BaseObjectType. TheseThe following types are derived from BaseObjectType. These are called special (tree group) types.are called special (tree group) types. ModellingRuleType: Used as type for modeling rule. FolderType : Used to organize the Address Space into hierarchy of nodes. DataTypeEncodingType: Used as type for data type encodings. DataTypeSystemType: Used as type for data type systems. 5454Ch.Vishwa MohanCh.Vishwa Mohan
  55. 55. OPC UA Address Space is structured as a hierarchy, with the top levels standardized for all servers. RootRoot browse entry point for Address Spacebrowse entry point for Address Space ViewsViews browse entry point for views.browse entry point for views. ObjectsObjects browse entry point for Objects.browse entry point for Objects. ReferenceTypes: It will be used as filters in the browse Service and in queries, the server shall provide all its ReferenceTypes. DataTypes: Entry point for all data types that server wishes to expose in Address space. 5555Ch.Vishwa MohanCh.Vishwa Mohan Standard Address Space StructureStandard Address Space Structure
  56. 56. MappingMapping
  57. 57. Unified Object ModelUnified Object Model OPC UA enables DA, AE and HDA data to be accessed by a single OPC Server. Similarly OPC UA unifies and simplifies access to Process Data, Events, Historical Data & Programs. 5757Ch.Vishwa MohanCh.Vishwa Mohan
  58. 58. OPC Interface UnificationOPC Interface Unification OPC UA ServerOPC UA Server embodies the functionality of existingembodies the functionality of existing OPCOPC ServersServers using a single set of servicesusing a single set of services.. Features of UA Server are:Features of UA Server are: Service Oriented Architecture (SOA)Service Oriented Architecture (SOA) Integrated with DA, AE, Commands, ComplexData, etc.,Integrated with DA, AE, Commands, ComplexData, etc., Single Set of Services Query, Read, Write, Subscribe, etc.,Single Set of Services Query, Read, Write, Subscribe, etc., Named/Typed relationship between Nodes.Named/Typed relationship between Nodes. Platform Independent.Platform Independent. Communication architecture is a 3-Tier.Communication architecture is a 3-Tier. 5858Ch.Vishwa MohanCh.Vishwa Mohan
  59. 59. MappingMapping Classic OPC can be mapped to OPC UA without losing information. Mapping from OPC UA to Classic OPC is possible but may lead to loss of information. 5959Ch.Vishwa MohanCh.Vishwa Mohan
  60. 60. Most of OPC UA servers needed to implement the complete OPC DA functionality are contained in the base specifications of OPC UA. The implementation functionalities are categorizedThe implementation functionalities are categorized Address SpaceAddress Space andand Access InformationAccess Information.. 6060Ch.Vishwa MohanCh.Vishwa Mohan Mapping from OPC DA to OPC UAMapping from OPC DA to OPC UA
  61. 61. Mapping fromMapping from OPC DAOPC DA toto OPC UAOPC UA containscontains FolderFolder,, ObjectObject,, DataData VariableVariable,, OrganizesOrganizes andand HasComponentHasComponent references.references. 6161Ch.Vishwa MohanCh.Vishwa Mohan OPC DA Address Space MappingOPC DA Address Space Mapping
  62. 62. OPC DA Access Information MappingOPC DA Access Information Mapping OPC DAOPC DA toto OPC UAOPC UA access informationaccess information mappingmapping 6262Ch.Vishwa MohanCh.Vishwa Mohan
  63. 63. OPC XML DA MappingOPC XML DA Mapping OPC XMLDA uses the same Address Space concept like COM- based OPC DA. 6363Ch.Vishwa MohanCh.Vishwa Mohan
  64. 64. OPC Alarm & Event MappingOPC Alarm & Event Mapping Simple and trackingSimple and tracking eventsevents defined indefined in classicclassic OPC A&EOPC A&E are easilyare easily implemented inimplemented in OPC UAOPC UA by using baseby using base specifications.specifications. For mappingFor mapping conditioncondition EventsEvents thethe OPC UAOPC UA Alarm & condition modelAlarm & condition model is requiredis required.. 6464Ch.Vishwa MohanCh.Vishwa Mohan
  65. 65. ServicesServices
  66. 66. Ch.Vishwa MohanCh.Vishwa Mohan OPC UA ServicesOPC UA Services OPC UA defines totally 37 different services. 3 services deals with discovery. 6 services for connection handling. 28 services uses to access OPC UA data. Independent ofIndependent of Transport protocolTransport protocol andand Program environmentProgram environment.. UsesUses Request-ResponseRequest-Response pattern.pattern. By default all services areBy default all services are AsynchronousAsynchronous.. Each service haveEach service have Individual TimeoutIndividual Timeout.. Each Service contains the same headers for Request Messages and for Response Messages.. UA services are designed inUA services are designed in SOASOA manner. (manner. (ProvidesProvides BulkBulk operationsoperations to reduce round trips between client and serverto reduce round trips between client and server).). 6666
  67. 67. OPC UA Services SetsOPC UA Services Sets OPC UA Services are grouped by functionalities:OPC UA Services are grouped by functionalities: Discovery Service Set Secure Channel Service Set Session Service Set. View Service Set Attribute Service Set Subscription Service Set Monitored Item Service Set. Method Service Set. Query Service Set Node Management Service Set. 6767Ch.Vishwa MohanCh.Vishwa Mohan
  68. 68. Request & Response Header ParametersRequest & Response Header Parameters 6868Ch.Vishwa MohanCh.Vishwa Mohan Request HeaderRequest Header Parameters:Parameters: AuthenticationTokenAuthenticationToken RequestHandleRequestHandle TimeStampTimeStamp TimeoutHintTimeoutHint ReturnDiagnosticReturnDiagnostic AuditEntryIdAuditEntryId ResponseResponse HeaderHeader Parameters:Parameters: Service ResultService Result RequestHandleRequestHandle TimestampTimestamp ServiceDiagnosticsServiceDiagnostics
  69. 69. Error InformationError Information Two types ofTwo types of Error InformationError Information Used by OPC UA Services:Used by OPC UA Services: Status CodeStatus Code Diagnostic InformationDiagnostic Information Status CodeStatus Code is 32-bit unsigned integer (is 32-bit unsigned integer (ExtendableExtendable).). Most significant 16 bits numeric code value used to detect specific errors or conditions. Two most significant bits uses overall severity:Two most significant bits uses overall severity: GoodGood UncertainUncertain BadBad Least significant 16-bitsLeast significant 16-bits are bit flags that containare bit flags that contain additionaladditional informationinformation. (. (But doesn’t effect the meaning ofBut doesn’t effect the meaning of StausCodeStausCode).). 6969Ch.Vishwa MohanCh.Vishwa Mohan
  70. 70. Diagnostic InformationDiagnostic Information TheThe DiagnosticInformationDiagnosticInformation structure contains additionalstructure contains additional information for ainformation for a StatusCodeStatusCode. It includes:. It includes: Vendor Specific Error code.Vendor Specific Error code. Localized Description of the Error.Localized Description of the Error. Text field for Additional Information.Text field for Additional Information. 7070Ch.Vishwa MohanCh.Vishwa Mohan
  71. 71. Communication ContextCommunication Context OPC UA services areOPC UA services are StatefulStateful. So to call a Service need to. So to call a Service need to establish Communication context.establish Communication context. 7171Ch.Vishwa MohanCh.Vishwa Mohan
  72. 72. OPC UA ServicesOPC UA Services List of services to exchange information between OPC UA client &Server.List of services to exchange information between OPC UA client &Server. 7272Ch.Vishwa MohanCh.Vishwa Mohan
  73. 73. Ch.Vishwa MohanCh.Vishwa Mohan Discovery ServicesDiscovery Services OPC UA specifies a set of abstract services for performing the discovery process. Entities for Discovery process are:Entities for Discovery process are: Session EndpointSession Endpoint Discovery EndpointDiscovery Endpoint Local Discovery ServerLocal Discovery Server Global Discovery ServerGlobal Discovery Server Service Related to Discovery Process are:Service Related to Discovery Process are: RegisterServerRegisterServer FindServersFindServers GetEndpointsGetEndpoints OPenSecureChannelOPenSecureChannel 7373
  74. 74. Discovery ProcessDiscovery Process Discovery process performed by exchanging DiscoveryDiscovery process performed by exchanging Discovery Messages. Discovery Process can be any one of the 3 forms:Messages. Discovery Process can be any one of the 3 forms: Simple DiscoverySimple Discovery Normal DiscoveryNormal Discovery Hierarchical DiscoveryHierarchical Discovery 7474Ch.Vishwa MohanCh.Vishwa Mohan
  75. 75. ArchitectureArchitecture
  76. 76. The OPC UA Server or Client consists 3 layers :The OPC UA Server or Client consists 3 layers : StacksStacks are shipped by OPC Foundation.are shipped by OPC Foundation. SDK’sSDK’s are provided by third parties.are provided by third parties. 7676Ch.Vishwa MohanCh.Vishwa Mohan OPC UA Application ArchitectureOPC UA Application Architecture
  77. 77. Stacks ArchitectureStacks Architecture Functionalities of theFunctionalities of the StackStack accessed by higher layers:accessed by higher layers: Stack ConfigurationStack Configuration Managing Connection Establishment.Managing Connection Establishment. Sending Messages.Sending Messages. Message Receive Notification.Message Receive Notification. 7777Ch.Vishwa MohanCh.Vishwa Mohan
  78. 78. Stack ArchitectureStack Architecture ANSI C Stack supports UA Binary for the Encoding layer, UA Secure Conversation for secure layer and UA TCP for transport layer. The .NET Stack doesn’t have a Platform Layer. Different configurations(Transport profiles or facets) of .NET stacks: HTTP/SOAP, WS-SecureConversation, UA Binary HTTP/SOAP, WS-SecureConversation, XML HTTP/SOAP, WS-SecureConversation, UA Binary, and XML UA TCP, UA-SecureConversation, UA Binary 7878Ch.Vishwa MohanCh.Vishwa Mohan
  79. 79. SDKSDK SDK’sSDK’s sits on top of Stacks and consists 3 parts:sits on top of Stacks and consists 3 parts: UA Specific FunctionalityUA Specific Functionality Common FunctionalityCommon Functionality Client/ Server API (Interfaces)Client/ Server API (Interfaces) 7979Ch.Vishwa MohanCh.Vishwa Mohan
  80. 80. SDK Providers.SDK Providers. SDK’s consists two parts Client library and Server library.SDK’s consists two parts Client library and Server library. C++ based UA SDKs for clients and servers also available. 8080Ch.Vishwa MohanCh.Vishwa Mohan
  81. 81. System InfrastructureSystem Infrastructure
  82. 82. System ArchitectureSystem Architecture OPC UA is designed to run on different platforms also supports different architectural concepts at system level such as redundancy, server-chaining, server-aggregation. System Architectural Patterns: Client-Server Chain Server Server –To- Server communication Aggregating Servers 8282Ch.Vishwa MohanCh.Vishwa Mohan
  83. 83. System ArchitectureSystem Architecture Typical system architecture for large networks shown below: 8383Ch.Vishwa MohanCh.Vishwa Mohan
  84. 84. Architectural PatternsArchitectural Patterns Client-Server Pattern:Client-Server Pattern: Chained Server Pattern:Chained Server Pattern: 8484Ch.Vishwa MohanCh.Vishwa Mohan
  85. 85. Architectural PatternsArchitectural Patterns Server to Server Communication:Server to Server Communication: 8585Ch.Vishwa MohanCh.Vishwa Mohan
  86. 86. Aggregating ServersAggregating Servers Aggregating server pattern normally used in MESAggregating server pattern normally used in MES 8686Ch.Vishwa MohanCh.Vishwa Mohan
  87. 87. RedundancyRedundancy Redundancy can be atRedundancy can be at serverserver side orside or clientclient side. Differentside. Different Redundancy structuresRedundancy structures for client and server.for client and server. Client RedundancyClient Redundancy: Uses TransferSubscription service.: Uses TransferSubscription service. 8787Ch.Vishwa MohanCh.Vishwa Mohan
  88. 88. Server RedundancyServer Redundancy It can beIt can be Transparent Server RedundancyTransparent Server Redundancy andand Non-Non- transparent Server Redundancytransparent Server Redundancy.. 8888Ch.Vishwa MohanCh.Vishwa Mohan
  89. 89. Server Failover ModesServer Failover Modes Failover Mode can be three modes. (Failover Mode can be three modes. (Based onBased on modemode clientclient need to perform some actions to supportneed to perform some actions to support redundancyredundancy).). Cold Warm Hot On Failover the client need to create a new session to a backup server and transfer the subscription data of the previous session to new session. Transferring subscriptions two approaches: Duplicating Subscription Using TransferSubscription Service. 8989Ch.Vishwa MohanCh.Vishwa Mohan
  90. 90. Transferring SubscriptionTransferring Subscription Duplication SubscriptionDuplication Subscription: Here all subscriptions created on: Here all subscriptions created on Active server also created on Backup server. But samplingActive server also created on Backup server. But sampling and reporting only enabled on Active Server.and reporting only enabled on Active Server. 9090Ch.Vishwa MohanCh.Vishwa Mohan
  91. 91. Transferring SubscriptionTransferring Subscription TransferSubscription Service ApproachTransferSubscription Service Approach:: Proxy component on the client only creates subscriptions on the active server. Active server mirrors all created subscriptions to the backup server. On Failover, proxy creates a new session on the backup server and uses the TransferSubscription Service for getting the subscriptions. 9191Ch.Vishwa MohanCh.Vishwa Mohan
  92. 92. SecuritySecurity
  93. 93. Security in OPC UASecurity in OPC UA Core Security features of OPC UA are:Core Security features of OPC UA are: Authentication Authorization Confidentiality Integrity Auditability Availability OPC UA security uses:OPC UA security uses: X.509 Certificates OpenSSL Encryption Username/Password Access rights for each attribute. 9393Ch.Vishwa MohanCh.Vishwa Mohan
  94. 94. OPC UA has to provideOPC UA has to provide flexible security modelflexible security model need to thinkneed to think tradeoff betweentradeoff between SecuritySecurity andand PerformancePerformance.. 9494Ch.Vishwa MohanCh.Vishwa Mohan OPC UA Environment & SecurityOPC UA Environment & Security
  95. 95. Security ArchitectureSecurity Architecture ContentContent 9595Ch.Vishwa MohanCh.Vishwa Mohan
  96. 96. Connection EstablishmentConnection Establishment The connection establishment of OPC UA includesThe connection establishment of OPC UA includes Creating a Secure ChannelCreating a Secure Channel Establishing a SessionEstablishing a Session Activating the SessionActivating the Session The following are messages related to connection:The following are messages related to connection: GetEndpointsGetEndpoints OpenSecureChannelOpenSecureChannel CreateSesionCreateSesion ActivateSesionActivateSesion CloseSesionCloseSesion CloseSecureChannelCloseSecureChannel 9696Ch.Vishwa MohanCh.Vishwa Mohan
  97. 97. Connection EstablishmentConnection Establishment Sequence diagram forSequence diagram for Secure Connection EstablishmentSecure Connection Establishment 9797Ch.Vishwa MohanCh.Vishwa Mohan
  98. 98. Technology MappingTechnology Mapping
  99. 99. Technology MappingTechnology Mapping To exchange data between applications OPC UA definedTo exchange data between applications OPC UA defined Technology MappingTechnology Mapping addresses:addresses: Data EncodingData Encoding Securing CommunicationSecuring Communication Transporting DataTransporting Data OPC UA Application Function Layers shown below:OPC UA Application Function Layers shown below: 9999Ch.Vishwa MohanCh.Vishwa Mohan
  100. 100. OPC UA Stack OverviewOPC UA Stack Overview Mappings are organized intoMappings are organized into three groups:three groups: DataEncodingsDataEncodings,, SecurityProtocolsSecurityProtocols andand TransportProtocolsTransportProtocols.. Different mappings combinedDifferent mappings combined together to createtogether to create StackProfilesStackProfiles OPC UA supports two types ofOPC UA supports two types of datadata encodingencoding:: OPC UA BinaryOPC UA Binary OPC UA XMLOPC UA XML 100100Ch.Vishwa MohanCh.Vishwa Mohan
  101. 101. Data EncodingData Encoding At present OPC UA supports two encodings XML and Binary. As a pert of encoding OPC UA defined built in primitive types. A special type container and common for all encoding type is defined called ExtensionObject. ExtensionObject is a container holds data & how it encoded. OPC UA also defines Variant type. Binary encoding for “OPCUA” string: Sequence of UTF-8 Character is used beginning with length of string.Sequence of UTF-8 Character is used beginning with length of string. No Null terminator.No Null terminator. Exchange data with different types of systems XML Encoding best: 101101Ch.Vishwa MohanCh.Vishwa Mohan
  102. 102. Two security protocols are defined for OPC UA:Two security protocols are defined for OPC UA: WS-SecureConversationWS-SecureConversation UA-SecureConversationUA-SecureConversation WS-SecureConversationWS-SecureConversation is used in conjunction withis used in conjunction with WS-WS- SecurityPolicySecurityPolicy.. The connection establishment in OPC UA requires creating a Secure Channel and a Session. UA-SecureConversation is a combination standards TLS and WS-SecureConversation. (Defined for optimization). 102102Ch.Vishwa MohanCh.Vishwa Mohan Securing CommunicationSecuring Communication
  103. 103. Mapping ImplementationsMapping Implementations Currently there are three stacks provided by OPC Foundation.Currently there are three stacks provided by OPC Foundation. ANSI C StackANSI C Stack C# StackC# Stack Java StackJava Stack ANSI C stacks currently provide UA Binary, UA- SecureConversation, and UA TCP as mapping implementations. Possible to generate your own stack forPossible to generate your own stack for SOAP/HTTPSOAP/HTTP.. 103103Ch.Vishwa MohanCh.Vishwa Mohan
  104. 104. Transport ProtocolsTransport Protocols OPC UA defined two transport protocolsOPC UA defined two transport protocols UA TCPUA TCP andand SOAP/HTTPSOAP/HTTP.. UA TCP is a small set of protocol defined on top of TCP. SOAP/HTTP is another transport communicates across the networks. 104104Ch.Vishwa MohanCh.Vishwa Mohan
  105. 105. Ch.Vishwa MohanCh.Vishwa Mohan Built-in TypesBuilt-in Types 105105
  106. 106. This encoding is developed for performance needs.This encoding is developed for performance needs. This Encoding does not include any type or field name information. Binary encoding follows “little enedian” format. All string values are encoded as a sequence of UTF8 characters without a null terminator and preceded by the length in bytes. The length in bytes encoded asThe length in bytes encoded as Int32Int32. A value. A value -1-1 for NULL string.for NULL string. A DateTime value shall be encoded as a 64-bit signed integer. An XmlElement is an XML fragment serialized as UTF-8 string and then encoded as ByteString. Enumerators are encoded as Int32 values. 106106Ch.Vishwa MohanCh.Vishwa Mohan OPC UA Binary EncodingOPC UA Binary Encoding
  107. 107. The encoding of a NodeId varies according to the contents of the instance. The components of NodeId is given below: A LocalizedText structure is given below: 107107Ch.Vishwa MohanCh.Vishwa Mohan OPC UA Binary EncodingOPC UA Binary Encoding
  108. 108. Serialized form ofSerialized form of ExtensionObjectExtensionObject is given given below. In OPC UAIn OPC UA MessagesMessages are encoded asare encoded as ExtensionObjectsExtensionObjects.. TheThe TypeIdTypeId field contains the DataTypeEncoding identifier for the message. The Length field is omitted since the messages are defined by the OPC UA specification. 108108Ch.Vishwa MohanCh.Vishwa Mohan OPC UA Binary EncodingOPC UA Binary Encoding
  109. 109. Serialized form ofSerialized form of VariantVariant is given below. All OPC UAis given below. All OPC UA standard built-in types are encoded inside variant.standard built-in types are encoded inside variant. 109109Ch.Vishwa MohanCh.Vishwa Mohan OPC UA Binary EncodingOPC UA Binary Encoding
  110. 110. Serialized form ofSerialized form of DataValueDataValueis given given below. A DataValue is always preceded by a mask that indicates which fields are present in the stream. 110110Ch.Vishwa MohanCh.Vishwa Mohan OPC UA Binary EncodingOPC UA Binary Encoding
  111. 111. OPC UA XML EncodingOPC UA XML Encoding Most of the built-in types are encoded into XML by using theMost of the built-in types are encoded into XML by using the format defined in XML Schema Security Model Specification.format defined in XML Schema Security Model Specification. The mappings between the OPC UA integer types and XML schema data types are given below: A Guid is encoded using the string its schema is given below: 111111Ch.Vishwa MohanCh.Vishwa Mohan
  112. 112. A ByteString value is encoded as an xs:base64Binary value. A NodeId value is encoded as a xs:string with the syntax: ns=<namespaceindex>;<type>=<value> A StatusCode is formatted in an xs:string as an 8 digit hexadecimal number. A LocalizedText value is encoded as a xs:complexType: 112112Ch.Vishwa MohanCh.Vishwa Mohan OPC UA XML EncodingOPC UA XML Encoding
  113. 113. An ExtensionObject value is encoded as a xs:complexType and its schema is given below: 113113Ch.Vishwa MohanCh.Vishwa Mohan OPC UA XML EncodingOPC UA XML Encoding
  114. 114. Migration fromMigration from Classic OPC to OPC UAClassic OPC to OPC UA
  115. 115. MigrationMigration OPC UA provides migration strategies for different requirements and levels of OPC UA adaption. First LevelFirst Level : Doesn’t required any changes in existing products.: Doesn’t required any changes in existing products. Using OPC UA providedUsing OPC UA provided WrappersWrappers andand ProxiesProxies are good enough.are good enough. Second LevelSecond Level: Here mapping exposes the same features as in: Here mapping exposes the same features as in the existing old OPC products with OPC UA.the existing old OPC products with OPC UA. 115115Ch.Vishwa MohanCh.Vishwa Mohan
  116. 116. Wrappers & ProxiesWrappers & Proxies OPC UA clients can instantly connect to existing OPC COM Servers. UA Client Proxy to connect existing COM clients to new UA Servers. Using UA proxy and wrappers to replace the DCOM . 116116Ch.Vishwa MohanCh.Vishwa Mohan
  117. 117. Wrappers & ProxiesWrappers & Proxies WrappersWrappers are used to alloware used to allow OPC UA ClientsOPC UA Clients to accessto access classicclassic OPC ServersOPC Servers.. ProxiesProxies used to accessused to access UA serverUA server fromfrom COM clientCOM client.. 117117Ch.Vishwa MohanCh.Vishwa Mohan
  118. 118. Performance, Profiling & TuningPerformance, Profiling & Tuning
  119. 119. TitleTitle ContentContent 119119Ch.Vishwa MohanCh.Vishwa Mohan
  120. 120. OPC CertificationOPC Certification OPC server and client products are tested atOPC server and client products are tested at OPC FoundationOPC Foundation Certification LabCertification Lab. It will test the following :. It will test the following : ComplianceCompliance InteroperabilityInteroperability RobustnessRobustness EfficiencyEfficiency UsabilityUsability OPC Foundation also hosts workshop forOPC Foundation also hosts workshop for InteroperabilityInteroperability testingtesting ((IOPIOP).). OPC Foundation providesOPC Foundation provides OPC Compliance Test ToolOPC Compliance Test Tool ((CTTCTT).). It isIt is a script based tool and can enhanced to create producta script based tool and can enhanced to create product specific test cases.specific test cases. 120120Ch.Vishwa MohanCh.Vishwa Mohan
  121. 121. Questions ?Questions ? Ch. VishwaMohanCh. VishwaMohan Freelance Software Consultant and TrainerFreelance Software Consultant and Trainer Reach me @Reach me @ EmailEmail :: 121121Ch.Vishwa MohanCh.Vishwa Mohan
  122. 122. Thank You !Thank You !