Вы находитесь на странице: 1из 19

DLMS Implementation Guide

4-Quadrant-/Combi meter LZQJ accord. to VDEW-Specifications 2.1.2

Edition: 03.07.2006

LZQJ-DLMS-E-1.25

All of the contents published in this manual are copyright. Translating, reprinting, duplicating and also saving of this manual in data processors requires exclusive permission from EMH. All of the trademarks named in this manual are the property of EMH Elektrizittszhler GmbH & Co KG or the respective title holders. EMH Elektrizittszhler GmbH & Co KG is certified accord. to DIN ISO 9001:2000 and continually endeavours to improve their products The contents of this manual and the technical specifications can be extended, altered or removed without prior notice. The description of the product specifications in this manual does not represent part of a contract. 2006 EMH Elektrizittszhler GmbH & Co KG. All rights reserved.

If you have any questions or inspirations please contact us at:


GmbH & Co KG

EMH Elektrizittszhler

Sdring 5 D - 19243 Wittenburg Tel.: +49(0)3 88 52 645-0 Fax.: +49(0)3 88 52 645-29 Email: info@emh-meter.de Internet: www.emh-meter.de

Contents page
1 Introduction ............................................................................................................................... 4 2 References, abbreviations, and definitions................................................................................ 4 2.1 References ....................................................................................................................................4 2.2 Abbreviations .................................................................................................................................4 2.3 Definitions .....................................................................................................................................5 3 Physical Layer ............................................................................................................................ 5 3.1 Optical Interface ............................................................................................................................5 3.2 Electrical interface ..........................................................................................................................5 4 Data Link Layer (HDLC).............................................................................................................. 6 4.1 HDLC Addressing............................................................................................................................6 4.2 HDLC Protocol Parameters / Parameter negotiation ...........................................................................6 4.3 HDLC connection establishment and disconnection............................................................................7 4.4 Time-Out-Protection .......................................................................................................................8 5 Application Layer (COSEM) ........................................................................................................ 8 5.1 Application association establishment ...............................................................................................8 5.1.1 COSEM application context name ..................................................................................................8 5.1.2 COSEM authentification mechanism name......................................................................................8 5.1.3 COSEM conformance block ...........................................................................................................8 5.1.4 Maximum receive PDU sizes .........................................................................................................9 5.2 Access levels and password protection .............................................................................................9 6 Data objects ............................................................................................................................. 10 6.1 SN Referencing ............................................................................................................................10 6.2 Used interface classes...................................................................................................................10 6.3 List of all data objects...................................................................................................................10 6.4 Used data types ...........................................................................................................................11 6.5 Additional information on certain data objects.................................................................................11 6.5.1 Energy or demand related registers.............................................................................................11 6.5.2 Measuring data besides energy related registers ..........................................................................11 6.5.3 Additional (static) data and data administrated by the user ...........................................................11 6.5.4 Date/time information (meter clock)............................................................................................12 6.5.5 Load profile(s)...........................................................................................................................12 6.5.6 Historical values (performing a reset/cumulation) .........................................................................13 6.5.7 Operation log book ....................................................................................................................14 6.5.8 User log book............................................................................................................................14 6.5.9 Billing period counter .................................................................................................................14 6.6 Reading and writing data objects via DLMS.....................................................................................14 6.6.1 Reading data.............................................................................................................................14 6.6.2 Writing data ..............................................................................................................................15 6.7 Static and dynamic meter data general recommendations .............................................................15 Appendix ...................................................................................................................................... 16 A.1 Available data objects...................................................................................................................16 A.2 Example of data reading and writing..............................................................................................19

DLMS Implementation guide

1 Introduction
The DLMS protocol stack (accord. to IEC 62056) is used in this meter for data access in addition to the protocol according to IEC 62056-21 (former IEC 61107). DLMS provides a number of options, therefore the purpose of this document is to give all necessary information to communicate with the meter via DLMS. An example of a DLMS data transfer from and to the meter is included in the appendix of this document. Knowledge of the DLMS standard is assumed when using this document. DLMS is based on the layer oriented communication model. For the sake of clarity this document is also based on this model. This document and the specified data therein are valid for all LZQJ firmware versions from 1.25. Minor details of the DLMS implementation of the meter might be subject of change without notice for later firmware versions.

2 References, abbreviations, and definitions


2.1 References
Reference IEC 62056-21:2002 (EN 62056-21:2002) IEC 62056-42:2002 (EN 62056-42:2002) IEC 62056-46:2002 (EN 62056-46:2002) IEC 62056-53:2002 (EN 62056-53:2002) IEC 62056-61:2002 (EN 62056-61:2002) IEC 62056-62:2002 (EN 62056-62:2002) IEC 13239:2000 Title Data exchange for meter reading, tariff and load control Part 21: Direct local data exchange Data exchange for meter reading, tariff and load control Part 42: Physical layer services and procedures for connection-oriented asynchronous data exchange Data exchange for meter reading, tariff and load control Part 46: Data link layer using HDLC protocol Data exchange for meter reading, tariff and load control Part 53: COSEM application layer Data exchange for meter reading, tariff and load control Part 61: Object identification system (OBIS) Data exchange for meter reading, tariff and load control Part 62: Interface classes Information technology Telecommunications and information exchange between systems High-level data link control (HDLC) procedures Electronic load profile meter

VDEW-Specifications 2.1.2

