Instances inherit the initial values for the Attributesthat they have in common with the TypeDefinitionNodefrom which they are instantiated, with the exceptions of the NodeClassand NodeId.

When a Servercreates an instance of a TypeDefinitionNodeit shall create the same hierarchy of Nodes beneath the new Objector Variable depending on the ModellingRuleof each InstanceDeclaration. Standard ModellingRulesare defined in 6.4.4.4. The Nodes within the newly created hierarchy may be copies of the InstanceDeclarations, the InstanceDeclarationitself or another Nodein the AddressSpacethat has the same TypeDefinitionNodeand BrowseName. If new copies are created, then the Attributevalues of the InstanceDeclarationsare used as the initial values. An instance shall not be a SourceNodeof a hierarchical Referencethat has the same BrowsePathas an InstanceDeclarationof its TypeDefinitionwhich has an optional or mandatory ModellingRuleexcept for the one based on the InstanceDeclaration.

Figure 22provides a simple example of a TypeDefinitionNodeand an Instance. Nodesreferenced by the TypeDefinitionNodewithout a ModellingRuledo not appear in the instance. Instancesmay have children with duplicate BrowseNames; however, only one of those children will correspond to the InstanceDeclaration.

image025.png

Figure 22– An Instance and its TypeDefinitionNode

It is up to the Serverto decide which InstanceDeclarationsappear in any single instance. In some cases, the Serverwill not define the entire instance and will provide remote references to Nodesin another Server. The ModellingRulesdescribed in 6.4.4.4allow Serversto indicate that some Nodesare always present; however, the Clientshall be prepared for the case where the Nodeexists in a different Server.

A Clientcan use the information of TypeDefinitionNodesto access Nodes which are in the hierarchy of the instance. It shall pass the NodeIdof the instance and the BrowsePathof the child Nodes based on the TypeDefinitionNodeto the TranslateBrowsePathsToNodeIdsservice (see OPC 10000-4). This Servicereturns the NodeIdfor each of the child Nodes. If a child Nodeexists then the BrowseNameand NodeClassshall match the InstanceDeclaration. In the case of Objectsor Variables,also the TypeDefinitionNodeshall either match or be a subtype of the original TypeDefinitionNode.