Two types of Variablesare defined, Propertiesand DataVariables. Although they differ in the way they are used as described in 4.4and have different constraints described in the remainder of 5.6they use the same NodeClassdescribed in 5.6.2. The constraints of Propertiesbased on this NodeClassare defined in 5.6.3, the constraints of DataVariables in 5.6.4.

Variablesare used to represent values which may be simple or complex. Variablesare defined by VariableTypes, as specified in 5.6.5.

Variablesare always defined as Propertiesor DataVariablesof other Nodesin the AddressSpace. They are never defined by themselves. A Variableis always part of at least one other Node, but may be related to any number of other Nodes. Variablesare defined using the Variable NodeClass, specified in Table 13.

Table 13– Variable NodeClass

Name

Use

Data Type

Description

Attributes

Base NodeClass Attributes

M

--

Inherited from the Base NodeClass. See 5.2.

Value

M

Defined by the DataType Attribute

The most recent value of the Variablethat the Serverhas. Its data type is defined by the DataType Attribute. It is the only Attributethat does not have a data type associated with it. This allows all Variablesto have a value defined by the same Value Attribute.

DataType

M

NodeId

NodeIdof the DataTypedefinition for the Value Attribute. Standard DataTypesare defined in Clause 7.23.

ValueRank

M

Int32

This Attributeindicates whether the Value Attributeof the Variableis an array and how many dimensions the array has.

It may have the following values:

n > 1: the Value is an array with the specified number of dimensions.

OneDimension (1): The value is an array with one dimension.

OneOrMoreDimensions (0): The value is an array with one or more dimensions.

Scalar (−1): The value is not an array.

Any (−2): The value can be a scalar or an array with any number of dimensions.

ScalarOrOneDimension (−3): The value can be a scalar or a one dimensional array.

All DataTypes are considered to be scalar, even if they have array-like semantics like ByteString and String.

ArrayDimensions

O

UInt32[]

This Attributespecifies the maximum supported length of each dimension. If the maximum is unknown the value shall be 0.

The number of elements shall be equal to the number of dimensions of the Value. This Attributeshall be null if theValue is not an array.

For example, if a Variableis defined by the following C array:

Int32 myArray[346];

then this Variable’s DataTypewould be set to Int32, and the Variable’s ValueRankhas the value 1. The ArrayDimensionsis an array with a length of one where the element has the value 346.

Regardless of the number of dimensions, the maximum number of elements of an array transferred on the wire is 2147483647 (max Int32).

AccessLevel

M

AccessLevelType

The AccessLevel Attributeis used to indicate how the Valueof a Variablecan be accessed (read/write) and if it contains current and/or historic data. The AccessLeveldoes not take any user access rights into account, i.e. although the Variableis writable this may be restricted to a certain user / user group.

The AccessLevelType is defined in 8.57.

UserAccessLevel

M

AccessLevelType

The UserAccessLevel Attributeis used to indicate how the Valueof a Variablecan be accessed (read/write) and if it contains current or historic data taking user access rights into account.

The AccessLevelType is defined in 8.57.

MinimumSamplingInterval

O

Duration

The MinimumSamplingInterval Attributeindicates how “current” the Valueof the Variablewill be kept. It specifies (in milliseconds) how fast the Servercan reasonably sample the value for changes (see OPC 10000-4for a detailed description of sampling interval).

A MinimumSamplingIntervalof 0 indicates that the Serveris to monitor the item continuously. A MinimumSamplingIntervalof −1means indeterminate.

Historizing

M

Boolean

The Historizing Attributeindicates whether the Serveris actively collecting data for the history of the Variable. This differs from the AccessLevel Attributewhich identifies if the Variablehas any historical data. A value of TRUE indicates that the Serveris actively collecting data. A value of FALSE indicates the Serveris not actively collecting data. Default value is FALSE.

AccessLevelEx

O

AccessLevelExType

The AccessLevelEx Attributeis used to indicate how the Valueof a Variablecan be accessed (read/write), if it contains current and/or historic data and its atomicity. The AccessLevelExdoes not take any user access rights into account, i.e. although the Variableis writable this may be restricted to a certain user / user group. The AccessLevelExis an extended version of the AccessLevel attribute and as such contains the 8 bits of the AccessLevel attribute as the first 8 bits.

The AccessLevelExis a 32-bit unsigned integer with the structure defined in the 8.58.

If this Attribute is not provided the information provided by these additional Fields is unknown.

References

HasModellingRule

0..1