2.2 Abbreviations
AARQ APDU COSEM DLMS HDLC IC(s) LSB OBIS SN Application association request Application layer protocol data unit Companion specification for energy metering Device language message specification High-level data link control (IEC 13239) Interface class(es) Least significant bit Object identification system (IEC 62056-61) Short name(s) (referencing)

DLMS Implementation guide

2.3 Definitions
1. Hexadecimal numbers are characterised by the index 16 or by the prefix 0x.

Example: 3F16 = 0x3F = 63.


2. All data type terms are in accordance with IEC 62056-53. 3. Following the client-server-model, the meter is referenced as the server whereas any DLMS communication counterpart is referenced as the client in this document. 4. The term short name (SN) is sometimes used synonymously to the base name of an instance of an interface class. 5. OBIS codes are noted in the following manner: A-B:C.D.E*F. Note that the specification of all six value groups (A...F) are mandatory when using DLMS.

3 Physical Layer
The application of the DLMS protocol is possible both on the optical interface and on the first electrical interface of the meter. Note that the simultaneous operation of these two interfaces is not possible. The usage of DLMS is not possible on the optional second electrical interface of the meter. See the LZQJ product manual for further details about the interfaces of the meter.

3.1 Optical Interface


On this interface the access to the DLMS protocol is possible via mode E according to IEC 62056-21. According to this standard, the used baud rate during the DLMS communication is always negotiated between client and server in this case.

3.2 Electrical interface


For this interface, three different hardware options are possible: CL0 (20 mA), RS232 or RS485. Independent of the used hardware option of this interface, two different ways to access the DLMS protocol stack can be chosen with the configuration of the meter: The access via mode E according to IEC 62056-21 with or without baud rate switching. The direct access to DLMS according to IEC 62056-46. Note that according to this standard no change of the baud rate or the data format (one start bit, 8 data bits, no parity bit, one stop bit) must occur during the DLMS communication when using the direct access to DLMS.

DLMS Implementation guide

4 Data Link Layer (HDLC)


4.1 HDLC Addressing
According to IEC 62056-46 the HDLC address of the meter may consist of 1, 2 or 4 bytes. The valid range of usable addresses and the meaning of the addresses (i.e. logical and physical address) are also part of this standard. Both parts of the meter address (logical and physical) can be changed by the DLMS client itself. The physical device address is an attribute of the IC HDLC setup (IC 23). The corresponding OBIS codes for the instances of these IC are 0-0:22.0.0*255 for the electrical interface and 0-1:22.0.0*255 for the optical interface. The logical device address is accessible via the objects with OBIS codes 0-0:96.1.128*0 for the electrical interface and 0-0:96.1.128*1 for the optical interface. The length of the used address (1, 2 or 4 byte) arises automatically from the values of the addresses. This is shown in the following table. All addresses are initially set to the default value 000016 if not configured otherwise.
Setting of the logical address 000016 (used logical address: 001016) 000016 (used logical address: 001016) 000016 (used logical address: 001016) 001016 007E16 Setting of the physical address 000016 (used physical address: 001016) 001016 007D16 Used address-length (byte) 1 (1 byte logical, 1 0 byte phys. address ) 1 (1 byte logical, 0 byte phys. address) 4 (2 bytes logical, 2 bytes phys. address) 1 (1 byte logical, 0 byte phys. address) 4 (2 bytes logical, 2 bytes phys. address) 2 (1 byte logical, 1 byte phys. address) 4 (2 bytes logical, 2 bytes phys. address)

007E16 3FFD16 000016 (used physical address: 001016) 000016 (used physical address: 001016) 001016 007D16 001016 3FFD16 007E16 3FFD16

007F16 3FFE16

001016 007E16 007F16 3FFE16 001016 3FFE16

The HDLC address of the client always consists of one byte. Valid client addresses are 1016, 2016, and 5016. Each of these addresses allows access to a certain access level. See 5.2 Access levels and password protection.

4.2 HDLC Protocol Parameters / Parameter negotiation


The values of the HDLC parameters used by the meter are accessible via the IEC HDLC setup IC (IC id 23). The corresponding OBIS codes are 0-0:22.0.0*255 for the electrical interface and 0-1:22.0.0*255 for the optical interface. See IEC 62056-62 for details. The initial values of the attributes of IEC HDLC setup IC can be found in the following table. Note that the initial values of some parameters may be chosen by the configuration of the meter and may therefore differ from the values given in the table.
1

In these cases the value of the physical device address has no specific meaning for the HDLC-addressing.

DLMS Implementation guide

Also the data types used according to the definition of this IC are noted in the table. Note that version 1 is used for representating this IC. Attribute logical_name comm_speed window_size_transmit window_size_receive max_info_field_length_receive inter_octet_time_out inactivity_time_out device_address Initial value (octet-string[6]) 0, 0, 22, 0, 0, 255 (enum) 4 (depends on the configuration of the meter) (unsigned) 1 (unsigned) 1 (long-unsigned) 128 (long-unsigned) 300 (depends on the configuration of the meter) (long-unsigned) 15 (depends on the configuration of the meter) (long-unsigned) 1016 (depends on the configuration of the meter) Remark/meaning OBIS code baud rate negotiable parameter (see below) negotiable parameter (see below) negotiable parameter (see below) negotiable parameter (see below) unit: milliseconds unit: seconds physical device address

max_info_field_length_transmit (long-unsigned) 2030

