Specification Predefined Template for UoM for submodel elements with values (normative) Data Specification Unit of Measure Template Specification This specification is only valid in combination with IDTA-01001-3-1 and IDTA-01003-a-3-1. Template: Unit of Measure administration: version: 3 revision: 0 creator: IDTA id: https://admin-shell.io/DataSpecificationTemplates/DataSpecificationUnitOfMeasure/3 dataSpecificationContent: DataSpecificationUnitOfMeasure Description (EN): Data specification template for concept descriptions for Units of Measure. The ID of the data specification template was derived conformant to the grammar for semantic IDs for data specifications as defined in Part 1 of the document series, IDTA-01001, with the exception that the minor version was excluded because this ID is also part of the instances of Asset Administration Shells: This ID is used in hasDataSpecification/dataSpecification. This namespace has the qualifier "UoM:". Metamodel of Data Specification Unit of Measure @startuml class DataSpecificationUnitOfMeasure<DataSpecificationContent> [Template] { +preferredName: ShortLangStringSet +symbol: string +code: string[0..1] +definition: LangStringSet[0..1] +preferredNameQuantity: LangStringSet[0..1] +quantityID: Identifier[0..1] +classificationSystem: string[0..1] } @enduml Data Specification Attributes Class: DataSpecificationUnitOfMeasure <<Template>> Explanation: Content of data specification template for concept descriptions for Units of Measure Inherits from: DataSpecificationContent id: https://admin-shell.io/DataSpecificationTemplates/DataSpecificationUnitOfMeasure/3/0/DataSpecificationUnitOfMeasure Attribute: ID Explanation Type Card. preferredName https://admin-shell.io/DataSpecificationTemplates/DataSpecificationUnitOfMeasure/3/0/DataSpecificationUnitOfMeasure/preferredName Preferred name of the unit in different languages Note: To stay compliant with IEC 61360 each string shall have a length of maximum 255 and minimum of 1 characters. Note: It is advised to keep the length of the name limited to 35 characters. Example: "millimetre" ShortLangStringSet 1 symbol https://admin-shell.io/DataSpecificationTemplates/DataSpecificationUnitOfMeasure/3/0/DataSpecificationUnitOfMeasure/symbol Symbol of the unit Example: “mm” string 1 code https://admin-shell.io/DataSpecificationTemplates/DataSpecificationUnitOfMeasure/3/0/DataSpecificationUnitOfMeasure/code Code of the unit defined by the classification system Note: This is relevant if the classification system references the units differently from the unique unitID. This can e.g. be UNECE common codes or proprietary keys. Example: "MMT" string 0..1 definition https://admin-shell.io/DataSpecificationTemplates/DataSpecificationUnitOfMeasure/3/0/DataSpecificationUnitOfMeasure/definition Definition in different languages Example: "0,001 fold of the SI base unit metre" LangStringSet 0..1 preferredNameQuantity https://admin-shell.io/DataSpecificationTemplates/DataSpecificationUnitOfMeasure/3/0/DataSpecificationUnitOfMeasure/preferredNameQuantity Preferred name of the quantity in different languages. preferredNameQuantity and quantityID must be consistent if both attributes are set Note: To stay compliant with IEC 61360 each string shall have a length of maximum 255 and minimum of 1 characters. Note: It is advised to keep the length of the name limited to 35 characters. Example: "distance" ShortLangStringSet 0..1 quantityId https://admin-shell.io/DataSpecificationTemplates/DataSpecificationUnitOfMeasure/3/0/DataSpecificationUnitOfMeasure/quantityId Unique ID of the quantity. preferredNameQuantity and quantityID must be consistent if both attributes are set Example: 0173-1#Z4-BAJ199#002 Identifier 0..1 classificationSystem https://admin-shell.io/DataSpecificationTemplates/DataSpecificationUnitOfMeasure/3/0/DataSpecificationUnitOfMeasure/classificationSystem Name of the classification system used for the definition of units and quantities Example: "ECLASS" string 0..1 Primitive and Simple Data Types (normative) All simple data types from Part 1 [1] apply also to the specifications described in this document. Basic and Primitive Data Types Table 1 lists the Primitives used in the metamodel. Primitive data types start with a capital letter. Table 1. Primitive DataTypes Used in Metamodel Primitive Definition Value Examples ShortLangStringSet A LangStringSet with text values between 1 and 255 characters. In xml: <aas:langString lang="EN">This is a multi-language value in English</aas:langString> <aas:langString lang="DE">Das ist ein Multi-Language-Wert in Deutsch</aas:langString> In rdf: "This is a multi-language value in English"@en ; "Das ist ein Multi-Language-Wert in Deutsch"@de In JSON: "description": [ { "language":"en", "text": "This is a multi-language value in English." }, { "language":"de", "text": "Das ist ein Multi-Language-Wert in Deutsch." } ] Mappings to Data Formats to Share I4.0-Compliant Information (normative) General Part 1 of this document series (IDTA-01001) introduces different serialization formats: XML, JSON and RDF. Part 1 also introduces the implementation guide for embedded data specifications. This is why the different formats are described in IDTA-01001. Mappings from Common Dictionaries (informative) General As mentioned in the introduction of this document several dictionaries for units of measures exist. Typically, these dictionaries have their own philosophy of modelling the different aspects of units. This section provides a guide on how to map the most common dictionary entries to the Data Specification template. Mapping The table below provides the information for mapping the entries of the most common dictionaries or data models for UoM to the Concept Description specified in this document. Table 2. Mappings of data dictionaries AAS UoM ECLASS IEC CDD UNECE Rec. 20 OPC UA BIPM SAMM[1] ConceptDescription/id IRDI (or IRI[2]) Code prefix_[2] + _Common Code prefix_[2] + _unitId PID[3] Unit element URN preferredName Preferred name Preferred name Name description Unit preferredName symbol Short name Short name Symbol displayName Symbol symbol code IRDI Code Common Code unitId PID commonCode[4] definition Definition Definition Description --- Definition description preferredNameQuantity Quantity Quantity Quantity QuantityType Quantity quantityKind/preferredName quantityID QuantityID QuantityID --- --- PID (of Quantity) quantityKind classificationSystem "ECLASS" "IEC CDD" "UNECE" --- "BIPM" "UNECE" for units having a code, "SAMM" for units defined as part of SAMM[5] Table 3. Prefixes Dictionary prefix Example for id UNECE "uncefact:UNECERec20Code/" "uncefact:UNECERec20Code/MMT" OPC UA http://www.opcfoundation.org/UA/units/ http://www.opcfoundation.org/UA/units/5131860footnote:"MMT" → 0x004E4E54 → 5131860 ECLASS https://api.eclass-cdp.com/ https://api.eclass-cdp.com/0173-1-05-AAA480-003 SAMM urn:samm:org.eclipse.esmf.samm:unit:<version>#[6] urn:samm:org.eclipse.esmf.samm:unit:2.2.0#degreeCelsius[7] Note: OPC UA uses the attribute namespaceUri to denote the classification system. It is recommended to reference that classification system directly to avoid "double-mapping", if possible. E.g. the Table [Prefixes] illustrates how OPC UA maps the UNECE Common Code to an integer value (see explanation below). In the OPC UA Specification Part 8, 5.6.3.4 a mapping from UNECE to the OPC UA information model is described as follows: The namespaceUri shall be http://www.opcfoundation.org/UA/units/un/cefact The Common Code (represented as an alphanumeric variable length of up to 3 characters) has been converted into a 32 Bit Integer and is used for the unitId. The following pseudo code specifies the conversion algorithm: 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;} 1. https://eclipse-esmf.github.io/samm-specification/snapshot/units.html 2. see Table [Prefixes] 3. Example for BIPM PID: https://si-digital-framework.org/SI/units/ampere 4. In SAMM only UNECE units have a commonCode value. 5. see https://github.com/eclipse-esmf/esmf-semantic-aspect-meta-model/blob/main/esmf-samm-build-plugin/src/main/resources/custom-units.ttl 6. Note: the namespace is versioned, not the single UoMs as for example in ECLASS 7. see https://eclipse-esmf.github.io/samm-specification/snapshot/appendix/unitcatalog.html, prefix "unit:" maps to urn:samm:org.eclipse.esmf.samm:unit:2.2.0# etc.