Variablescan point to at most one ModellingRule Objectusing a HasModellingRule Reference(see 6.4.4for details on ModellingRules).

HasProperty

0..*

HasProperty Referencesare used to identify the Propertiesof a DataVariable.

Propertiesare not allowed to be the SourceNodeof HasProperty References.

HasComponent

0..*

HasComponent Referencesare used by complex DataVariablesto identify their composed DataVariables.

Propertiesare not allowed to use this Reference.

HasTypeDefinition

1

TheHasTypeDefinition Reference points to the type definition of the Variable. Each Variableshall have exactly one type definition and therefore be the SourceNodeof exactly one HasTypeDefinition Referencepointing to a VariableType. See 4.5for a description of type definitions.

<other References>

0..*

Data Variablesmay be the SourceNodeof any other References.

Propertiesmay only be the SourceNodeof any NonHierarchical Reference.

Standard Properties

NodeVersion

O

String

The NodeVersion Propertyis used to indicate the version of a DataVariable. It does not apply to Properties.

The NodeVersion Propertyis updated each time a Referenceis added or deleted to the Nodethe Propertybelongs to. Attributevalue changes except for the DataType, ValueRank andArrayDimensions Attributesdo not cause the NodeVersionto change. Clientsmay read the NodeVersion Propertyor subscribe to it to determine when the structure of a Nodehas changed.

Although the relationship of a Variableto its DataType, ValueRank and ArrayDimensionsis not modelled using References, changes to the DataType, ValueRank orArrayDimensions Attributesof a Variablelead to an update of the NodeVersion Property.

LocalTime

O

TimeZoneDataType

The LocalTime Propertyis only used for DataVariables. It does not apply to Properties.

This Propertyis a structure containing the Offset and the DaylightSavingInOffset flag. The Offset specifies the time difference (in minutes) between the SourceTimestamp (UTC) associated with the value and the time at the location in which the value was obtained. The SourceTimestamp is defined in OPC 10000-4.

If DaylightSavingInOffset is TRUE, then Standard/Daylight savings time (DST) at the originating location is in effect and Offset includes the DST correction. If FALSE then the Offset does not include DST correction and DST may or may not have been in effect.

AllowNulls

O

Boolean

The AllowNulls Propertyis only used for DataVariables. It does not apply to Properties.

This Propertyspecifies if a null value is allowed for the Value Attributeof the DataVariable. If it is set to TRUE, the Servermay return null values and accept writing of null values. If it is set to FALSE, the Servershall never return a null value and shall reject any request writing a null value.

If this Propertyis not provided, it is Server-specific if null values are allowed or not.

ValueAsText

O

LocalizedText

It is used for DataVariableswith a finite set of LocalizedTextsassociated with its value. For example any DataVariableshaving an Enumeration DataType.

This optional Propertyprovides the localized text representation of the value. It can be used by Clientsonly interested in displaying the text to subscribe to the Propertyinstead of the value attribute.

MaxStringLength

O

UInt32

Only used for DataVariableshaving a String DataTypeor a LocalizedText DataType (the text field).

This optional Propertyindicates the maximum number of bytes supported by the DataVariable.

MaxCharacters

O

UInt32

Only used for DataVariableshaving a String DataTypeor a LocalizedText DataType (the text field)

This optional Propertyindicates the maximum number of Unicode characters supported by the DataVariable.

MaxByteStringLength

O

UInt32

Only used for DataVariableshaving a ByteString DataType.

This optional Propertyindicates the maximum number of bytes supported by the DataVariable.

MaxArrayLength

O

UInt32

Only used for DataVariableshaving its ValueRank Attributenot set to scalar.

This optional Propertyindicates the maximum length of an array supported by the DataVariable. In a multidimensional array it indicates the overall length. For example, a three-dimensional array of 2 x 3 x 10 has the array length of 60.

NOTE In order to expose the length of an array of bytes do not use the DataType ByteStringbut an array of the DataType Byte. In that case the MaxArrayLengthapplies.

EngineeringUnits

O

EUInformation

Only used for DataVariableshaving a Number DataType (or a subtype of Number) or a Structure DataType where each field has a DataType ofNumber (or a subtype of Number) andall share the sameEngineeringUnit.

This optional Propertyindicates the engineering units for the value of the DataVariable (e.g. hertz or seconds). Details about the Propertyand what engineering units should be used are defined in OPC 10000-8. The DataType EUInformationis also defined in OPC 10000-8.

CurrencyUnit

O

CurrencyUnitType