Four of these parameters may be changed by the client separately for both the optical and the electrical interface of the meter: The comm_speed (baud rate), inter_octet_time_out, the inactivity_time_out and the device_address. The access to the comm_speed attribute (i.e. the baud rate) is restricted to the usage of the electrical interface with direct access to DLMS. Note that the baud rate is negotiated between client and server when using mode E according to IEC 6205621. Thus it is not necessary to set the baud rate in this case. For the enumeration of the baud rates in this case, see IEC 62056-62. If the inactivity_timeout is set to 0, the meter considers a value of 120 seconds for this parameter. Any successful change of one of these parameters become effective with the next HDLC connection establishment. The negotiation of the window_size and the max_info_field_length parameters between client and server during the connection phase described in IEC 62056-46 is fully supported by the meter.

4.3 HDLC connection establishment and disconnection


A successful exchange of valid SNRM (set normal response mode request) and UA (unnumbered acknowledge response) HDLC frames leads to the establishment of a HDLC connection between client and server. The negotiation of some parameters (see 4.2 HDLC Protocol Parameters / Parameter negotiation) may be part of this connection phase. The existence of a valid HDLC connection between client and server is indicated on the meter display by the communication display. According to IEC 62056-46, two reasons may lead to the disconnection between client and server:
-

The exchange of DISC (disconnect request) and UA (unnumbered acknowledge response) HDLC frames between client and server. The occurence of an inactivity timeout failure (see 4.2 HDLC Protocol Parameters / Parameter negotiation).

DLMS Implementation guide

4.4 Time-Out-Protection
To avoid unintentional disconnection due to an inactivity timeout failure (see 4.3 HDLC connection establishment and disconnection) the meter will immediately respond to any valid HDLC RR (receive ready) frame sent by the client with a valid RR frame itself. Note that such exchange of RR frames between client and server is only necessary when there is no data transmission at all between client and server. Thus this exchange does only affect the HDLC layer, not the COSEM layer. Note also that due to the fact that the server must not send unrequested HDLC frames the responsibility to avoid unintentional disconnection in the described manner is on the client side. The client should also avoid an endless exchange of RR frames in the described manner. This feature allows to keep the connection even when no data is exchanged between client and server.

5 Application Layer (COSEM)


5.1 Application association establishment
According to IEC 62056-53 the specification of the COSEM application context name and the COSEM authentification context name included the AARQ sent by the client is necessary for the establishment of a valid application association. According to the same standard, the intersection of the COSEM conformance blocks of the client and the server must not be empty.

5.1.1 COSEM application context name


The meter supports the COSEM application context name with context_id=2 (short name referencing, no ciphering used). All other context names are rejected.

5.1.2 COSEM authentification mechanism name


The meter supports lowest level security mechanism (mechanism_id=0, no password required) and the low level security mechanism (mechanism_id=1, static password required). Other security mechanisms are rejected by the meter.

5.1.3 COSEM conformance block


The services (see IEC 62056-53 for details) provided by the meter are 1. 2. 3. 4. read write multiple-references2 parameterised-access

Following IEC 62056-53, this leads to a value of the COSEM conformance block of 18002016.

Due to a failure in the DLMS conformance test tool (CTT), this service must not be noted in the conformance block. Regardless of this, this service should be noted in the conformance block included in the AARQ of the client to be compliant with higher firmware versions of the meter after correction of the CTT.

DLMS Implementation guide

5.1.4 Maximum receive PDU sizes


According to IEC 62056-53, the value of the maximum size of an APDU acceptable by the client is part of the xDLMS-initiate.request sent by the client. It is strongly recommended that this value is set to (unsigned16) 0x00 0x00 in the xDLMS-initiate.request. According to IEC 62056-53 this signals that there is no limit of the acceptable APDU size on the client side at all. The maximum size of a received APDU which can be processed by the server is 200 bytes. This value is part of the xDLMS-Initiate.response sent by the meter. Longer APDUs sent to the meter will be rejected.

5.2 Access levels and password protection


The meter provides three different access levels. These are identified by the corresponding HDLC address of the client as described in the VDEW-Specifications 2.1.2. Details of these DLMS access levels can be found below. Client HDLC address 1016 2016 5016 Access level public client service level calibration level Security mechanism no password required static password required parameterisation status required Access rights read read and write read and write

The password of the service level can be independently chosen for both interfaces of the meter. All passwords are initially set to (octet-string[8]) 3016,3016,3016,3016,3016,3016,3016,3016 (corresponding to the ASCII string 00000000). Note that the initially set passwords are part of the meter configuration. These passwords may be changed by using the method change_LLS_secret of the Association SN IC (IC id12) when a connection on the service level is established on the accordant interface (see IEC 62056-62 for details). The new password is valid after the next disconnection of the current association. Every password must be at least one character long and have a maximum length of 8 characters. The password protection of the service level cannot be deactivated.

DLMS Implementation guide

6 Data objects
6.1 SN Referencing
The meter supports the short name referencing according to IEC 62056-53 and -62. This means that all accessible objects (attributes and methods) are directly addressable via their SN. The assignment of all COSEM objects of the meter to the related IC, their SN, and their OBIS codes are listed in the Association SN IC (IC id 12). It is strongly recommended to read this object list after each reconfiguration of the meter. Appendendix A.1 of this document provides a list of all possible data objects readable via DLMS. Also the IC used and the SN assignment are listed in this table. See A.1 Available data objects.

6.2 Used interface classes


