For each IODD Record a new OPC UA DataType as subtype of Structure is created.
The NodeId of the new DataType is composed of the NodeId of the ObjectType generated for the IODD (see section 7.3.2) and the Record/@id (“<ObjectTypeId> <Record id>”).
- The BrowseName and DisplayName are server-specific. It is recommended to use the Name element of the Variable in the IODD (default language English resolved textId) and “DataType” as postfix. For example, when the Variable Name has the textId “V_N_autosafeparameter”, which is defined as “autosafe parameter” in the IODD as default, the DataType BrowseName is “autosafe parameterDataType”. The DisplayName is LocalizedText, thus also different locales can be provided, using the corresponding texts of the IODD for the different locales.
- The DataType shall use OPC Binary Encoding as definition. The DataTypeDefinition Attribute shall describe the structure according to the IODD and the rules defined next.
- In the StructureDefinition (DataTypeDefinition Attribute) the field defaultEncodingId shall be “Default Binary”, the field baseDataType shall be “Structure”, and the field structureType “Structure_0”.
- The array of fields (of type StructureField) shall be filled: For each IODD RecordItem defined in the IODD an entry shall be made with the following rules:
- The Name of the IODD RecordItem (default language English resolved textId) shall map to the field name of StructureField
- The Description of the IODD RecordItem shall map to the field description of StructureField
- The data type of the IODD RecordItem shall map to the dataType of StructureField following Table 66
Table 66 – Mapping of data types used in IODD Record
|IO-Link data type||OPC UA DataType||Remark|
|IntegerT||Specific Integer or Enumeration DataType||Details see section 12.2.2|
|UIntegerT||Specific UInteger or Enumeration DataType||Details see section 12.2.2|
|Float32T||Float||Details see section 12.2.3|
|BooleanT||Boolean||Details see section 12.2.1|
|OctetStringT||Byte||Details see section 12.2.5|
|StringT||String||Details see section 12.2.4|
|TimeT||DateTime||Details see section 12.2.6|
|TimeSpanT||Duration||Details see section 220.127.116.11|
- The field valueRank shall be “Scalar”
- The field arrayDimensions shall be null, except for the OctetStringT data type mapping, where the fixedLength element is mapped to arrayDimensions
- The field maxStringLength shall contain the fixedLength for Strings, otherwise “0”
The field isOptional shall be “False” In addition to the structured DataType more things need to be considered. If the new defined Structure DataType is used in an OPC UA Variable, the following rules apply.
- If all entries of the IODD Record are readable (RO or RW), the Variable becomes readable, otherwise the Variable as such is not readable.
- If all entries of the IODD Record are writable (WO or RW), the Variable becomes writeable, otherwise the Variable as such is not writeable.
- If the IODD Record has “subindexAccessSupported” to “True”, each entry of the structure is also exposed as subvariables following the general rules (e.g. for IntegerT, which might lead to an Enum DataType or usage of specific VariableTypes). If the individual entry is readable, the Variable becomes readable, if the individual entry is writable the Variable becomes writeable.
- If the IODD Record has “subindexAccessSupported” to “False”, but it contains entries that would map to Variables with additional Properties, those entries shall be exposed as subvariables following the general rules (because of the meta data). If the whole record is readable, they shall become readable but not writeable, otherwise they become neither readable nor writeable. Such subvariables shall be created for all StringT, and some IntegerT, UIntegerT, FloatT, and BooleanT (depending whether the concrete mapping would create a Property on the Variable). If does not need to be provided for OctetStringT, TimeT, and TimeSpanT.
- If an entry of the IODD Record is referenced by a RecordItemRef it shall be exposed as sub-variable, even if the RecordItemRef is in an optional IODD Menu. Note that a VariableRef and RecordItemRef defines additional characteristics (see 7.3). Those need to be considered as well.