Only used for DataVariableshaving a subtype of Number DataType.

Its contents are based on ISO 4217.

See https://www.iso.org/iso-4217-currency-codes.html

The Variable NodeClassinherits the base Attributesfrom the Base NodeClassdefined in 5.2.

The Variable NodeClassalso defines a set of Attributesthat describe the Variable’sRuntime value. The Value Attributerepresents the Variablevalue. The DataType, ValueRankand ArrayDimensions Attributesprovide the capability to describe simple and complex values.

The AccessLevel Attributeindicates the accessibility of the Valueof a Variablenot taking user access rights into account. If the OPC UA Serverdoes not have the ability to get the AccessLevelinformation from the underlying system then it should state that it is readable and writable. If a read or write operation is called on the Variablethen the Servershould transfer this request and return the corresponding StatusCodeeven if such a request is rejected. StatusCodesare defined in OPC 10000-4.

The SemanticChangeflag of the AccessLevel Attributeis used for Propertiesthat may change and define semantic aspects of the parent Node. For example, the EngineeringUnits Propertydescribes the semantic of a DataVariable, whereas the Icon Propertydoes not. In this example, if the EngineeringUnits Propertymay change while the Server is running, the SemanticChangeflag shall be set for it.

Serversthat support Event Subscriptionsshall generate a SemanticChangeEvent whenever a Propertywith SemanticChangeflag set changes.

If a Variablehaving a Propertywith SemanticChangeflag set is used in a Subscriptionand the Propertyvalue changes, then the SemanticsChangedbit of the StatusCodeshall be set as defined in OPC 10000-4. Clientssubscribing to a Variableshould look at the StatusCodeto identify if the semantic has changed and retrieve the relevant Propertiesbefore processing the value returned from the Subscription.

The UserAccessLevel Attributeindicates the accessibility of the Valueof a Variabletaking user access rights into account. If the OPC UA Serverdoes not have the ability to get any user access rights related information from the underlying system then it should use the same bit mask as used in the AccessLevel Attribute. The UserAccessLevel Attributecan restrict the accessibility indicated by the AccessLevel Attribute, but not exceed it. Clientsshould not assume access rights based on the UserAccessLevel Attribute. For example it is possible that the Serverreturns an error due to some server specific change which was not reflected in the state of this Attributeat the time the Clientaccessed the Variable.

The MinimumSamplingInterval Attributespecifies how fast the Servercan reasonably sample the valuefor changes. The accuracy of this value (the ability of the Serverto attain “best case” performance) can be greatly affected by system load and other factors.

The Historizing Attributeindicates whether the Serveris actively collecting data for the history of the Variable. See OPC 10000-11for details on historizing Variables.

Clientsmay read or write Variablevalues, or monitor them for value changes, as specified in OPC 10000-4. OPC 10000-8defines additional rules when using the Servicesfor automation data.

To specify its ModellingRule, a Variablecan use at most one HasModellingRule Referencepointing to a ModellingRule Object. ModellingRulesare defined in 6.4.4.

If the Variableis created based on an InstanceDeclaration(see 4.5) it shall have the same BrowseNameas its InstanceDeclaration.

The other Referencesare described separately for Propertiesand DataVariablesin the remainder of 5.6.

Propertiesare used to define the characteristics of Nodes. Propertiesare defined using the Variable NodeClass, specified in Table 13. However, they restrict their use.

Propertiesare the leaf of any hierarchy; therefore they shall not be the SourceNodeof any hierarchical References. This includes the HasComponentor HasProperty Reference, that is, Properties do not contain Propertiesand cannot expose their complex structure. However, they may be the SourceNodeof any NonHierarchical References.

The HasTypeDefinition Referencepoints to the VariableTypeof the Property. Since Propertiesare uniquely identified by their BrowseName, all Propertiesshall point to the PropertyType defined in OPC 10000-5.

Propertiesshall always be defined in the context of another Nodeand shall be the TargetNodeof at least one HasProperty Reference. To distinguish them from DataVariables, they shall not be the TargetNodeof any HasComponent Reference. Thus, a HasProperty Referencepointing to a Variable Nodedefines this Nodeas a Property.

The BrowseNameof a Propertyis always unique in the context of a Node. It is not permitted for a Nodeto refer to two Variablesusing HasProperty Referenceshaving the same BrowseName.

DataVariablesrepresent the content of an Object. DataVariablesare defined using the Variable NodeClass, specified in Table 13.