All used interface classes (ICs), their id, and their versions are listed below. Furthermore, the optional methods of theses ICs supported by the meter are listed. All ICs are used according to IEC 62056-62. It is strongly recommended that any client implementation designated to communicate with the meter supports all these IC definitions. IC Data Register Extended register Profile generic Clock Association SN SAP assignment IEC HDLC setup id 1 3 4 7 8 12 17 23 Version 0 0 0 1 0 1 0 1
4

Supported optional methods (a) capture


3

(a) adjust_to_quarter (b) adjust_to_minute (a) change_LLS_secret -

6.3 List of all data objects


A list of all available data objects are supplied in the appendix of this document (see A.1 Available data objects). Important note: The data objects given in this list represent the maximum extent of DLMS objects available. The occurence of some of these objects and some of the used OBIS codes are affected by the configuration of the meter. According to IEC 62056-62, the effectively available data objects and their associated OBIS codes for a particular meter configuration are listed in the Association SN IC (IC id 12). It is strongly recommended to read this object list after each reconfiguration of the meter.

The application of this method for this IC is only possible for the instance with OBIS code 1-0:98.1.0*126. See Version 1 of the IEC HDLC setup IC (IC id 23) is part of the second edition of IEC 62056-62.

6.5.6 Historical values for details.


4

10 DLMS Implementation guide

6.4 Used data types


All data types used are in accordance with IEC 62056-53 and are listed below. For further information on the data types, please see IEC 62056-53. It is strongly recommended that any client implementation designated to communicate with the meter supports all these data types. Type description null-data array structure boolean double-long double-long-unsigned octet-string integer long unsigned long-unsigned long64 long64-unsigned enum float32 float64 Tag 0 (0016) 1 (0116) 2 (0216) 3 (0316) 4 (0416) 5 (0516) 9 (0916) 15 (0F16) 16 (1016) 17 (1116) 18 (1216) 20 (1416) 21 (1516) 22 (1616) 23 (1716) 24 (1816)

6.5 Additional information on certain data objects


6.5.1 Energy or demand related registers
All energy or demand related registers (specified by their specific OBIS codes) are mapped either in register IC (IC id 3) or in extended register IC (IC id 4). These ICs also provide information on the scaler factor and the unit of the captured values. Note that the

extended register IC also provides information on the time when the value was captured.
Important note: The assignment of a certain energy register (i.e. a certain OBIS code) to a SN may be changed by reconfiguration of the meter.

6.5.2 Measuring data besides energy related registers


Besides energy consumption data, the meter provides information about phase failures, over limit consumption, battery operating time, instantaneous values, etc. This data is stored in the register IC (IC id 3). Additional information on some of these registers can be found in the LZQJ product manual (e.g. meaning of the content of the error register).

6.5.3 Additional (static) data and data administrated by the user


Amongst others, in this group the following data objects are included: the unique meter identification according to IEC 62056-62 10 writable identification registers (OBIS codes 1-0:0.0.0*255 up to 1-0:0.0.9*255) measurement and registration periods for the load profile and the maximum demand registers transformer ratios for current and voltage the representations of the Association SN IC (IC id 12) and the SAP assignment IC (IC id 17)

All these objects are stored either in the data IC (IC id 1) or in the register IC (IC id 3). DLMS Implementation guide 11

6.5.4 Date/time information (meter clock)


All information related to the real time clock (RTC) of the meter is accessible via the clock IC (IC id 8, OBIS code 0-0:1.0.0*255). The direct setting of the date/time information is possible when writing to the attribute time of this IC. Synchronisation of the time is also possible when using the methods adjust_to_quarter or adjust_to_minute. All data objects including time and/or date information (recent or historical) are structured as a octetstring[12] as described in IEC 62056-62 (data type date_time). All time stamps given or accepted by the meter in the DLMS context have an accuracy of one second. This is also valid for the usage of time stamps of load profile, log books and historical values.

6.5.5 Load profile(s)


The load profiles are mapped on the profile generic IC (IC id 7). The mapping on this IC is completely in accordance with the VDEW-Specifications 2.1.2. Therefore the timestamp and the status of each registration period is captured additionally to the energy related values. According to IEC 62056-62 all captured data objects are listed in the attribute capture_objects of this IC. All captured objects of the load profiles (except for time and status) are represented seperately in IC extended register. These representations can be unambiguously identified by their OBIS code together with the thereby used IC (extended register). Note that related information (e.g. scaler factors and units of the captured objects) is only accessible via these captured objects themselves. According to the definition of the profile generic IC this information is not included in the attributes of this IC in any way. Also according to IEC 62056-62, selective access is possible to the attribute buffer with an access selector value of 1. The used parameter range_descriptor may carry information about the period requested as well as the registers requested (columns). The information about the period requested is contained in the parameters from_value and to_value of the range_descriptor. Both values must be formatted as data type date_time. Note that the values of second and hundreths of second that are part of this data type will be ignored by the meter for this purpose. One or both of these date_time values might be replaced by (octet string[12])FF16,...,FF16 to characterise the value as unspecified. In order to minimize the data volume during a load profile readout, the following three compression algorithms can be applied to the data included in the attribute buffer according to IEC 62056-62: a) Every time stamp information might be replaced by the data type null-data, if it can be unambiguously calculated by the previous time stamp and the capture period. b) If the load profile status is captured, the replacement of a value with data-type null-data is allowed if it is equal to the previous value. c) Any value (except for time stamps and status) might be expressed in the shortest corresponding data type. Note that the application of these three compression rules is an optional feature of the meter firmware. Note also that the application of just one or two of these rules is arbitrarily configurable. It is strongly recommended that any client implementation designated to communicate with the meter supports these compression algorithms for the load profile data.

