The DataAccess model extends the variable model by defining VariableTypes. The DataItemTypeis the base type. ArrayItemType, AnalogItemTypeand DiscreteItemType(and its TwoStateand MultiStatesubtypes) are specializations. See Figure 2. Each of these VariableTypescan be further extended to form domain or server specific DataItems.
Figure 2– DataItem VariableTypehierarchy
The StatusCodealso contains an informational bit called SemanticsChanged.
Serversthat implement Data Access shall set this Bit in notifications if certain Propertiesdefined in this standard change. The corresponding Propertiesare specified individually for each VariableType.
Clientsthat use any of these Propertiesshould re-read them before they process the data value.
This VariableTypedefines the general characteristics of a DataItem. All other DataItemTypes derive from it. The DataItemTypederives from the BaseDataVariableTypeand therefore shares the variable model as described in OPC 10000-3and OPC 10000-5. It is formally defined in Table 1.
Table 1– DataItemType definition
Attribute |
Value |
||||
BrowseName |
DataItemType |
||||
IsAbstract |
False |
||||
ValueRank |
−2 (−2 = ‘Any’) |
||||
DataType |
BaseDataType |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
Subtype of the BaseDataVariableTypedefined in OPC 10000-5; i.e the Propertiesof that type are inherited. |
|||||
HasSubtype |
VariableType |
AnalogItemType |
Defined in 0 |
||
HasSubtype |
VariableType |
DiscreteItemType |
Defined in 5.3.3 |
||
HasSubtype |
VariableType |
ArrayItemType |
Defined in 5.3.4 |
||
HasProperty |
Variable |
Definition |
String |
PropertyType |
Optional |
HasProperty |
Variable |
ValuePrecision |
Double |
PropertyType |
Optional |
Definition is a vendor-specific, human readable string that specifies how the value of this DataItemis calculated. Definitionis non-localized and will often contain an equation that can be parsed by certain clients.
Example: Definition::= “(TempA – 25) + TempB”
ValuePrecision specifies the maximum precision that the Servercan maintain for the item based on restrictions in the target environment.
ValuePrecision can be used for the following DataTypes:
- For Float and Double values it specifies the number of digits after the decimal place.
- For DateTime values it indicates the minimum time difference in nanoseconds. For example, a ValuePrecision of 20 000 000 defines a precision of 20 ms.
The ValuePrecision Propertyis an approximation that is intended to provide guidance to a Client. A Serveris expected to silently round any value with more precision that it supports. This implies that a Clientmay encounter cases where the value read back from a Serverdiffers from the value that it wrote to the Server. This difference shall be no more than the difference suggested by this Property.
This VariableTypedefines the general characteristics of an AnalogItem. All other AnalogItemTypes derive from it. The AnalogItemTypederives from the DataItemType. It is formally defined in Table 2.
Table 2– AnalogItemTypedefinition
Attribute |
Value |
||||
BrowseName |
AnalogItemType |
||||
IsAbstract |
False |
||||
ValueRank |
−2 (−2 = ‘Any’) |
||||
DataType |
Number |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
Subtype of the DataItemTypedefined in 5.3.1i.e the Propertiesof that type are inherited. |
|||||
HasProperty |
Variable |
InstrumentRange |
Range |
PropertyType |
Optional |
HasProperty |
Variable |
EURange |
Range |
PropertyType |
Mandatory |
HasProperty |
Variable |
EngineeringUnits |
EUInformation |
PropertyType |
Optional |
The following paragraphs describe the Propertiesof this VariableType. If the analog item’s Valuecontains an array, the Propertiesshall apply to all elements in the array.
InstrumentRange defines the value range that can be returned by the instrument.
Example:InstrumentRange::= {-9999.9, 9999.9}
Although defined as optional, it is strongly recommended for Serversto support this Property. Without an InstrumentRangebeing provided, Clientswill commonly assume the full range according to the DataType.
The Range Data Typeis specified in 5.6.2.
EURangedefines the value range likely to be obtained in normal operation. It is intended for such use as automatically scaling a bar graph display.
Sensor or instrument failure or deactivation can result in a returned item value which is actually outside of this range. Clientsoftware must be prepared to deal with this possibility. Similarly a Clientmay attempt to write a value that is outside of this range back to the server. The exact behaviour (accept, reject, clamp, etc.) in this case is Server-dependent. However, in general Serversshall be prepared to handle this.
Example: EURange::= {-200.0,1400.0}
See also 6.2for a special monitoring filter (PercentDeadband) which is based on the engineering unit range.
EngineeringUnits specifies the units for theDataItem’s value (e.g., DEGC, hertz, seconds). The EUInformationtype is specified in 5.6.3.
Important note:Understanding the units of a measurement value is essential for a uniform system. In an open system in particular where servers from different cultures might be used, it is essential to know what the units of measurement are. Based on such knowledge, values can be converted if necessary before being used. Therefore, although defined as optional, support of the EngineeringUnits Property is strongly advised.
OPC UA recommends using the “Codes for Units of Measurement”(see UN/CEFACT: UNECE Recommendation N° 20). The mapping to the EngineeringUnits Property is specified in 5.6.3.
Examples for unit mixup: In 1999, the Mars Climate Orbiter crashed into the surface of Mars. The main reason was a discrepancy over the units used. The navigation software expected data in newton second; the company who built the orbiter provided data in pound-force seconds. Another, less expensive, disappointment occurs when people used to British pints order a pint in the USA, only to be served what they consider a short measure.
The StatusCode SemanticsChangedbit shall be set if any of the EURange(could change the behaviour of a Subscriptionif a PercentDeadbandfilter is used) or EngineeringUnits(could create problems if the client uses the value to perform calculations) Propertiesare changed (see section 5.2for additional information).
This VariableType is an abstract type. That is, no instances of this type can exist. However, it might be used in a filter when browsing or querying. The DiscreteItemTypederives from the DataItemTypeand therefore shares all of its characteristics. It is formally defined in Table 3.
Table 3– DiscreteItemType definition
Attribute |
Value |
||||
BrowseName |
DiscreteItemType |
||||
IsAbstract |
True |
||||
ValueRank |
−2 (−2 = ‘Any’) |
||||
DataType |
BaseDataType |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
Subtype of the DataItemTypedefined in 5.2; i.e the Propertiesof that type are inherited. |
|||||
HasSubtype |
VariableType |
TwoStateDiscreteType |
Defined in 5.3.3.2 |
||
HasSubtype |
VariableType |
MultiStateDiscreteType |
Defined in 5.3.3.3 |
||
HasSubtype |
VariableType |
MultiStateValueDiscreteType |
Defined in 5.3.3.4 |
This VariableTypedefines the general characteristics of a DiscreteItemthat can have two states. The TwoStateDiscreteTypederives from the DiscreteItemType. It is formally defined in Table 4.
Table 4– TwoStateDiscreteType definition
Attribute |
Value |
||||
BrowseName |
TwoStateDiscreteType |
||||
IsAbstract |
False |
||||
ValueRank |
−2 (−2 = ‘Any’) |
||||
DataType |
Boolean |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
Subtype of the DiscreteItemTypedefined in 5.3.3; i.e the Propertiesof that type are inherited. |
|||||
HasProperty |
Variable |
TrueState |
LocalizedText |
PropertyType |
Mandatory |
HasProperty |
Variable |
FalseState |
LocalizedText |
PropertyType |
Mandatory |
TrueStatecontains a string to be associated with this DataItemwhen it is TRUE. This is typically used for a contact when it is in the closed (non-zero) state.
for example: "RUN", "CLOSE", "ENABLE", "SAFE“, etc.
FalseStatecontains a string to be associated with this DataItemwhen it is FALSE. This is typically used for a contact when it is in the open (zero) state.
for example: "STOP", "OPEN", "DISABLE", "UNSAFE“, etc.
If the item contains an array, then the Propertieswill apply to all elements in the array.
The StatusCode SemanticsChangedbit shall be set if any of the FalseState or TrueState (changes can cause misinterpretation by users or (scripting) programs) Propertiesare changed (see section 5.2for additional information).
This VariableTypedefines the general characteristics of a DiscreteItemthat can have more than two states. The MultiStateDiscreteTypederives from the DiscreteItemType. It is formally defined in Table 5.
Table 5– MultiStateDiscreteType definition
Attribute |
Value |
||||
BrowseName |
MultiStateDiscreteType |
||||
IsAbstract |
False |
||||
ValueRank |
−2 (−2 = ‘Any’) |
||||
DataType |
UInteger |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
Subtype of the DiscreteItemTypedefined in 5.3.3; i.e the Propertiesof that type are inherited. |
|||||
HasProperty |
Variable |
EnumStrings |
LocalizedText[] |
PropertyType |
Mandatory |
EnumStringsis a string lookup table corresponding to sequential numeric values (0, 1, 2, etc.)
Example:
”OPEN”
”CLOSE”
”IN TRANSIT” etc.
Here the string “OPEN” corresponds to 0, “CLOSE” to 1 and “IN TRANSIT” to 2.
Clients should be prepared to handle item values outside of the range of the list; and robust servers should be prepared to handle writes of illegal values.
If the item contains an array then this lookup table shall apply to all elements in the array.
NOTE The EnumStringsproperty is also used for Enumeration DataTypes (for the specification of this DataType, see OPC 10000-3).
The StatusCode SemanticsChangedbit shall be set if the EnumStrings (changes can cause misinterpretation by users or (scripting) programs) Propertyis changed (see section 5.2for additional information).
This VariableTypedefines the general characteristics of a DiscreteItemthat can have more than two states and where the state values (the enumeration) does not consist of consecutive numeric values (may have gaps) or where the enumeration is not zero-based. The MultiStateValueDiscreteTypederives from the DiscreteItemType. It is formally defined in Table 6.
Table 6– MultiStateValueDiscreteType definition
Attribute |
Value |
||||
BrowseName |
MultiStateValueDiscreteType |
||||
IsAbstract |
False |
||||
ValueRank |
Scalar |
||||
DataType |
Number |
||||
References |
NodeClass |
BrowseName |
DataType TypeDefinition |
ModellingRule |
|
Subtype of the DiscreteItemTypedefined in 5.3.3; i.e the Propertiesof that type are inherited. |
|||||
HasProperty |
Variable |
EnumValues |
See OPC 10000-3 |
Mandatory |
|
HasProperty |
Variable |
ValueAsText |
See OPC 10000-3 |
Mandatory |
EnumValuesis an array of EnumValueType. Each entry of the array represents one enumeration value with its integer notation, a human-readable representation, and help information. This represents enumerations with integers that are not zero-based or have gaps (e.g. 1, 2, 4, 8, 16). See OPC 10000-3for the definition of this type. MultiStateValueDiscrete Variablesexpose the current integer notation in their Value Attribute. Clientswill often read the EnumValues Propertyin advance and cache it to lookup a name or help whenever they receive the numeric representation.
MultiStateValueDiscrete Variablescan have any numeric Data Type; this includes signed and unsigned integers from 8 to 64 Bit length.
The numeric representation of the current enumeration value is provided via the Value Attributeof the MultiStateValueDiscrete Variable. The ValueAsText Propertyprovides the localized text representation of the enumeration value. It can be used by Clientsonly interested in displaying the text to subscribe to the Propertyinstead of the Value Attribute.
This abstract VariableTypedefines the general characteristics of an ArrayItem. Values are exposed in an array but the content of the array represents a single entity like an image. Other DataItemsmight contain arrays that represent for example several values of several temperature sensors of a boiler.
ArrayItemTypeor its subtype shall only be used when the Titleand AxisScaleType Propertiescan be filled with reasonable values. If this is not the case DataItemTypeand subtypes like AnalogItemType,which also support arrays, shall be used. The ArrayItemTypeis formally defined in Table 7.
Table 7– ArrayItemType definition
Attribute |
Value |
||||
BrowseName |
ArrayItemType |
||||
IsAbstract |
True |
||||
ValueRank |
0 (0 = OneOrMoreDimensions) |
||||
DataType |
BaseDataType |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
Subtype of the DataItemTypedefined in 5.3.1; i.e the Propertiesof that type are inherited. |
|||||
HasSubtype |
VariableType |
YArrayItemType |
Defined in 5.3.4.2 |
||
HasSubtype |
VariableType |
XYArrayItemType |
Defined in 5.3.4.3 |
||
HasSubtype |
VariableType |
ImageItemType |
Defined in 5.3.4.4 |
||
HasSubtype |
VariableType |
CubeItemType |
Defined in 5.3.4.5 |
||
HasSubtype |
VariableType |
NDimensionArrayItemType |
Defined in 5.3.4.6 |
||
HasProperty |
Variable |
InstrumentRange |
Range |
PropertyType |
Optional |
HasProperty |
Variable |
EURange |
Range |
PropertyType |
Mandatory |
HasProperty |
Variable |
EngineeringUnits |
EUInformation |
PropertyType |
Mandatory |
HasProperty |
Variable |
Title |
LocalizedText |
PropertyType |
Mandatory |
HasProperty |
Variable |
AxisScaleType |
AxisScaleEnumeration |
PropertyType |
Mandatory |
InstrumentRange defines the range of the Valueof the ArrayItem.
EURangedefines the value range of the ArrayItem likely to be obtained in normal operation. It is intended for such use as automatically scaling a bar graph display.
EngineeringUnitsholds the information about the engineering units of the Valueof the ArrayItem.
For additional information about InstrumentRange, EURange, and EngineeringUnitssee the description of AnalogItemTypein 0.
Title holds the user readable title of the Valueof the ArrayItem.
AxisScaleType defines the scale to be used for the axis where the Valueof the ArrayItemshall be displayed.
The StatusCode SemanticsChangedbit shall be set if any of the InstrumentRange, EURange, EngineeringUnitsor Title Propertiesare changed (see 5.2for additional information).
YArrayItemTyperepresents a single-dimensional array of numerical values used to represent spectra or distributions where the x axis intervals are constant. YArrayItemTypeis formally defined in Table 8.
Table 8– YArrayItemType definition
Attribute |
Value |
||||
BrowseName |
YArrayItemType |
||||
IsAbstract |
False |
||||
ValueRank |
1 |
||||
DataType |
BaseDataType |
||||
ArrayDimensions |
{0} (0 = UnknownSize) |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
Subtype of the ArrayItemType defined in 5.3.4.1 |
|||||
|
|
|
|
|
|
HasProperty |
Variable |
XAxisDefinition |
AxisInformation |
PropertyType |
Mandatory |
The Valueof the YArrayItemcontains the numerical values for the Y-Axis. Engineering Unitsand Rangefor the Valueare defined by corresponding Propertiesinherited from the ArrayItemType.
The DataTypeof this VariableTypeis restricted to SByte, Int16, Int32, Int64, Float, Double, ComplexNumberTypeand DoubleComplexNumberType.
The XAxisDefinition Propertyholds the information about the Engineering Unitsand Rangefor the X-Axis.
The StatusCode SemanticsChangedbit shall be set if any of the following five Propertiesare changed: InstrumentRange, EURange, EngineeringUnits, Title orXAxisDefinition(see 5.2for additional information).
Figure 3shows an example of how Attributesand Propertiesmay be used in a graphical interface.
Figure 3– Graphical view of a YArrayItem
Table 9describes the values of each element presented in Figure 3.
Table 9– YArrayItemitem description
Attribute / Property |
Item value |
Description |
Magnitude Response (dB) |
axisScaleType |
AxisScaleEnumeration.LINEAR_0 |
InstrumentRange.low |
-90 |
InstrumentRange.high |
5 |
EURange.low |
-90 |
EURange.high |
2 |
EngineeringUnits.namespaceUrl |
|
EngineeringUnits.unitId |
2N |
EngineeringUnits.displayName |
“en-us”, “dB” |
EngineeringUnits.description |
“en-us”, “decibel” |
Title |
Magnitude |
XAxisDefinition.EngineeringUnits.namespaceUrl |
|
XAxisDefinition.EngineeringUnits.unitId |
kHz |
XAxisDefinition.EngineeringUnits.displayName |
“en-us”, “kHz” |
XAxisDefinition.EngineeringUnits.description |
“en-us”, “kilohertz” |
XAxisDefinition.Range.low |
0 |
XAxisDefinition.Range.high |
25 |
XAxisDefinition.title |
“en-us”, “Frequency” |
XAxisDefinition.axisScaleType |
AxisScaleEnumeration.LINEAR_0 |
XAxisDefinition.axisSteps |
null |
Interpretation notes:
- Not all elements of this table are used in the graphic.
- The X axis is displayed in reverse order, however, the XAxisDefinition.Range.lowshall be lower than XAxisDefinition.Range.high. It is only a graphical representation that reverses the display order.
- There is a constant X axis
XYArrayItemTyperepresents a vector of XVType values like a list of peaks, where XVType.x is the position of the peak and XVType.value is its intensity. XYArrayItemTypeis formally defined in Table 10.
Table 10– XYArrayItemType definition
Attribute |
Value |
|||||
BrowseName |
XYArrayItemType |
|||||
IsAbstract |
False |
|||||
ValueRank |
1 |
|||||
DataType |
XVType (defined in 5.6.8) |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
|
Subtype of the ArrayItemType defined in 5.3.4.1 |
||||||
|
|
|
|
|
|
|
HasProperty |
Variable |
XAxisDefinition |
AxisInformation |
PropertyType |
Mandatory |
The Valueof the XYArrayItemcontains an array of structures (XVType) where each structure specifies the position for the X-Axis (XVType.x) and the value itself (XVType.value), used for the Y-Axis. Engineering units and range for the Valueare defined by corresponding Propertiesinherited from the ArrayItemType.
XAxisDefinition Propertyholds the information about the Engineering Unitsand Rangefor the X-Axis.
The axisSteps of XAxisDefinitionshall be set to NULL because it is not used.
The StatusCode SemanticsChangedbit shall be set if any of the InstrumentRange, EURange, EngineeringUnits, Title orXAxisDefinition Propertiesare changed (see 5.2for additional information).
ImageItemTypedefines the general characteristics of an ImageItem which represents a matrix of values like an image, where the pixel position is given by X which is the column and Y the row. The value is the pixel intensity.
ImageItemTypeis formally defined in Table 11.
Table 11– ImageItemType definition
Attribute |
Value |
||||
BrowseName |
ImageItemType |
||||
IsAbstract |
False |
||||
ValueRank |
2 (2 = two dimensional array) |
||||
DataType |
BaseDataType |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
Subtype of the ArrayItemType defined in 5.3.4.1 |
|||||
|
|
|
|
|
|
HasProperty |
Variable |
XAxisDefinition |
PropertyType |
Mandatory |
|
HasProperty |
Variable |
YAxisDefinition |
PropertyType |
Mandatory |
Engineering units and range for the Valueare defined by corresponding Propertiesinherited from the ArrayItemType.
The DataTypeof this VariableTypeis restricted to SByte, Int16, Int32, Int64, Float, Double, ComplexNumberType and DoubleComplexNumberType.
The ArrayDimensions Attributefor Variablesof this type or subtypes shall use the first entry in the array ([0]) to define the number of columns and the second entry ([1]) to define the number of rows, assuming the size of the matrix is not dynamic.
XAxisDefinition Propertyholds the information about the engineering units and range for the X-Axis.
YAxisDefinition Propertyholds the information about the engineering units and range for the Y-Axis.
The StatusCode.SemanticsChangedbit shall be set if any of the InstrumentRange, EURange, EngineeringUnits, Title, XAxisDefinitionor YAxisDefinition Propertiesare changed.
CubeItemTyperepresents a cube of values like a spatial particle distribution, where the particle position is given by X which is the column, Y the row and Z the depth. In the example of a spatial partical distribution, the value is the particle size. CubeItemTypeis formally defined in Table 12.
Table 12– CubeItemType definition
Attribute |
Value |
||||
BrowseName |
CubeItemType |
||||
IsAbstract |
False |
||||
ValueRank |
3 (3 = three dimensional array) |
||||
DataType |
BaseDataType |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
Subtype of the ArrayItemType defined in 5.3.4.1 |
|||||
|
|
|
|
|
|
HasProperty |
Variable |
XAxisDefinition |
PropertyType |
Mandatory |
|
HasProperty |
Variable |
YAxisDefinition |
PropertyType |
Mandatory |
|
HasProperty |
Variable |
ZAxisDefinition |
PropertyType |
Mandatory |
Engineering units and range for the Valueare defined by corresponding Propertiesinherited from the ArrayItemType.
The DataTypeof this VariableTypeis restricted to SByte, Int16, Int32, Int64, Float, Double, ComplexNumberTypeand DoubleComplexNumberType.
The ArrayDimensions Attributefor Variablesof this type or subtypes should use the first entry in the array ([0]) to define the number of columns, the second entry ([1]) to define the number of rows, and the third entry ([2]) define the number of steps in the Z axis, assuming the size of the matrix is not dynamic.
XAxisDefinition Propertyholds the information about the engineering units and range for the X-Axis.
YAxisDefinition Propertyholds the information about the engineering units and range for the Y-Axis.
ZAxisDefinition Propertyholds the information about the engineering units and range for the Z-Axis.
The StatusCode SemanticsChangedbit shall be set if any of the InstrumentRange, EURange, EngineeringUnits, Title, XAxisDefinition, YAxisDefinitionor ZAxisDefinition Propertiesare changed (see 5.2for additional information).
This VariableTypedefines a generic multi-dimensional ArrayItem.
This approach minimizes the number of types however it may be proved more difficult to utilize for control system interactions.
NDimensionArrayItemTypeis formally defined in Table 13.
Table 13– NDimensionArrayItemType definition
Attribute |
Value |
||||
BrowseName |
NdimensionArrayItemType |
||||
IsAbstract |
False |
||||
ValueRank |
0 (0 = OneOrMoreDimensions) |
||||
DataType |
BaseDataType |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
Subtype of the ArrayItemType defined in 5.3.4.1 |
|||||
|
|
|
|
|
|
HasProperty |
Variable |
AxisDefinition |
AxisInformation [] |
PropertyType |
Mandatory |
The DataTypeof this VariableTypeis restricted to SByte, Int16, Int32, Int64, Float, Double, ComplexNumberType and DoubleComplexNumberType.
AxisDefinition Propertyholds the information about the Engineering Unitsand Rangefor all axis.
The StatusCode SemanticsChangedbit shall be set if any of the InstrumentRange, EURange, EngineeringUnits, Titleor AxisDefinition Propertiesare changed (see 5.2for additional information).
DataItemsare always defined as data components of other Nodes in the AddressSpace. They are never defined by themselves. A simple example of a container for DataItems would be a “Folder Object” but it can be an Objectof any other type.
Figure 4illustrates the basic AddressSpacemodel of a DataItem, in this case an AnalogItem.
Figure 4– Representation of DataItems in the AddressSpace
Each DataItemis represented by a DataVariablewith a specific set of Attributes. The TypeDefinitionreference indicates the type of the DataItem(in this case the AnalogItemType). Additional characteristics of DataItems are defined using Properties. The VariableTypesin 5.2specify which properties may exist. These Propertieshave been found to be useful for a wide range of Data Access clients. Serversthat want to disclose similar information should use the OPC-defined Propertyrather than one that is vendor-specific.
The above figure shows only a subset of Attributes and Properties. Other Attributes that are defined for Variablesin OPC 10000-3(e.g., Description) may also be available.
This subclause lists the Attributes of Variablesthat have particular importance for Data Access. They are specified in detail in OPC 10000-3. The following Attributes are particularly important for Data Access:
- Value
- DataType
- AccessLevel
- MinimumSamplingInterval
Valueis the most recent value of the Variablethat the Serverhas. Its data type is defined by the DataType Attribute. The AccessLevel Attributedefines the Server’sbasic ability to access current data and MinimumSamplingIntervaldefines how current the data is.
When a client requests the Value Attributefor reading or monitoring, the Serverwill always return a StatusCode(the quality and the Server’sability to access/provide the value) and, optionally, a ServerTimestampand/or a SourceTimestamp– based on the Client’srequest. See OPC 10000-4for details on StatusCodeand the meaning of the two timestamps. Specific status codes for Data Access are defined in 6.3.
Following is a description of the DataTypesdefined in this specification.
DataTypeslike String, Boolean, Doubleor LocalizedTextare defined in OPC 10000-3. Their representation is specified in OPC 10000-5.
This structure defines the Rangefor a value. Its elements are defined in Table 14.
Table 14– RangeDataType structure
Name |
Type |
Description |
Range |
structure |
|
low |
Double |
Lowest value in the range. |
high |
Double |
Highest value in the range. |
If a limit is not known a NaN shall be used.
Its representation in the AddressSpaceis defined in Table 15
Table 15– Rangedefinition
Attributes |
Value |
BrowseName |
Range |
This structure contains information about the EngineeringUnits. Its elements are defined in Table 16.
Table 16– EUInformationDataType structure
Name |
Type |
Description |
EUInformation |
structure |
|
namespaceUri |
String |
Identifies the organization (company, standards organization) that defines the EUInformation. |
unitId |
Int32 |
Identifier for programmatic evaluation. −1 is used if a unitIdis not available. |
displayName |
LocalizedText |
The displayNameof the engineering unit is typically the abbreviation of the engineering unit, for example ”h” for hour or ”m/s” for meter per second. |
description |
LocalizedText |
Contains the full name of the engineering unit such as ”hour” or ”meter per second”. |
Its representation in the AddressSpaceis defined in Table 17
Table 17– EUInformationdefinition
Attributes |
Value |
BrowseName |
EUInformation |
To facilitate interoperability, OPC UA specifies how to apply the widely accepted “Codes for Units of Measurement”published by the “United Nations Centre for Trade Facilitation and Electronic Business” (see UN/CEFACT: UNECE Recommendation N° 20). It uses and is based on the International System of Units (SI Units) but in addition provides a fixed code that can be used for automated evaluation. This recommendation has been accepted by many industries on a global basis.
The UNECE recommendation can be found here:
https://www.unece.org/cefact/codesfortrade/codes_index.html
The latest UNECE version (Rev 12. Filename = rec20_Rev12e_2016.xls, published in 2016) is available here:
http://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_Rev12e_2016.xls
The mapping of the UNECE codes to OPC UA (EUInformation.unitId) is available here:
http://www.opcfoundation.org/UA/EngineeringUnits/UNECE/UNECE_to_OPCUA.csv
Table 18contains a small excerpt of the published Annex with Code Lists:
Table 18– Examples from the UNECE Recommendation
Excerpt from Recommendation N°. 20, Annex 1 |
|||
Common Code |
Name |
Conversion Factor |
Symbol |
C81 |
radian |
|
rad |
C25 |
milliradian |
10–3rad |
mrad |
MMT |
millimetre |
10–3m |
mm |
HMT |
hectometre |
102m |
hm |
KTM |
kilometre |
103m |
km |
KMQ |
kilogram per cubic metre |
kg/m3 |
kg/m3 |
FAH |
degree Fahrenheit |
5/9×K |
°F |
J23 |
degree Fahrenheit per hour |
1,543 210 × 10–4K/s |
°F/h |
Specific columns of this table shall be used to create the EUInformationstructure as defined by the following rules:
- The Common Codeis represented as an alphanumeric variable length of 3 characters. It shall be used for the EUInformation.unitId. The following pseudo code specifies the algorithm to convert the Common Code into an Int32 as needed for EUInformation.unitId:
Int32 unitId = 0; Int32 c; for (i=0; i<=3;i++) {
c = CommonCode[i]; if (c == 0) break; // end of Common Code unitId = unitId << 8; unitId = unitId | c;}
- The Symbolfield shall be copied to the EUInformation.displayName. The localeId field of EUInformation.displayNameshall be empty.
- The Namefield shall be used for EUInformation.description. If the name is copied, then the localeId field of EUInformation.descriptionshall be empty. If the name is localized then the localeId field shall specify the correct locale.
The EUInformation.namespaceUrishall be http://www.opcfoundation.org/UA/units/un/cefact.
NOTE It will be advantegous to use Recommendation N°. 20 as specified, because it can be programmatically interpreted by generic OPC UA Clients. However, the EUInformationstructure has been defined such that other standards bodies can incorporate their engineering unit definitions into OPC UA. If Serversuse such an approach then they shall identify this standards body by using a proper namespaceUriin EUInformation.namespaceUri.
This structure defines float IEEE 32 bits complex value. Its elements are defined in Table 19.
Table 19– ComplexNumberType DataType structure
Name |
Type |
Description |
ComplexNumberType |
structure |
|
real |
Float |
Value real part |
imaginary |
Float |
Value imaginary part |
Its representation in the AddressSpaceis defined in Table 20
Table 20– ComplexNumberType definition
Attributes |
Value |
BrowseName |
ComplexNumberType |
This structure defines double IEEE 64 bits complex value. Its elements are defined in Table 21.
Table 21– DoubleComplexNumberType DataType structure
Name |
Type |
Description |
DoubleComplexNumberType |
structure |
|
real |
Double |
Value real part |
imaginary |
Double |
Value imaginary part |
Its representation in the AddressSpaceis defined in Table 22.
Table 22– DoubleComplexNumberType definition
Attributes |
Value |
BrowseName |
DoubleComplexNumberType |
This structure defines the information for auxiliary axis for ArrayItemType Variables.
There are three typical uses of this structure:
- The step between points is constant and can be predicted using the range information and the number of points. In this case, axisSteps can be set to NULL.
- The step between points is not constant, but remains the same for a long period of time (from acquisition to acquisition for example). In this case, axisSteps contains the value of each step on the axis.
- The step between points is not constant and changes at every update. In this case, a type like XYArrayType shall be used and axisSteps is set to NULL.
Its elements are defined in Table 23.
Table 23– AxisInformation DataType structure
Name |
Type |
Description |
AxisInformation |
structure |
|
engineeringUnits |
EUInformation |
Holds the information about the engineering units for a given axis. |
eURange |
Range |
Limits of the range of the axis |
title |
Localizedtext |
User readable axis title, useful when the units are %, the Title may be “Particle size distribution” |
axisScaleType |
AxisScaleEnumeration |
LINEAR, LOG, LN, defined by AxisSteps |
axisSteps |
Double[] |
Specific value of each axis steps, may be set to “Null” if not used |
When the steps in the axis are constant,axisStepsmay be set to “Null” and in this case, the Rangelimits are used to compute the steps. The number of steps in the axis comes from the parent ArrayItem.ArrayDimensions.
This enumeration identifies on which type of axis the data shall be displayed. Its values are defined in Table 24.
Table 24– AxisScaleEnumeration values
Value |
Description |
LINEAR_0 |
Linear scale |
LOG_1 |
Log base 10 scale |
LN_2 |
Log base e scale |
Its representation in the AddressSpaceis defined in Table 25.
Table 25– AxisScaleEnumeration definition
Attributes |
Value |
BrowseName |
AxisScaleEnumeration |
This structure defines a physical value relative to a X axis and it is used as the DataTypeof the Value of XYArrayItemType. For details see 5.3.4.3.
Many devices can produce values that can perfectly be represented with a float IEEE 32 bits but, they can position them on the X axis with an accuracy that requires double IEEE 64 bits. For example, the peak value in an absorbance spectrum where the amplitude of the peak can be represented by a float IEEE 32 bits, but its frequency position required 10 digits which implies the use of a double IEEE 64 bits.
Its elements are defined in Table 26.
Table 26– XVType DataType structure
Name |
Type |
Description |
XVType |
structure |
|
x |
Double |
Position on the X axis of this value |
value |
Float |
The value itself |
Its representation in the AddressSpaceis defined in Table 27.
Attributes |
Value |
BrowseName |
XVType |