DataVariables identify their Propertiesusing HasProperty References. Complex DataVariablesuse HasComponent Referencesto expose their component DataVariables.

The Property NodeVersionindicates the version of the DataVariable.

The Property LocalTimeindicates the difference between the SourceTimestamp of the value and the standard time at the location in which the value was obtained.

The Property AllowNullsindicates if null values are allowed for the Value Attribute.

The Property ValueAsTextprovides a localized text representation for enumeration values.

The Property MaxStringLengthindicates the maximum number of bytes of a Stringor the textfield of a LocalizedTextvalue. If a Serverdoes not impose a maximum number of bytes or is not able to determine the maximum number of bytes this Propertyshall not be provided. If this Propertyis provided, then the MaxCharacters Propertyshall not be provided.

The Property MaxCharactersindicates the maximum number of Unicode characters of a Stringor the textfield of a LocalizedTextvalue. If a Serverdoes not impose a maximum number of Unicode characters or is not able to determine the maximum number of Unicode characters this Propertyshall not be provided. If this Propertyis provided then the MaxStringLength Propertyshall not be provided.

The Property MaxByteStringLengthindicates the maximum number of bytes of a ByteStringvalue. If a Serverdoes not impose a maximum number of bytes or is not able to determine the maximum number of bytes this Propertyshall not be provided.

The Property MaxArrayLengthindicates the maximum allowed array length of the value.

The Property EngineeringUnitsindicates the engineering units of the value. There are no additional Propertiesdefined for DataVariablesin this part of this document. Additional parts of this series of standards may define additional Propertiesfor DataVariables. OPC 10000-8defines a set of Propertiesthat can be used for DataVariables.

The Property CurrencyUnitrepresents the currency of the value. The information in the structure is designed to be suited for human users and for automated systems.

DataVariablesmay use additional Referencesto define relationships to other Nodes. No restrictions are placed on the types of Referencesused or on the NodeClassesof the Nodesthat may be referenced. However, restrictions may be defined by the ReferenceTypeexcluding its use for DataVariables. Standard ReferenceTypesare described in Clause 7.

A DataVariableis intended to be defined in the context of an Object. However, complex DataVariablesmay expose other DataVariables, and ObjectTypesand complex VariableTypesmay also contain DataVariables. Therefore each DataVariableshall be the TargetNodeof at least one HasComponent Referencecoming from an Object, an ObjectType, a DataVariableor a VariableType. DataVariablesshall not be the TargetNodeof any HasProperty References. Therefore, a HasComponent Referencepointing to a Variable Nodeidentifies it as a DataVariable.

The HasTypeDefinition Referencepoints to the VariableTypeused as type definition of the DataVariable.

If the DataVariable is used as InstanceDeclaration(see 4.5) all Nodesreferenced with forward hierarchical Referencesshall have unique BrowseNamesin the context of this DataVariable.

VariableTypesare used to provide type definitions for Variables. VariableTypesare defined using the VariableType NodeClass, as specified in Table 14.

Table 14– VariableType NodeClass

Name

Use

Data Type

Description

Attributes

Base NodeClass Attributes

M

--

Inherited from the Base NodeClass. See 5.2

Value

O

Defined by the DataType attribute

The default Valuefor instances of this type.

DataType

M

NodeId

NodeIdof the data type definition for instances of this type.

ValueRank

M

Int32

This Attributeindicates whether the Value Attributeof the VariableTypeis an array and how many dimensions the array has.

It may have the following values:

n > 1: the Value is an array with the specified number of dimensions.

OneDimension (1): The value is an array with one dimension.

OneOrMoreDimensions (0): The value is an array with one or more dimensions.

Scalar (−1): The value is not an array.

Any (−2): The value can be a scalar or an array with any number of dimensions.

ScalarOrOneDimension (−3): The value can be a scalar or a one dimensional array.

NOTE All DataTypes are considered to be scalar, even if they have array-like semantics like ByteString and String.

ArrayDimensions

O

UInt32[]

This Attributespecifies the length of each dimension for an array value. The Attribute specifies the maximum supported length of each dimension. If the maximum is unknown the value is 0.

The number of elements shall be equal to the value of the ValueRank Attribute. This Attributeshall be null if ValueRank≤ 0.

For example, if a VariableTypeis defined by the following C array:

Int32 myArray[346];

then this VariableType’s DataTypewould point to an Int32, the VariableType’s ValueRankhas the value 1 and the ArrayDimensionsis an array with one entry having the value 346.

IsAbstract

M

Boolean