12 DLMS Implementation guide

Example for this data compression algorithm The assumed capture period is 15 minutes in this example. Three buffer entries shall be transmitted. Original (uncompressed) data: Time stamp (octet-string [12]) 2006-01-07; 16:45 (octet-string [12]) 2006-01-07; 17:00 (octet-string [12]) 2006-01-07; 17:06 Compressed data: Time stamp (octet-string [12]) 2006-01-07; 16:45 (null-data) 0016 Status (double-long-unsigned) 0080000016 (null-data) 0016 Value (energy feed) (long-unsigned) 13C516 (long-unsigned) 13C516 (unsigned) D316 Status (double-long-unsigned) 0080000016 (double-long-unsigned) 0080000016 (double-long-unsigned) 0000005016 Value (energy feed) (long-unsigned) 13C516 (long-unsigned) 13C516 (long-unsigned) 00D316

see compression rule a)


(octet-string [12]) 2006-01-07; 17:06

see compression rule b)


(double-long-unsigned) 0000005016

see compression rule c)

6.5.6 Historical values (performing a reset/cumulation)


Up to the 15 most recent historical values of the energy related registers are mapped to the profile generic IC (IC id 7). Additionally the billing period counter and the timestamps of the billing period resets are captured. The mapping on this IC is in accordance with the VDEW Specifications 2.1.2. The OBIS code of this representation is 1-0:98.1.0*126 Note that for the maximum demand registers also the timestamps of the maximum demands are also captured. According to IEC 62056-62, selective access is possible to the attribute buffer with a access selector value of 1. The used parameter range_descriptor may carry information about the registers requested (columns) only. Any request of a certain time period will be ignored by the meter when using the selective acccess service for the historical values. Thus it is only possible to read all stored historical values of a certain register altogether. Use of the method capture is possible for this IC if an association on the service level is established. The usage of this method is equivalent to a reset (cumulation). The effects and any restrictions of such a reset can be found in the LZQJ product manual.

DLMS Implementation guide 13

6.5.7 Operation log book


The operation log book (OBIS code 1-0:99.98.0*255) is mapped to the profile generic IC (IC id 7). The captured data for this log book are the time and the value of the error code object according to VDEWSpecifications 2.1.2. Following this document, also the LSB of the error code is captured separately in data type boolean. According to IEC 62056-61, selective access is possible to the attribute buffer with a access selector value of 1. The thereby used parameter range_descriptor may carry information about the time period requested. The information about the period requested is contained in the parameters from_value and to_value of the range_descriptor. Both values must be formatted as data type date_time. Note that the values of second and hundredths of second that are part of this data typ will be ignored for this purpose. One or both of these date_time values might be replaced by (octet string[12])FF16,...,FF16 to characterise these values as unspecified. Any request of a certain captured object (column) will be ignored by the server.

6.5.8 User log book


The user log book (OBIS code 1-0:99.200.0*255) is mapped to the profile generic IC (IC id 7). The captured data for this log book are the time and the value of the user defined status register. Details about the captured status register can be found in the product manual. According to IEC 62056-61, selective access is possible to the attribute buffer with a access selector value of 1. The thereby used parameter range_descriptor may carry information about the time period requested. The information about the period requested is contained in the parameters from_value and to_value of the range_descriptor. Both values must be formatted as data type date_time. Note that the values of second and hundredths of second that are part of this data typ will be ignored for this purpose. One or both of these date_time values might be replaced by (octet string[12])FF16,...,FF16 to characterise these values as unspecified. Any request of a certain captured object (column) will be ignored by the server.

6.5.9 Billing period counter


The billing period counter value is the total number of the performed resets (cumulations). Note that according to the VDEW-Specifications 2.1.2 this value is alway expressed as a mod 100 value. Therefore the value 99 for this register is followed by the value 0 when a reset (cumulation) is performed.

6.6 Reading and writing data objects via DLMS


6.6.1 Reading data
The number of seperate readRequests in one single APDU is limited to a maximum of 32. Any attempt to address more than 32 data objects in a single readRequest-APDU will be rejected by the meter. Any readRequest-APDU may contain separate readRequests with or without selective access in arbitrary order without any restrictions. Note that a readRequest-APDU including one or more requests which use selective access might excess the maximum receive PDU size of the server (see 5.1.4 Maximum receive PDU sizes).

14 DLMS Implementation guide

6.6.2 Writing data


Writing the following data objects respectively using the following methods is possible via DLMS:
-

direct setting of time/date (see 6.5.4 Date/time information (meter clock)) synchronisation of time/date (see 6.5.4 Date/time information (meter clock)) meter identifications (see 6.5.3 Additional (static) data and data administrated by the user) baud rate (see 4.2 HDLC Protocol Parameters / Parameter negotiation) HDLC timeout parameters (see 4.2 HDLC Protocol Parameters / Parameter negotiation) HDLC device addresses (see 4.1 HDLC Addressing) user password (see 5.2 Access levels and password protection) performing a reset (cumulation) (see 6.5.6 Historical values (performing a reset/cumulation))

