An InstanceDeclarationmarked with the ModellingRule Mandatorymeans that for each existing BrowsePathon the instance a similar Nodeshall exist, but it is not defined whether a new Nodeis created or an existing Nodeis referenced.

For example, the TypeDefinitionNodeof a functional block “AI_BLK_TYPE” will have a setpoint “SP1”. An instance of this type “AI_BLK_1” will have a newly-created setpoint “SP1” as a similar Node to the InstanceDeclarationSP1. Figure 26illustrates the example.

image029.png

Figure 26– Use of the Standard ModellingRule Mandatory

In 6.4.4.4.2a complex example combining the Mandatoryand Optional ModellingRulesis given.

An InstanceDeclarationmarked with the ModellingRule Optionalmeans that for each existing BrowsePathon the instance a similar Nodemay exist, but it is not defined whether a new Nodeis created or an existing Nodeis referenced.

In Figure 27an example using the ModellingRules Optionaland Mandatoryis shown. The example contains an ObjectTypeType_A and all valid combinations of instances named A1 to A13. Note that if the optional B is provided, the mandatory E has to be provided as well, otherwise not. F is referenced by C and D. On the instance, this can be the same Nodeor two different Nodeswith the same BrowseName(similar Nodeto InstanceDeclarationF). Not considered in the example is if the instances have ModellingRulesor not. It is assumed that each F is similar to the InstanceDeclarationF, etc.

If there would be a NonHierarchical Referencebetween E and F in the InstanceDeclarationHierarchy, it is not specified if it occurs in the instance hierarchy or not. In the case of A10, there could be a reference from E to one F but not to the other F, or to both or none of them.

image030.png

Figure 27– Example using the Standard ModellingRules Optional and Mandatory

The ExposesItsArray ModellingRuleexposes a special semantic on VariableTypeshaving a single- or multidimensional array as the data type. It indicates that each value of the array will also be exposed as a Variablein the AddressSpace.

The ExposesItsArray ModellingRulecan only be applied on InstanceDeclarationsof NodeClass Variablethat are part of a VariableTypehaving a single- or multidimensional array as its data type.

The VariableA having this ModellingRuleshall be referenced by a forward hierarchical Referencefrom a VariableType B. B shall have a ValueRankvalue that is equal to or larger than zero. A should have a data type that reflects at least parts of the data that is managed in the array of B. Each instance of B shall reference one instance of A for each of its array elements. The used Referenceshall be of the same type as the hierarchical Referencethat connects B with A or a subtype of it. If there are more than one forward hierarchical Referencesbetween A and B, then all instances based on B shall be referenced with all those References.

Figure 28gives an example. A is an instance of Type_A having two entries in its value array. Therefore it references two instances of the same type as the InstanceDeclarationArrayExpose. The BrowseNamesof those instances are not defined by the ModellingRule. In general, it is not possible to get a Variablerepresenting a specific entry in the array (e.g. the second). Clientswill typically either get the array or access the Variablesdirectly, so there is no need to provide that information.

image031.png

Figure 28– Example on using ExposesItsArray

It is allowed to reference A by other InstanceDeclarationsas well. Those Referenceshave to be reflected on each instance based on A.

Figure 29gives an example. The PropertyEUUnit is referenced by ArrayExpose and therefore each instance based on ArrayExpose references the instance based on the InstanceDeclarationEUUnit.

image032.png

Figure 29– Complex example on using ExposesItsArray

For Objectand Variablethe intention of the ModellingRule OptionalPlaceholderis to expose the information that a complex TypeDefinitionexpects from instances of the TypeDefinitionto add instances with specific Referenceswithout defining BrowseNamesfor the instances. For example, a Device might have a Folder for DeviceParameters, and the DeviceParameters should be connected with a HasComponent Reference. However, the names of the DeviceParameters are specific to the instances. The example is shown in Figure 30, where an instance Device A adds two DeviceParameters in the Folder.

image033.png

Figure 30– Example using OptionalPlaceholder with an Object and Variable

The ModellingRule OptionalPlaceholderadds no additional constraints on instances of the TypeDefinition. It just provides useful information when exposing a TypeDefinition. When the InstanceDeclarationis complex, i.e. it references other InstanceDeclarationswith hierarchicalReferences, these InstanceDeclarationsare not further considered for instantiating the TypeDefinition.

It is recommended that the BrowseNameand the DisplayNameof InstanceDeclarationshaving the OptionalPlaceholder ModellingRule shouldbe enclosed within angle brackets.

When overriding the InstanceDeclaration, the ModellingRuleshall remain OptionalPlaceholder.

For Methods,the ModellingRule OptionalPlaceholder is used to define the BrowseNamewhere subtypes and instances provide more information. The Method definition with the OptionalPlaceholder only defines the BrowseName. Aninstance or subtype defines the InputArgumentsand OutputArguments. A subtype shall also change the ModellingRuleto Optionalor Mandatory. The Methodis optional for instances.For example, a Device might have a Methodto perform calibration however the specific arguments for the Methoddepend on the instance of the Device. In this example Device A does not implement the Method, Device B implements the Methodwith no arguments and Device C implements the Methodaccepting a mode argument to select how the calibration is to be performed. The example is shown in Figure 31.

image034.png

Figure 31– Example using OptionalPlaceholder with a Method

For Objectand Variablethe ModellingRule MandatoryPlaceholderhas a similar intention as the ModellingRule OptionalPlaceholder. It exposes the information that a TypeDefinitionexpects of instances of the TypeDefinitionto add instances defined by the InstanceDeclaration. However, MandatoryPlaceholderrequires that at least one of those instances shall exist.

For example, when the DeviceType requires that at least one DeviceParameter shall exist without specifying the BrowseNamefor it, it uses MandatoryPlaceholderas shown in Figure 32. Device A is a valid instance as it has the required DeviceParameter. Device B is not valid as it uses the wrong ReferenceTypeto reference a DeviceParameter (Organizesinstead of HasComponent) and Device C is not valid because it does not provide a DeviceParameter at all.

image035.png

Figure 32– Example on using MandatoryPlaceholder for Object and Variable

The ModellingRule MandatoryPlaceholderrequires that each instance provides at least one instance with the TypeDefinitionof the InstanceDeclarationor a subtype, and is referenced with the same ReferenceTypeor a subtype as the InstanceDeclaration. It does not require a specific BrowseNameand thus cannot be used for the TranslateBrowsePathsToNodeIds Service(see OPC 10000-4).

When the InstanceDeclarationis complex, i.e. it references other InstanceDeclarationswith hierarchicalReferences, these InstanceDeclarationsare not further considered for instantiating the TypeDefinition.

It is recommended that the BrowseNameand the DisplayNameof InstanceDeclarationshaving the MandatoryPlaceholder ModellingRule should be enclosed within angle brackets.

When overriding the InstanceDeclaration, the ModellingRuleshall remain MandatoryPlaceholder.

For Methods,the ModellingRule MandatoryPlaceholder is used to define the BrowseNamewhere subtypes and instances provide more information. The Method definition with the MandatoryPlaceholder only defines the BrowseName. Aninstance or subtype defines the InputArgumentsand OutputArguments. A subtype shall also change the ModellingRuleto Mandatory. The Methodis mandatory for instances.