A boolean Attributewith the following values:

TRUEit is an abstract VariableType, i.e. no Variableof this type shall exist, only of its subtypes.

FALSEit is not an abstract VariableType, i.e. Variablesof this type can exist.

References

HasProperty

0..*

HasProperty Referencesare used to identify the Propertiesof the VariableType. The referenced Nodesmay be instantiated by the instances of this type, depending on the ModellingRulesdefined in 6.4.4.

HasComponent

0..*

HasComponent Referencesare used for complex VariableTypesto identify their containing DataVariables. Complex VariableTypescan only be used for DataVariables. The referenced Nodesmay be instantiated by the instances of this type, depending on the ModellingRulesdefined in 6.4.4.

HasSubtype

0..*

HasSubtype Referencesidentify VariableTypesthat are subtypes of this type. The inverse Referenceidentifies the parent type of this type.

GeneratesEvent

0..*

GeneratesEvent Referencesidentify the type of Eventsinstances of this type may generate.

<other References>

0..*

VariableTypesmay contain other Referencesthat can be instantiated by Variablesdefined by this VariableType. ModellingRulesare defined in 6.4.4.

Standard Properties

NodeVersion

O

String

The NodeVersion Propertyis used to indicate the version of a Node.

The NodeVersion Propertyis updated each time a Referenceis added or deleted to the Nodethe Propertybelongs to. Attributevalue changes except for the DataType, ValueRank andArrayDimensions Attributesdo not cause the NodeVersionto change. Clientsmay read the NodeVersion Propertyor subscribe to it to determine when the structure of a Nodehas changed.

Although the relationship of a VariableTypeto its DataType, ValueRank and ArrayDimensionsis not modelled using References, changes to the DataType, ValueRank or ArrayDimensions Attributesof a VariableTypelead to an update of the NodeVersion Property.

The VariableType NodeClassinherits the base Attributesfrom the Base NodeClassdefined in 5.2. The VariableType NodeClassalso defines a set of Attributesthat describe the default or initial value of its instance Variables. The Value Attributerepresents the default value. The DataType, ValueRankand ArrayDimensions Attributesprovide the capability to describe simple and complex values. The IsAbstract Attributedefines if the type can be directly instantiated.

The VariableType NodeClassuses HasProperty Referencesto define the Propertiesand HasComponent Referencesto define DataVariables. Whether they are instantiated depends on the ModellingRulesdefined in 6.4.4.

The Property NodeVersionindicates the version of the VariableType. There are no additional Propertiesdefined for VariableTypes in this document. Additional parts of this series of standards may define additional Propertiesfor VariableTypes. OPC 10000-8defines a set of Propertiesthat can be used for VariableTypes.

HasSubtype Referencesare used to subtype VariableTypes. VariableTypesubtypes inherit the general semantics from the parent type. The general rules for subtyping are defined in Clause 6. It is not required to provide the HasSubtype Referencefor the supertype, but it is required that the subtype provides the inverse Referenceto its supertype.

GeneratesEvent Referencesidentify that Variables of the VariableTypemay be the source of an Eventof the specified EventTypeor one of its subtypes. Serversshould make GeneratesEvent Referencesbidirectional References. However, it is allowed to be unidirectional when the Serveris not able to expose the inverse direction pointing from the EventTypeto each VariableTypesupporting the EventType.

GeneratesEvent Referencesare optional, i.e. Variablesmay generate Eventsof an EventTypethat is not exposed by its VariableType.

VariableTypesmay use any additional Referencesto define relationships to other Nodes. No restrictions are placed on the types of Referencesused or on the NodeClassesof the Nodesthat may be referenced. However, restrictions may be defined by the ReferenceTypeexcluding its use for VariableTypes. Standard ReferenceTypesare described in Clause 7.

All Nodesreferenced with forward hierarchical Referencesshall have unique BrowseNamesin the context of the VariableType (see 4.5).

Variablesare always based on a VariableType, i.e. they have a HasTypeDefinition Referencepointing to its VariableType.

Clientscan create Variablesusing the AddNodes Servicedefined in OPC 10000-4. The Servicerequires specifying the TypeDefinitionNodeof the Variable. A Variablecreated by the AddNodes Servicecontains all components defined by its VariableTypedependent on the ModellingRulesspecified for the components. However, the Servermay add additional components and Referencesto the Variableand its components that are not defined by the VariableType. This behaviour is Serverdependent. The VariableTypeonly specifies the minimum set of components that shall exist for each Variableof a VariableType.