Note that only one SN may be addressed in each writeRequest-APDU. Any attempt to write more than one data object in a single writeRequest-APDU will be rejected. Writing data to the meter via DLMS is only possible on the service access level. Thus no data can be written to the meter without knowing the required password for this level. (See 5.2 Access levels and password protection for further details.) No configuration data (e.g. registration periods, tariff information, DST information, or OBIS codes) can be written via DLMS to the meter.

6.7 Static and dynamic meter data general recommendations


When using DLMS, it is possible and recommendable to distinguish easily between static and dynamic data respectively attributes. Static attributes are those attributes, which are not updated by the meter itself (for example configuration data). Whereas dynamic attributes carry a process value, which is updated by the meter itself. Thus it is possible to optimise the client implementation by reading static attributes only once from the meter for each configuration. These attributes may be stored then by the client system to have faster access to these data when they are needed. For the LZQJ DLMS implementation, only the following attributes may be dynamic. All other attributes are static and thus may only be changed by a reconfiguration of the meter. IC Register Extended register Profile generic Clock Attribute a) value a) value b) status c) capture_time a) buffer b) entries_in_use a) time b) status

A reconfiguration of the meter may be easily detected by the client by reading the complete checksum (OBIS 0-0:96.90.255*255, SN 0x0090) directly after each connection establishment. This checksum does only change if a reconfiguration of the meter is performed.

DLMS Implementation guide 15

Appendix
A.1 Available data objects
Important note: The data objects given in this list represent the maximum extent of DLMS objects available. The occurence of some of these objects and some of the used OBIS codes are affected by the configuration of the meter. According to IEC 62056-62, the effectively available data objects and their associated OBIS codes for a particular meter configuration are listed in the Association SN IC (IC id 12). It is strongly recommended to read this object list after each reconfiguration of the meter. #
1 2 3 4 5 6 7 8 ... ... 53 54 55

SN
0x0000 0x0040 0x0050 0x0060 0x0070 0x0090 0x0100 0x0130 ... ... 0x09A0 0x09D0 0x0A00

IC id
1 1 1 1 1 1 3 3 3 3 3 3 4

OBIS
A 0 0 0 0 0 0 1 1 1 1 1 1 1 B 0 0 0 0 0 0 5 ... ... ... ... ... 1 C D E F

Meaning

56 ... ... 85 86 87

0x0A40 ... ... 0x1180 0x11C0 0x1200

4 4 4 4 4 3

1 1 1 1 1 1

... ... ... ... ... 1

88

0x1230

3 3 3 3 3 3

1 1 1 1 1 1

... ... ... ... ... 1

... ... ... ... 117 0x17A0 118 0x17D0 119 0x1800

120 0x1830 ... ... ... ... 149 0x1DA0 150 0x1DD0 151 0x1E00

3 3 3 3 3 3

1 1 1 1 1 1

... ... ... ... ... 1

152 0x1E30

...

199 254 254 255 EMH internal control register (manufacturer [EMH] specific OBIS code) 96 90 0 255 checksum PAR (manufacturer [EMH] specific OBIS code) 96 90 1 255 checksum SET (manufacturer [EMH] specific OBIS code) 96 90 2 255 checksum ROM (manufacturer [EMH] specific OBIS code) 96 90 3 255 checksum System (manufacturer [EMH] specific OBIS code) 96 90 255 255 complete checksum (manufacturer [EMH] specific OBIS code) 3 8 2 255 energy register (configurable contents according to OBIS code, example: 1-5-3-8-2-255 = channel 5, positive reactive energy, tariff 2) ... ... ... 255 energy register (configurable contents according to OBIS code) ... ... ... 255 ... ... ... ... 255 ... ... ... ... 255 energy register (configurable contents according to OBIS code) ... ... ... 255 energy register (configurable contents according to OBIS code) 1 6 1 255 maximum demand register including timestamp (configurable contents according to OBIS code, example: 1-1-1-6-1-255 = channel 1, positive active energy, tariff 1) ... 6 ... 255 maximum demand register including timestamp (configurable contents according to OBIS code) ... 6 ... 255 ... ... 6 ... 255 ... ... 6 ... 255 maximum demand register including timestamp (configurable contents according to OBIS code) ... 6 ... 255 maximum demand register including timestamp (configurable contents according to OBIS code) 1 2 1 255 cumulative (sum of the reset maximum demand) (configurable contents according to OBIS code, example: 1-1-1-2-1-255 = channel 1, positive active energy, tariff 1) ... 2 ... 255 cumulative (sum of the reset maximum demand) (configurable contents according to OBIS code) ... 2 ... 255 ... ... 2 ... 255 ... ... 2 ... 255 cumulative (sum of the reset maximum demand) (configurable contents according to OBIS code) ... 2 ... 255 cumulative (sum of the reset maximum demand) (configurable contents according to OBIS code) 1 4 1 255 average value of the current measurement period (configurable contents according to OBIS code, example: 1-1-1-4-1-255 = channel 1, positive active energy, tariff 1) ... 4 ... 255 average value of the current measurement period (configurable contents according to OBIS code) ... 4 ... 255 ... ... 4 ... 255 ... ... 4 ... 255 average value of the current measurement period (configurable contents according to OBIS code) ... 4 ... 255 average value of the current measurement period (configurable contents according to OBIS code) 1 5 1 255 average value of the last measurement period (configurable contents according to OBIS code, example: 1-1-1-5-1-255 = channel 1, positive active energy, tariff 1) ... 5 ... 255 average value of the last measurement period (configurable contents according to OBIS code)

16 DLMS Implementation guide

SN

IC id
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 8 7 4

OBIS
A 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 B ... ... ... ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 C ... ... ... ... 97 96 96 96 96 96 96 96 0 94 96 96 1 1 14 32 52 72 31 51 71 21 41 61 1 23 43 63 3 29 49 69 9 33 53 73 13 1 99 1 D 5 5 5 5 97 7 7 7 7 3 4 5 1 49 6 54 36 36 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 0 1 29 E ... ... ... ... 0 0 1 2 3 0 0 0 0 2 0 0 0 90 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 F 255 255 255 255 255 255 255 255 255 255 255 255 255 24 255 255 1 1 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255

Meaning
... ... average value of the last measurement period (configurable contents according to OBIS code) average value of the last measurement period (configurable contents according to OBIS code) error register number of power failure events (all phases) number of power failure events (phase L1) number of power failure events (phase L2) number of power failure events (phase L3) state of input/output control signals state of internal control signals internal operating status billing period counter load profile / log book status register (country [german] specific OBIS code according to VDEW spec. 2.1.2) battery use time counter RCR relay status (manufacturer [EMH] specific OBIS code) active power over limit occurence counter active power over limit occurence counter with monthly reset instantaneous value: frequency instantaneous value: voltage L1 instantaneous value: voltage L2 instantaneous value: voltage L3 instantaneous value: current L1 instantaneous value: current L2 instantaneous value: current L3 instantaneous value: positive active power L1 instantaneous value: positive active power L2 instantaneous value: positive active power L3 instantaneous value: positive active power (all phases) instantaneous value: positive reactive power L1 instantaneous value: positive reactive power L2 instantaneous value: positive reactive power L3 instantaneous value: positive reactive power (all phases) instantaneous value: positive apparent power L1 instantaneous value: positive apparent power L2 instantaneous value: positive apparent power L3 instantaneous value: positive apparent power (all phases) instantaneous value: power factor L1 instantaneous value: power factor L2 instantaneous value: power factor L3 instantaneous value: power factor (all phases) clock (including date and time information) first load profile captured data of first load profile (configurable contents according to OBIS, example: 1-1-1-29-0-255 = positive active power, energy feed) captured data of first load profile (configurable contents according to OBIS) ... ... captured data of first load profile (configurable contents according to OBIS) captured data of first load profile (configurable contents according to OBIS) second load profile captured data of second load profile (configurable contents according to OBIS, example: 1-1-1-5-0-255 = positive active power, average value) captured data of second load profile (configurable contents according to OBIS) ... ...

... ... ... ... 181 0x23A0 182 0x23D0 183 184 185 186 187 188 189 190 191 192 0x4000 0x4030 0x4060 0x4090 0x40C0 0x40F0 0x4120 0x4150 0x4180 0x41B0

193 0x41E0 194 0x4210 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 0x4240 0x4270 0x4A50 0x4A80 0x4AB0 0x4AE0 0x4B40 0x4B70 0x4BA0 0x4C00 0x4C30 0x4C60 0x4C90 0x4CC0 0x4CF0 0x4D20 0x4D50 0x4D80 0x4DB0 0x4DE0 0x4E10 0x4E40 0x4E70 0x4EA0 0x4ED0 0x4F00 0x5000 0x5100

223 0x5140 ... ... ... ... 252 0x5880 253 0x58C0 254 0x6000 255 0x6100

4 4 4 4 4 7 4

1 1 1 1 1 1 1

... ... ... ... ... 0 1

... ... ... ... ... 99 1

... ... ... ... ... 2 5

... ... ... ... ... 0 0

255 255 255 255 255 255 255

256 0x6140 ... ... ... ...

4 4 4

1 1 1

... ... ...

... ... ...

... ... ...

... ... ...

255 255 255

DLMS Implementation guide 17

SN

IC id
4 4 7 7 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 3 3 3 3 23 23 12 17 1

OBIS
A 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 0 0 0 B ... ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 C ... ... 98 99 99 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 96 96 0 0 0 0 0 1 22 22 40 41 42 D ... ... 1 98 200 1 0 0 0 0 0 0 0 0 0 0 2 2 2 2 1 1 8 8 8 4 4 35 0 0 0 0 0 E ... ... 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0 1 2 3 128 128 0 4 5 2 3 0 0 0 0 0 0 F 255 255 126 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 1 255 255 255 255 255 1 255 255 255 255 255

Meaning
captured data of second load profile (configurable contents according to OBIS) captured data of second load profile (configurable contents according to OBIS) historical values operation log book user defined log book (manufacturer [EMH] specific OBIS code) manufacturing number identification register 0 identification register 1 identification register 2 identification register 3 identification register 4 identification register 5 identification register 6 identification register 7 identification register 8 identification register 9 firmware version parameter record number time switch program number RCR program number logical HDLC device address for electrical interface (manufacturer [EMH] specific OBIS code) logical HDLC device address for optical interface (manufacturer [EMH] specific OBIS code) measurement period for maximum demand registers measurement period for first load profile measurement period for second load profile transformer ratio current transformer ratio voltage active power over limit threshold (see also 1-0:1-36-0*1 and 1-0:1-36-90*1) HDLC parameters for electrical interface HDLC parameters for optical interface IC SN association IC SAP assignment logical device name

285 0x6880 286 0x68C0 287 0x7000 288 0x7080 289 0x7100 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 0xC000 0xC010 0xC020 0xC030 0xC040 0xC050 0xC060 0xC070 0xC080 0xC090 0xC0A0 0xC0B0 0xC0F0 0xC100 0xC110 0xC120

306 0xC130 307 308 309 310 311 312 313 314 315 316 317 0xC800 0xC830 0xC860 0xC890 0xC920 0xC950 0xE000 0xE048 0xFA00 0xFC00 0xFD00

18 DLMS Implementation guide

A.2 Example of data reading and writing


Assumptions for this example: server address = 0x10 client address = 0x20 Access to the service level (password protection). Negotiation of the client_max_receive_pdu_size HDC parameter. Notation: --> data from client to server (request) <-- data from server to client (response)

--> SNRM including proposed parameter (client_max_receive_pdu_size=240) --> 0x7E, 0xA0, 0x0F, 0x21, 0x41, 0x93, 0x01, 0x37, 0x81, 0x80, 0x03, 0x06, 0x01, 0xF0, 0xEC, 0x15, 0x7E <-- UA including negotiated parameters <-- 0x7E, 0xA0, 0x1E, 0x41, 0x21, 0x73, 0x0D, 0x6F, 0x81, 0x80, 0x12, 0x05, 0x01, 0xF0, 0x06, 0x01, 0x80, 0x07, 0x04, 0x00, 0x00, 0x00, 0x01, 0x08, 0x04, 0x00, 0x00, 0x00, 0x01, 0xD8, 0x47, 0x7E Comment: HDLC-Connection established succesfully --> AARQ (access on service level, password=00000000) --> 0x7E, 0xA0, 0x44, 0x21, 0x41, 0x10, 0x30, 0x57, 0xE6, 0x07, 0x60, 0x85, 0x74, 0x05, 0x08, 0x01, 0x02, 0x8A, 0x74, 0x05, 0x08, 0x02, 0x01, 0xAC, 0x0A, 0x80, 0x08, 0x30, 0xBE, 0x10, 0x04, 0x0E, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xED, 0x8C, 0x7E <-- AARE (establishment of COSEM-connection acknowledged) <-- 0x7E, 0xA0, 0x37, 0x41, 0x21, 0x30, 0xA2, 0x69, 0xE6, 0x07, 0x60, 0x85, 0x74, 0x05, 0x08, 0x01, 0x02, 0xA2, 0x03, 0x02, 0x01, 0x00, 0xBE, 0x10, 0x04, 0x0E, 0x08, 0x00, 0x00, 0x00, 0xC8, 0xFA, 0x00, 0xDD, 0x72, 0x7E Comment: COSEM-Connection established succesfully

0xE6, 0x02, 0x30, 0x06,

0x00, 0x07, 0x30, 0x5F,

0x60, 0x80, 0x30, 0x1F,

0x36, 0x8B, 0x30, 0x04,

0xA1, 0x07, 0x30, 0x00,

0x09, 0x60, 0x30, 0x18,

0x06, 0x85, 0x30, 0x00,

0xE7, 0x00, 0x61, 0x29, 0xA1, 0x09, 0x06, 0x03, 0x02, 0x01, 0x00, 0xA3, 0x05, 0xA1, 0x00, 0x06, 0x5F, 0x1F, 0x04, 0x00, 0x18,

--> Read-Request (attribute "time" of IC 8 "clock") --> 0x7E, 0xA0, 0x11, 0x21, 0x41, 0x32, 0x61, 0xEE, 0xE6, 0xE6, 0x00, 0x05, 0x01, 0x02, 0x4F, 0x08, 0xCE, 0xDA, 0x7E <-- Read-Response (date: 2006-02-28, time: 09:55:35.00, deviation to UTC: +60min, daylight saving time not active) <-- 0x7E, 0xA0, 0x1D, 0x41, 0x21, 0x52, 0x4B, 0x7A, 0xE6, 0xE7, 0x00, 0x0C, 0x01, 0x00, 0x09, 0x0C, 0x07, 0xD6, 0x02, 0x1C, 0x02, 0x09, 0x37, 0x23, 0xFF, 0x00, 0x3C, 0x00, 0xCB, 0xED, 0x7E Comment: Read-Request answered successfully --> Write-Request (attribute "time" of IC 8 "clock", date: 2006-02-28, time: 10:55:35.00, deviation to UTC: +60min, daylight saving time not active) --> 0x7E, 0xA0, 0x20, 0x21, 0x41, 0x54, 0x18, 0xB8, 0xE6, 0xE6, 0x00, 0x06, 0x01, 0x02, 0x4F, 0x08, 0x01, 0x09, 0x0C, 0x07, 0xD6, 0x02, 0x1C, 0x02, 0x0A, 0x37, 0x23, 0xFF, 0x00, 0x3C, 0x00, 0x65, 0xDB, 0x7E <-- Write-Response (Write-Request acknowledged) <-- 0x7E, 0xA0, 0x0F, 0x41, 0x21, 0x74, 0xA8, 0xC4, 0xE6, 0xE7, 0x00, 0x0D, 0x01, 0x00, 0x07, 0xE4, 0x7E Comment: Write-Request answered successfully --> DISC --> 0x7E, 0xA0, 0x07, 0x21, 0x21, 0x53, 0x80, 0x71, 0x7E <-- UA <-- 0x7E, 0xA0, 0x07, 0x21, 0x21, 0x73, 0x82, 0x50, 0x7E Comment: Abort of COSEM-Connection and HDLC-Connection acknowledged

DLMS Implementation guide 19

Вам также может понравиться