Translated Dlms
Short Description
Download Translated Dlms...
Description
DLMS Power Meter protocol analyzer (2003626) This article is for IEC62056 protocol suite that DLMS protocol suite Chinese instruction manual. This document does not contain all the DLMS protocol suite, but the interpretation of the application which may arise in most cases. The purpose of this paper is to provide electric energy data collection terminal with the use of DLMS protocol suite meter communication protocol description. Herein by reference as follows: (1)(2)DLMS User COSEM Identification System Interface Objects, Third Editionreading,and IEC62056 53 Association,andElectricity meteringData exchange for meter tariffload controlPart 53:controlPart COSEM application layer
46: IEC62056 Electricity metering exchange for meter reading, tariff and loadData 46 layerDatalinkusing HDLC protocol (3) IEC62056 (4)42 Electricity metering Data exchange meter reading, tariff loadandfor 42:connectionoriented Physical layer forandservicesprocedures controlPart asynchronous data exchange (5) IEC62056 61 Electricity metering Data exchange for meter reading, tariff and load controlPart 61: Object identification system(OBIS)(6) Amber logical deviceTECH_SPEC MANAGEMENT_LOGICAL_DEVICEManagementFR: AMBER / FW (7)Amber Electricity Logical Device AMBER / FW TECH_SPEC ELECTRICITY_LOGICAL_DEVICE FR: A Layman's Guide to a Subset BER, DERJr.Revised1,(9)
An RSA Laboratories Technical Note (8)of ASN.1,andBurton S. KaliskiNovember 1993 IEC61334 Distribution automation using distribution line carrier, translation assembly .
1.
This paper is structured as DLMS protocol family complexity, this will inevitably lead to lengthy, involving more content. Here it is necessary to put the contents of this article, do a review, and explain the relationship between the various parts. One, DLMS Association analyzer model: the overall presentation DLMS protocol. Two, DLMS physical layer protocols: about DLMS physical layer protocol suite in the entire role. Three, DLMS link layer protocols: HDLC link layer protocols describe the entire protocol suite role. Four, DLMS application layer protocol: tell application layer protocol DLMS protocol suite in the entire role. This section also includes the following sections content. (A,) ASN.1 Syntax: This syntax is used to describe the applicationlayer protocol frame DLMS the composition. (Two,) BER encoding and AXDR Coding: coding is used to achieve these two ASN.1 syntax. (Three,) AARQ with AARE data frames: These are two special data frame, which is used to build the DLMS protocolin clientside and serverside application layer connections. (IV) Data Request Process Description: introduction request data is used when a data frame. Fifth, the requested data Example: Here provides several practical examples request data packet messages. 1. Requestpower 2. Request instantaneousquantity (voltage, current, power) 3. requestload 4. request time
acurve,DLMS cometer
modeldiagram describes the overall cometer model DLMS.
Association instrument is divided into three layers, the physical layer, link layer, the application layer. Between layers using the specified service communications. Communication between the parties using ClientServer architecture, data requester (acquisition) for the Client, the data provider side (meters) to Server. Communications Process Create ● Description:the physical layer connection Physical layer communications model at the bottom. DLMS protocol can be created in a variety of physical layer, physical layer is mainly to do with the operation of the underlying communications hardware to do (such as PSTN MODEM initialization, open, close.) ● link layer connection established Physical layerconnection is established, The first step is to establish data communication connection to the link layer, the link layer is primarily responsible Responsible for the reliability of data transmission, including the following aspects, address check, frame length check, the data of the CRC checksum.Long data frames unpacking group package. Simultaneously to the application layer provides services link transmission. ● Application layer connection established link layer connection is established, the instrument should be established Association DLMS application layer connection before data communication. The application layer connection establishment process is called Negotioation. This process is provided for the data communication configuration parameters. Application layer connection request initiated by the Client side, Clientsidehair aarq frame, Serverside response aare frame ● for data communication when connection was established after the data communication can be carried out. ClientServerside request frame to send data to a data response. Client different data in the request, to use specific data unique class id and OBIS, to identify the different types of data. ● Data communications over, release link, unlink. After the data communication, send the link end frame, the end of the first communication process. After a data communication, you can send the link end frame, the end of a communication process. Also, do not send any data frames, relying on the server side timeout disconnection mechanism to end a communication process. Should generally use the former. ● Relieve the physical layer connection is
closed physical port (such as hang up Modem). From the physical end of the first communication. Two, DLMS physical layer protocol physical layer protocol DLMS protocol suite is located in the bottom, is responsible for the physical transfer of data communications. DLMS can operate in a variety of physical media (PSTN, Internet, serial channels, etc.). The physical layer of the receiving data link layer, to the physical medium, transmitted to the communication peer. Or receive traffic on the client sends more data are then transmitted to the link layer protocol processing for higherlevel data. DLMS physical layer protocol, the main provisions of the physical layer should be implemented services, such as: open ports, initialize port, send data, close the ports. In a typical embedded systems (such as electrical energy collection device), the physical layer corresponds to the underlying system drive section. This part of the communication protocol is generally not controlled. Therefore, without affecting the protocol functions to achieve the premise, this article will not discuss the specific physical layer services. Three, DLMS protocol link layer above the physical layer is the link layer, link layer is the physical layer and the application layer communication channel. DLMS link layer using HDLC speed link control protocol.
Link layer composition: the link layer is composed of two sublayers, i.e. the LLC sub layer and a MAC sublayer. (A), LLC sublayer (Logical Link Control sublayer) is the function of this layer of the MAC sublayer data is forwarded to the application layer, the application layer or the data transmitted to the MAC sublayer. LLC sublayer of the data is only as a forward rather than make a deal. The importance of the existence of that link to the application layer provides transport services (from the link layer to receive or transmit data). Specific to the data communication, the clientside application layer data sent, to add LLC header0xe6,(0xe6,0x00),serverside application layer to send data to add LLC header (0xe6, 0xe7,0x00). Since LLC sublayer link transmission service implementation, you can not DLMS protocol restrictions implemented by the application. Therefore, this article does not specify the LLC sublayer
variety of services. (Two), MAC sublayer (MAC sublayer) MAC sublayer of the data link layer is responsible for transmission reliability, including the address checking, data CRC checksum, length of the data frame packing unpacking and so on. These efforts are essential for data communications, MAC sublayer functional description will focus on the following. 1. HDLC frame format 1. does not contain information on the application layer data 0x7e
frame type and destination source control data frame check 0x7e frame size address field address field domain 0x7etwo HDLC data frame is fixed header and frame end, the chain between two 0x7e user data. 2. Contains applicationlayer datainformation
0x7e
frame type and frame length
destinatio n address field
source address field
contr ol domai n
header checksu m
LLC heade r
user datainform ation
data frame check
0x7e
and data do not contain information on the application layer data frame compared to three more here Item: header checksum: To enhance the reliability of communication, but also on the header data plus the CRC. Header includes the following fields: frame type and frame length, destination address field, source address field, and the Control Domain LLC header: user data before you add0xe6, 0xe6, 0x00or0xe6, 0xe7,0x00. User data: data processed by the application layer. Note:For data integrity reasons,the maximum length of the user data information, the default is 128 bytes. If you want more bytes that can SNRM data frame protocol. 2. Frame type field and the 'S' bit frame type and the frame length field, and a total of two bytes. Reads as Type:
follows:Frame Used to indicate the current data frame type. There are many types of HDLC frame, DLMSthe usingFrame Type 3. Frame Type constant of A (1010). S: (segmentation Bit) This field is only one, it is used to illustrate whether the data frame is divided. In the long dataframe transmission to be used to this one. Long data frame transmission will be explained later. Frame Length Subfield: This field is used to describe the current data frame length (in bytes, not including the two 0x7e) 3. Address Resolution Address field is divided into two parts. Destination address field and the source address field. For the client side, the destination address for the server's address, the source address is the address of client. For the correct server good contrast. (1) extended addressing technical HDLC using extended addressing techniques, namely the one least significant bit of the address byte as zero, it indicates that the address field is not over, there is a subsequent bytes of the address part of the domain. If an address byte least significant bit is 1, it indicates that the address field has ended, no subsequent bytes. (2) address structure lientCside address is always one byte, asextended addressing the use of
technology, the lowest position 1, so the clientsideaddress only 128. Serverside in order to achieve a physical address corresponding to the logical address, the address is divided into two partsupper HDLC Address Used to describe the logical address,lower HDLC addressused to describe the physical address. Upper address should always be some, lower address in the case of not recognized, may not occur.(Sl7000meter two sections address arenecessary). Serverside address using the extended addressing techniques, and it is not infinitely long (although in theory, but in practice there is a cap on). Serverside address structure can be used as byte: follows:One only the upper HDLC address is present. A byte: only appear HDLC high a byte address.
Two bytes: one occurs only HDLC High byte address, and HDLC low a byte address.
Four bytes: two bytes appear only HDLC address the high and loworder two bytes HDLC address
for SL7000 meter, tested only four bytes sever address structure is available. (3)special addresses there are some addresses aredefined as reserved HDLC address. Among the more important is the broadcast address. For SL7000 meter, in practice feasible address structure is a onebyte client side, serverside four bytes. For DLMS protocol family is using the address structure can be any one of, and support for special address.
4.
Frame control word frame control word field is primarily responsible for communications in the frame count, and special data frame identification. Frame Control Word field structure is as follows: corresponding items are explained as follows: RRR:as a received frame count. SSS: to send the frame count. Note: The frame count explanation at the link layer connection is established, the first request for data (at the client, including the transmission AARQ) RRR is set to 0, SSS is set to 0. Server client receives this frame data, return data response RRR of 1, SSS is 0. Client data is requested again RRR plus 1, SSS plus 1. Server client receives this frame data, return data response RRR plus a (a 2), SSS plus 1. Repeat this until the client gets all the data so far. The data transfer process in the I data frame request and response. To note here is thatend of the data in the request even after theand then send RR frames received confirmation. DISC frame can then send the link ends. Client sidein which of the RR framethe frame count bit RRR Simply client's frame count bit RRR obtained by adding 1. The following diagram depicts the process of change frame count F:
bit:P / poll / final bit. Poll bit: sent by the client, serverside set that response, set to 0 indicates no response. final bit: sent by the server, set to 1 indicates the end of a data frame transmission, set 0:00 indicates yet been transmitted. final bit only in the communications window (window size) is greater than 1 in the case before meaningful.In the window size = 1 when returned by the serverside data frame this one is always set to 1. (On the window size will "establish a link layer connection," explained)
several different data frames were applied on different occasions, the following figure shows several requests and responses corresponding to the situation.
I: Information transmission frame RR:ready to receive data frames (used to indicate ready to receive the next frame data) RNR: Receive not ready (receive not ready). Equivalent to other communication protocols busy frames. SNRM: Set the corresponding normal data frames. Used to establish a link layer connection. UA: SNRM and DISC on the response frame. DISC: End link frame. DM: The response on the DISC frame. (Disconnected mode) UI: can be used to maintain the link, the data frame transmission, the link control has no effect. FRMR: rejected frame (Frame reject), for some reason rejected due to uncertainty of the received data frame.
5.
Long data frame transmission,in many cases, the data can not be in a request and a response, in relation to end the data transmission process (subject to no more than 128 bytes of user data bytes). Then it is necessary to start the long process of the data link control frames. Note: Requests must be used when the load curve long data frames. When using a long data frame, to the long data frame is divided into short data frames. Then put these short data frames were sent, at the receiving end of these short data frames sequentially processed. This realization of a larger packet, complete transfer to the receiving end. The data frame is split, the frame type and frame length field 'S' bit will be set. When the receiver detects this bit is set, you know that the data frame has been split, this time to make the right split data frame accordingly. The following diagram describes the long process of sending and receiving data frames:
clientside data by sending an RR frame to request data frame is split the rest. 6. frame check data HDLCusing the 16bit CRC. The polynomial used is: the realization of specific procedures, refer to English Reference IEC62056 46 Appendix A. (Three), the link layer connection establishment, and disconnect (1) to establish a connection link layer before starting work, to establish the link layer connection (Association). This step is accomplished by client sends SNRM data frame, serverside data frames UA response indicates connection has been established, serverside response DM data frame indicates that the link is disconnected, the connection is not established.
UA frame configuration parameters often contain link information. 2 link control parameter is the data transmission parameters. WINDOW_SIZE parameter; This parameter describes the communication, the communication between the parties once the number of data frames transmitted. Allow time to send multiple HDLC frame data. MAXIMUM_INFORMATION_FIELD_LENGTH parameter . Maximum length of the information field, this parameter is used to describea data link frame length of the user data. The default values of these two parameters as WINDOW_SIZE 1; default MAXIMUM_INFORMATION_FIELD_LENGTH = default =128 (BYTEs) as specified in the data frame has the following four parameters: transmit maximum information field length receive maximum information field length transmit window size window sizereceive Note: There is no specific format of the data frame is given, but with an example to illustrate how to set the frame. This approach may cause inconvenience to the reader. But in the original text is DLMS statute in this way, so here is still doing so. The following example shows how to establish the /S: /SNRM connection: 7e a0 21 00 22 00 23 03 93 0b 14 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 07 65 5e 7e explained: 7e a0 21 frame type and frame length 00220023 Destination Address 03 Source Address 93 Control word 0b 14 header checksum 81 80 SNRMidentifies 12 group lenth. 05H parameter identifier (maximum information field length transmit)octet)bytes)
01H parameter(128parameter(maximumlength parameter(180Hvalue length 06Hidentifier information field receive)octet)bytes)transmit)octets)value) parameter(128parameter(windowparameter parameter(highparameterparameter01H parameter parameter(180H valuevaluevaluevalue
length
07Hidentifier size, length 04H(4of value00H byte 00H00H
01H byte (windowreceive)(4 octets)value bytevalue)valuevaluevalue (low bytevalue) (low08H identifier size, parameterparameterparameterparameterparameter of parameter04Hlength ofof 00H(high00H00H value) 07H 65 5e data frame check (CRC check) 7e SNRM data frames in the user information may not occur, which means that the client is configured to receive the data server side. / / UA R: 7E A0 21 03 00 22 00 23 73 28 F0 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E explained: 7E / Flag/ / /0xA0 21(type = a: frame type 3, s = 0: end of frame, len = 021: 33 bytes) 03 / source / /address/ // / 22 00 /address0023destination 73control UA 28 F0hcs 81 80 12 06 01 80 07 04 00 00 00 01 08 04 00 00 00 018005 01 / / // // // // /information field /parameter negotiation 81 80 12 05 01 information field80:maximumlength transmit (128 BYTEs) / 06/ // // 01:01: maximum information field length (1)receive /07 01 00 0004 00 00 00 80:(128 BYTEs) transmit window size,(1) 08 04 00 receive window size, 53 3B/ fcs 7E (2) Disconnect Disconnect parameter settings because they are not so much simpler than establishing a connection. Client sends a DISC frame, Serverside UA or DM response indicates disconnected. UA said that after receiving the DISC disconnected. DM that before receiving the DISC is disconnected.
It still gives specific examples of communication: S:7e a0 0a 00 22 00 23 03 53 06 c7 7e explains: 7e a0 0a 00 22 00 23 03 53 / / frame type Disc 06 c7 7e7E R: A0 0A 03 00 22 00 23 1F 43 4C 7E explained: 7E A0 0A 03 00 22 00 23 1F / / frame type DM 43 4C 7E (four), with regard to the transparency of the data link layertransmission 0x7e frame destinatio the contr header LLC user checkda 0x7e type n address source ol checksu heade datainform ta frame and field of address Doma m r ation frame field in length HDLCis a transparent data transmission link layer protocol. User data link layer does not have any relationship with. In the DLMS protocol model, the link layer is responsible for data transmission reliability, application layer processing user data. Link layer to the application layer to provide transparent data transmission channel. Four, DLMS application layer protocol application layer protocol DLMS understand, you need to first establish the following concepts: ASN.1 syntax, BER encoding, AXDR coding. ASN.1 syntax is used to describe the application layer data frame. DLMS protocol is different from some other place where simple communication protocol in this. He is not using some form and to some fixed frame format to describe, but with an abstract syntax of language to describe. This has the advantage that greatly improves the agreement of abstraction and versatility, is conducive to the transplant procedure. BER encoding and AXDR encoding is used to achieve the ASN.1 syntax. In order to achieve the ASN.1 abstract and versatility, this syntax to use special coding to describe. This introduces BER encoding and AXDR coding. The following were explained these items.
(A) ASN.1 syntax for a data described using ASN.1 syntax frames should look like below: Name :: = [tag] IMPLICIT/ EXPLICIT type {nulldata Data
item1 item2 item3 ...}
[0][1] IMPLICITNULL, IMPLICIT/ EXPLICIT [2] IMPLICIT/ EXPLICIT [3]
Data type A1 OPTIONAL Data typeData type A2 OPTIONAL
The following explains the syntax description. Name the name of the data frame. Tagtag consists of two parts class type and a digital Class type has the following four: 1) Universal indicate name defined data frame in all applications is the meaning of DLMS unique. 2) Application name defines a data frame shows the meaning of the specific application of the same. 3) Private indicate name defines a data frame is only at a manufacturer's custom range. 4) Contextspecific data frame shows the same name defined in the context of the meaning of the data items. This type of data in different structures may have different meanings. Tag of the figures as a label of this data frame exists, it is used as a handle to the data frame inthe application data unit. the current data frame (referred to as subdata frame) may be derived from a data frame (called the parent dataframe), this field is used to describe the subdata frames between frames with the parent data. IMPLICIT: changing the parent data frame Tag. EXPLICIT: Do not change the parent data frame Tag. not markedIMPLICITEntry isEXPLICIT. Data type the type of data describing the dataframe.Data types are divided into simple and complex type. Most data types canfrom the be seenname of its type. Listed below are several, complete set of data types, see Appendix. IMPLICIT/ EXPLICIT
Type Tag number Tag number (decimal) (hexadecimal) INTEGER 2 02 BIT 3 03STRING STRINGOCTET4 04 NULL 5 05 OBJECT IDENTIFIER 6 06 SEQUENCE SEQUENCE 10andOF16 andOFSETSET17 11 PrintableString 19 13 T61String 20 14 16IA5String 22 UTCTime 23 17 "{}" the content of braces, namely data frame data items. The number after each data item number, namely,the the identity ofdata item (tag). Each data item may be a composite of another data frame. That is, a data frame is usually a combination of other data frames. OPTIONAL This keyword describes the data items in the user considers necessary occasions
can be omitted.
Two of the more importantcomplex typeSEQUENCEandCHOICE Example explained SEQUENCE: 1) below: the contents of the data frame order.Below to illustrate theSEQUENCEtype. :: = SEQUENCE {invokeidandpriority GetRequestNormal InvokeIdAndPriority,CosemAttributeDescriptor, cosemattributedescriptor SelectiveAccessDescriptor accessselectionparameters OPTIONAL} This is commonly used in the request data is a data frame.SEQUENCEindicates that the data content of the frame is arranged in order. 2)CHOICE: choose the type, i.e., it indicates that the current data frame is a data frame from a few select aas the current framedata type. Below to illustrate theCHOICEtype. :: ={getrequestnormal CHOICE GETRequest GETRequest getrequestwithlist
[1][2][3] IMPLICITIMPLICITIMPLICIT getrequestnext GetRequestNormal,GetRequestNext, GetRequestWithList}
frame only One can fill three choices. ASN.1 syntax above brief introduction by the syntax description of the various data frames, all given in the appendix. These sorts of data frames will constitute DLMS protocol Client Server application layer interacts with the language used. Readers who have incomprehension ASN.1 syntax, see this article in English References [7] (two) BER encodedencoding and AXDR ASN.1just a grammar, take it writes the data frame, it is necessary convert it to a data byte. This would be one kind of (actually two kinds) coding to achieve this syntax. So he introduced the BER encoding and AXDR coding. In the DLMS DLMS protocol described using ASN.1, BER encoding used to achieve; using ASN.1 descriptions XDLMS agreement with AXDR Coding. Note: DLMS AARQ the AARE only part of the data frame using the DLMS protocol. Most application layer data communication with XDLMS. Here does not intend to make DLMS and XDLMS division and explain specific explanation can be found in English References [2]. Here just know that these two protocols use different encoding. 1 BER encoding detailed syntax see Appendix. The BER encoded using the following general structure, wherein the data content portion of another BER coding structure can be nested: data identification
data length
data content
data length, and data content can know the contents from the name. Here it is necessary to explain the composition data identification: A BER BER data identifier and a data length of a 16bit bit string: bit15(bit15, bit0 datatype classes14)
Data type(bit13)
data length(bit12bit0)
1)datatype classes field: This field is used for ASN.1 syntax class type coding Universal Application Contextspecific Private
(00)(01)(10)(11)
2)Data typefield: Used to describe the data structure of the content Primitive (0) simple type Constructed (1) complex type (array or structure) 3)data lengthfield: Used to describe the data content length (in bytes).
Below the received data frame AARE example: AARE data frame Syntax Description: :: IMPLICIT SEQUENCE[APPLICATION 1][61H]= [ [APPLICATION= 1]== [97] {protocolversion AAREapdu 0] IMPLICIT BIT STRING {version1 (0)} DEFAULT {version1}, applicationcontextname [1] [2] resultAssociationresult,resultsourcediagnostic Applicationcontextname, respondingAPtitleAPtitlerespondingAEqualifier [3] [4] OPTIONAL,Associatesourcediagnostic, [5] [6] following OPTIONAL,OPTIONAL,OPTIONAL, AEqualifierrespondingAPinvocationidAPinvocationidentifierrespondingAEinvocationidAEinvoca tionidentifier [7] Thefield shall not be kernel OPTIONAL,Thefollowingonlypresent ifselected. theresponderacserequirementsACSErequirementsthemechanismname is[8] IMPLICIT is present if only used. field shallbeauthentication functional unit [9] IMPLICIT followingisRespondingauthenticationvalue OPTIONAL, Thefield shall only be present if the functional unit selected. mechanismnameauthentication EXPLICIT [29]implementationdata associationinformation OPTIONAL,OPTIONAL,OPTIONAL} authenticationvalueimplementationinformationuserinformation [10] IMPLICIT IMPLICIT[30]
AARE BER encoding of the data frame and AXDR Coding: 61 / / AARE tag 42 / AARE len/ /COSEM_Application_Context_Name/ / /A1tag of 09 06 IDENTIFIERis an
data length / /(OBJECT IDENTIFIER, Universal) OBJECT / / ASN.1 data type / /datalength
07 60857405080101 / /datacontent / / The following data frames can be explained in the same way A2 / / / Tag of / / 03 02 01 0003 02 01 00 /Tag of Associationresult,A3Associatesourcediagnostic 05 A1 88IMPLICIT OPTIONAmechanismnameauthenticationvaluethe 070280 ACSErequirements89 / IMPLICIT / /OPTIONAL/ / 02 0760 85 74 05 0108 /OPTIONALAAEXPLICIT 80080A41 42 43 44 45 46 47 48 BE 04encoding choice for userinformation thethe OCTET (14 octets) (OCTET STRING, Universal)0E / encoding oflength ofSTRING'svalue field / /* The following content is XDLMS with AXDR description * / / /08encoding the tag (explicit tag) of the DLMS CHOICE (FALSE,present)(ASN. 00 / usage flag for component not / / / /
/the 06negotiateddlmsversionnumberthe PDU(InitiateResponse)proposedqualityofservice5F 1Fencoding[APPLICATION 31] tag1 explicit (4) tag)04 / length 'contents' field / / encoding ofofinoctet of/ / encoding oflength /theofthein octet00the numberunused bitsthe finalthe bitstring 00the encoding08 1DfixedBITSTRING value 21 34 / the / / the AXDR encoding of an Unsigned16 is its AXDR: / encoding of an Unsigned16 is its value00 07value.00 07 == LN 2 AXDR This encoding is unix's XDR ( External data identification method) coding extensions. See IEC61334 distribution automation using distribution line carrier, translation compilation, the next book, the sixth section. This article references [9] three two encoding comparison: AXDRencoding, the difference between the BER encoding can be seen from the following example. Encoded on two numbers, and its value as 0x1234, 0x5678 1) with a BER encoding 30 08 0,202, 123,43 4,025, 678 sequence identification sequence length A logo (integer) A word length of the value of A B logo ( integer) Bthe word value ofB
2) AXDR coding 112,345,678 sequence identity valueA is Bthe value of code here is a AXDR instance: Note: ASN.1 syntax here, but the use is still different encoding. ASN.1 syntax Description: (This data frame is a data frame AARQ part) :: ={dedicatedkeyresponseallowedproposedqualityofservice SEQUENCE xDLMSInitiate.request OCTET STRING OPTIONAL,TRUE, BOOLEAN DEFAULT [ IMPLICIT Integer8AXDR OPTIONAL,Unsigned8,Conformance, clientmaxreceivepdusize proposedconformance proposeddlmsversionnumber Unsigned16} 0]Code: 01 dlms puu identified 00 / / usage flag for the dedicatedkey component (FALSE, not present) 00 / responseallowed component (FALSE, default value conveyed) 00/ / usage flag for the proposed /usage flag for the component (FALSE, not present) 06the AXDRofis
qualityofservice / / encodingan Unsigned8 its value 5f / the [APPLICATION 31] tag explicit 04 / / encoding theofthe(4) /encoding(ASN.1tag)length 'contents' field in octet 00 / the number of unused bits in the final octet of the BITSTRING/ / encoding of the// / /encoding of 00 10 fixed length bitstring value. (LNSN) 00 0080 clientmaxreceivepdusizebytes) (128(three)AARQ with AARE data frame with the basic concepts of syntax and coding, the following began to discuss specific DLMS application layer protocol. In the previous model DLMS protocol has been described, during the application layer data communication prior to establishing the link layer connectivity and application layer connections. Link layer connection has been explained in the link layer protocol, following about how to create applicationlayer connection. Application layer connection is established by AARQ client sends data frames, serverside response AARE data frame to achieve. Both the data frame is mainly the application layer data communication configuration parameters. AboutAARQ, AARE:
in the standard application layer connectionoriented service control (ACSE), in order to interact with the service users, ACSE provides many functional units. In COSEM use only two of them:the kernel and the authentication functional units. (A) AARQ, AARE detailed description of the data frame (ASN.1 syntax description): AARQapdu :: = [APPLICATION 0] IMPLICIT SEQUENCE {protocolversion{version1{version1}, applicationcontextnamecalledAPtitleAPtitlecalled (0)} DEFAULT [1] [2]OPTIONAL, Applicationcontextname, [0]
IMPLICIT BIT STRING
AEqualifierAEqualifiercalledAPinvocationidAPinvocationidentifiercalledAEinvocationidAEinvoc ationidentifiercallingAPtitle [3][4][5] OPTIONAL,OPTIONAL,OPTIONAL,
[6] [8] OPTIONAL,OPTIONAL,OPTIONAL, APtitlecallingAEqualifierAEqualifiercallingAPinvocationidcallingAEinvocationidAE [7] APinvocationidentifier [9]invocationidentifierfollowingsenderacserequirementsACSErequirementsfollowing OPTIONAL,OPTIONAL, not kernel Thefield shall only be present ifselected. thethe is [10] IMPLICIT is Thefield shallbe present if only used.authentication functional unit mechanismnamemechanismnamefollowingcallingauthenticationvalueauthenticationvalueimple mentationinformation is[12] IMPLICIT OPTIONAL,OPTIONAL, Thefield shall only be present if the functional unit selected. authentication EXPLICIT [11]IMPLICIT[29]implementationdatauserinformationassociationinformationAAREapdu{protocolve rsion OPTIONAL,OPTIONAL}{version1}, [APPLICATION 1]IMPLICIT[0]IMPLICIT (0)} [30] IMPLICIT :: = SEQUENCE {version1 BIT STRING DEFAULT applicationcontextname [1] [2]
resultAssociationresult,resultsourcediagnostic Applicationcontextname, respondingAPtitleAPtitlerespondingAEqualifier [3] [4] OPTIONAL,Associatesourcediagnostic, [5] [6] following OPTIONAL,OPTIONAL,OPTIONAL, AEqualifierrespondingAPinvocationidAPinvocationidentifierrespondingAEinvocationidAEinvoca tionidentifier [7] Thefield shall not be kernel OPTIONAL,Thefollowingonlypresent ifselected. theresponderacserequirementsACSErequirementsthemechanismname is[8] IMPLICIT is present if only used. field shallbeauthentication functional unit [9] IMPLICIT followingisRespondingauthenticationvalue OPTIONAL, Thefield shall only be present if the functional unit selected. mechanismnameauthentication EXPLICIT [29]implementationdata associationinformation OPTIONAL,OPTIONAL,OPTIONAL} authenticationvalueimplementationinformationuserinformation [10] IMPLICIT IMPLICIT[30]
are marked asOPTIONAL,items when they were in the composition of the data frame can be omitted The. But there are a few exceptions: 1. userinformationcarrying XDLMS information (XDLMS will be explained later), can never be omitted. 2. Server side declared as identity verification (request password), then AARQ themechanismname,senderacserequirements,callingauthenticationvalue,AARE in theresponderacserequiremenmechanismname, t,responding authenticationvalue is not to be omitted. If you omit these items, the requested data will be rejected. (B)AARQ, AARE the interpretation of the data protocolversion: 1 AARQ frame: the ACSE protocolversion. Use the default value does not appear in the dataframe. applicationcontexname:This is a must item for the current usage of this value is unique.(0x0x0x0x0x0x0x60 85 74 05 08 0101, do not explain the specific meaning can be found in IEC6205653 The7.3.7.1)acse sender and responderrequirements: Specify whether to use the ACSE authentication function (request data, etc.), using BER bit string encoded using only BIT0 bit. This bit is that the use of authentication function case:acserequirementssenderacserequirements 8a / tag for the field component IMPLICIT, Contextspecific)/ // / the component /02Len the([10],(ACSErequirements:: = BIT STRING(0). BIT 07 / the number unused bits in the last byte of the/ /of the STRING)/of80encodingauthentication functional unit Highest position a rest for unused bits. mechanismname:used to indicate in what Authentication. There are four kinds. calling and authentication value: Pointed Authentication values (ie password). userinformation: Content isxDLMSInitiate.requestPDU,xDLMSInitiate.requestcontent below. :: ={dedicatedkeyresponseallowedproposedqualityofserviceproposeddlmsversionnumberpropo sedconformance SEQUENCE xDLMSInitiate.request OCTET STRING OPTIONAL,OPTIONAL,TRUE,Unsigned8, BOOLEAN DEFAULT [0] IMPLICIT Integer8 Conformance, clientmaxreceivepdusize Unsigned16} The following were explainedxDLMSInitiate.requestvarious
dedicatedkey: elements:indicate whether the data is encrypted (ciphering). Usually do not. responseallowed: whether to allow the response. Usually allows. proposedqualityofservice: usually do not. proposeddlmsversionnumber: currently 6 proposedconformance: This is the main part, describing the need to provide XDLMS serverside service types and species.
It is a 24 bit string, as shown above, each one represents a service, specifically explained as Attibute_0(Bit_08)(Bit_09)Attibute_0 follows: SET not is supported referencing withis supported is Priority Management referencing withsupportedGET(Bit_10)(Bit_11)(Bit_12)(Bit_13)(Bit_14)(GET, Block Transfer withservicesupportedBlock Transfer withservicesupportedsupported Block Transfer with theservice is the theSET isACTIONis supportedMultiple references are GETSETAll LN services ACTION, EVENT are 20, 22, 23)issupported (Bit_21) ,NOTIFICATION)supported (Bit_19,Selective Access feature a variety of services provided here, for the collector meter, the most important thing for the collector service isGET service,the read data. Normally this bit string of 24 bits is defined as 0x00, 0x00, 0x10 can. LN services that use only the GET service. client clientmaxreceivepdusize:side receiving data at the maximum limit. Set to 0x0000 indicates that using the default settings, the application layer data unit for a maximum of 128 bytes. Example: The following is the longest data unit received an R: 7E A8 8C 03 00 22 00 23 BA 88 4D / / HDLC header 00 00 00 02 02 0F 00 16 1E 02 03 09 06 01 01 3E 08 00 FF 06 00 00 00 02 00 0202000002 02 0F 00 16 1E 020000 0002 02 0F 00 00020F16 1E03 09 06 01 0108FF 064B 09 7403 09 06 01 01 17 08FF 067E 7216 20 02 03 09 06 01 01 2B 08 00 FF 06 00 00 01 2C 02 02 0F 00 16 20 02 03 09 06 01 01 3F 08 00 FF 06 00 00 00 00 02 02 0F 00 16 20 02 03 09 06 01 01 03 08 00 FF 06 00 00 7F / /application layer data unit 128 bytes 2A EA 7E / / HDLC frame end (IMPORTANTimplementations,(5F) For compliance with existing encoding [Application 31] tag on one byte of of theinsteadtwo bytes (5F is accepted when the connectionoriented, HDLC based profile is used.)protocolversion:1F)
●
AARE 3layer, I.e. ACSE protocolversion. Use the default value does not appear in the dataframe. result: ClientServer client connection requests for the results of response resultsourcediagnostics: ClientServerside connection request rejected, the reasons given here. applicationcontextname: WithAARQ responding authentication value: WithAARQ userinformation: Content isxDLMSInitiate.rexDLMSInitiate.responsesponse PDU,readsfollows. as :: = SEQUENCE negotiateddlmsversionnumbernegotiatedconformanceservermaxreceivepdusize {negotiatedqualityofservice
xDLMSInitiate.response Unsigned8,Conformance,Unsigned16,
[0] IMPLICIT Integer8
OPTIONAL, vaa name ObjectName}
The following were explainedxDLMSInitiate. responseof various negotiatedqualityofservice: elements:
correspondsxDLMSInitiate.requesttheproposedqualityofservice, usually do not. negotiateddlmsversionnumber:correspondingxDLMSInitiate.request the proposeddlmsversionnumber,is currently 6 negotiatedconformance: Here is the serverside for clientside request XDLMS service response. If you allow client to client's request, on the corresponding position 1. Bit string model with xDLMSInitiate.request Theconformancesame serverside servermaxreceivepdusize: application data unit can receive the maximum limit. For the collector is concerned,usually not very long to the server sends data frames. vaaname: This is currently useless, serverside only respond to a default value of 0x0007. 3 other items AARQ, AAREdata frame labeledotherOPTIONALitems that can not appear in the data frame, if once appeared at the client , while no corresponding serverside processing, the server side will skip these items, without treatment, without affecting the connection establishment. Four examples given here a AARQ, AARE communication example.
/ / Aarq S: 7e a0 47 00 22 00 23 03 10 d0 5e e6 e6 00 60 36 a1 09 06 07 60 85 74 05 08 01 01 8a 02 07 80 8b 07 60 85 74 05 08 02 01 ac 0a 80 08 41 42 43 44 45 46 47 48 be 10 04 0e 01 00 00 00 06 5f 1f 04 00 00 08 1d 00 00 9a 7a 7e explains: {7e a0 47 // // / 22 00 2300 03 10 d0 5e 00e6 e6 LLC/ // // // // // / {60 /AARQ tag 36lengthlength must be applicationcontextname tag applicationcontextnamea1for componentthethecomponent Thein.the09oftaggedvalue field 06 type choice for applicationcontextname IDENTIFIER,(context_idreferncing);important Universal) 07 / Len/ // / data(OBJECT/60 85 74 05 08 01 01 = 1; means LN COMMENT by DL: The mostpart of this / that it chooses LN referencing or SN / /the senderacserequirements/ /thethe applicationcontextname
/referencing.
component
component,
encodingacserequirementsfield component ([ isencoding field8atag for (tagged[10]10], IMPLICIT, senderacserequirements(ACSErequirementsSTRING) 02 / Len / // // Contextspecific)/the component :: = theofthethe BIT STRING BIT 07number unused bits inlast byte of 80 encoding authentication functional unit / / encoding(tagged[11])/ /([11],Contextspecific)/ / (0)mechanismnamecomponent component mechanismname component /ofthethe 8bthe tag for theIMPLICIT, 07 length tagged component's fieldvalue ofcomponent ofvalue60 85 74 05 08 02 01 /Object Identifier/ // // / the/actag formechanismname([12], Contextspecific) thethethethethe0aLen 80 choice for [0] IMPLICIT information can'tinformation 08 / Len/// / 41 42 43 44 45 46 47 48 theAuthenticationinformation/* ignored. *be (charstringGraphicString)Userbeuser(xDLMS context) 10 / to / /(OCTETUniversal)/ / Lenbytes/ / {04 /(accordingdata type choice for userinformation STRING, 04 Lenbytes)0e= 14 01 00 00 00 06 5f 1f00 00 08 1d 00 00 theoctet the xDLMSInitiate.request{dedicatedkeyresponseallowedproposedqualityofservice / * sequencexDLMSInitiate.request:: = SEQUENCE OCTET STRING TRUE,OPTIONAL, OPTIONAL,BOOLEAN DEFAULT of PDU.
[0] IMPLICIT Integer8
proposeddlmsversionnumberproposedconformanceclientmaxreceivepdusizeclientmaxreceivepd usize0x4B0.the Unsigned8,Conformance, Unsigned16} Theis1200D = / */ / * /01tag ( explicit DLMS PDU CHOICEthepresent)the / / /fordedicatedkey/ / / /responseallowed tag) /dedicatedkey00usage flag component (FALSE, not 00usage flag forcomponent responseallowed of the default value (FALSE,present) / / /proposedqualityofservice/ / proposedqualityofservice (FALSE,conveyed)/proposedqualityofservice00usage flag for thecomponentnot 06 / the Unsigned8 its value / /proposedconformance/ / encoding the/ / encoding theof the /AXDR anis5f 1f[APPLICATION 31] tag (ASN.1 explicit tag)
encoding of04length'contents' field ofofinoctet ofof(LNSN) in octet / the numberunused bitsthe finalthe BITSTRING 00/ / encodingthe// / (4)00 encoding 08 1dfixed length bitstring value. / clientmaxreceive AXDR pdusize 00 / encoding an Unsigned16 its value./}}/ /000000 /* 7e} of9a 7a 7E
theisaare 00R: A0 53 032223 30 40 A6 E6 E761 42 A1 09 06 01 A2 03 01 A3 05 A1 03 02 01 0002 0707 60 85 74 05 08 02 0108 07 60 85 74 05 08 0102008880 89AA 0A 8041 42 43 44 45 46 47 48 BE 10 04 5F 1F 04 00 00 0800000000COSEM_Application_Context_Name06 08 1D 21 3407 72 A4 {7E{A1 7E A0 53 03 002223 30 40 A6 E6 E7 61 / tag/ / AARE/ / /AARE42len 0E 09 06 / Object identifier/ /=/ // // / type =/ /= /=07length07length 60 85 74 05 08 0101 A2Tag of Associationresult, of Associationresult,03Len type 02structure 011 00 / // / /* :: = INTEGERrejectedpermanentrejectedtransienttheresultthe {accepted (1),(2)}(tagged[2]) Associationresult
(0), component component encoding encoding A2tag & length result component ofcomponentresultcomponent for result the03 / the length of the tagged¡¯ s value fieldencoding the/ / encoding the Contextspecific)encoding (INTEGER)(INTEGER, for ([2],/02choiceUniversal)octets)accepted) 01 / length ofresult ¡¯ s field / / encoding ofvalue ofResult // /of /encoding value(100 Associatesourcediagnostic, * ofthethethethe(0,A3Tag 05 / Len /Associatesourcediagnostic{acseserviceusernoreasongiven
A1 03 02 01 00 /* Associatesourcediagnostic:: = CHOICE {null of INTEGER(1),
[1](0), (11), authenticationfailureauthenticationrequired applicationcontextnamenotsupported authenticationmechanismnamenotrecognised(12), (13), authenticationmechanismnamerequired(14) (0), acseserviceprovidernoreasongivennocommonacseversion resultsourcediagnostic INTEGER(2)}} {null },(1),(tagged
(2),
[2] the
encoding component ([3], Contextspecific) [3])A3 / the resultsourcediagnostic component / / encoding thethecomponent/ / encoding the tag for / the05oflength oftagged¡¯ s value field encodingtag forA1 CHOICE ofthethethe (INTEGER)theresultsourcediagnostics (INTEGER the03 / length oftagged component's value fieldencodingcomponent/ / encoding acseserviceuser(1)encoding resultsourcediagnostics / 02choice for octets)0,provided. Universal)01 / length of field (1 / / encoding ofvalue:/ / // / ,/encoding ofvalue00 no diagnostics ignored. * theContents below can be thethe88IMPLICIT ACSErequirements OPTIONAL 0202 0707 8080 89 / IMPLICIT / /authenticationvalueOPTIONAL/ //xDLMS 60 85 74 05 0108 / OPTIONALAAEXPLICIT 0A 08 41 42 43 44 45 46 47 48 User information must be exist. * mechanismname Initiate.response :: = SEQUENCE {negotiatedqualityofservice negotiateddlmsversionnumbernegotiatedconformanceservermaxreceivepdusizevaaname [0] IMPLICIT Integer8 Unsigned8,Conformance,Unsigned16,
OPTIONAL,
ObjectName}for * / // // / BEUser information context)theuserinformation Universal)thethe( 10 {04 /encodingchoice encoding OCTET STRING (xDLMS(OCTETSTRING,0Eoflength of¡¯ s value field octets)xDLMSInitiate.responsetag)(InitiateResponse) 14/ / / encoding thethePDU/ / encoding the encodingPDU08tag (explicit DLMSCHOICE negotiatedqualityofservice / AXDR theofcomponent (FALSE,not present)(Unsigned8,6) not 00 / usage flag for component / /ofnegotiateddlmsversionnumbercomponent (OPTIONAL,present)/the proposedqualityofservice encodingthe value = 06 / negotiateddlmsversionnumber / /the/ /the/ / / conformance block IMPLICIT BITSTRING encoding[APPLICATION 31](ASN.1tag) encoding [APPLICATION 31](SIZE (24))5F 1Ftag explicit 04encodinglength 'contents' field (4)encoding ofofinoctet ofencoding oflengthencoding thethein octet /the numberunused bitsthe finalthe bitstring / /the00/ /the /fixedBITSTRING value 0008 1D ofserver component 0x01F4) AXDRUnsigned16 value component (Unsigned16, value = maxreceivepdusize(Unsigned16, value21 34 / anisits/ /encoding the =/theencoding ofVAAName0x0007 for LN and FA for SN) 0000 0007 / / the AXDR encoding of an Unsigned16 is its value.07 == LN }} 72 A4 7E (four) the necessary data request frame, and response frames at the application layer connection is established, client can request data from the server. Here only two basic data communication frames. All DLMS application data frame isCOSEMpdupart of the followinglisted firstCOSEMpdu. :: =standardizedinitiateRequest readRequest writeRequestinitiateResponse CHOICE { COSEMpdu used in COSEM DLMS PDUsInitiateRequest, DLMS PDUs(no encryption selected30) [1][5][6][8] IMPLICITIMPLICITIMPLICITIMPLICIT ReadRequest,WriteRequest,
readResponseReadResponse, writeResponseWriteResponse, confirmedServiceErrorConfirmedServiceError, unconfirmedWriteRequestUnconfirmedWriteRequest, informationReportRequestInformationReportRequest,aarq InitiateResponse, [12][13][14][22][24] IMPLICITIMPLICITIMPLICITIMPLICIT
two ACSE APDUsAARQapduAAREapdu the aare GETRequest,SETRequest,EVENTNOTIFICATIONRequest, APDUs used for data communication services using LN referencing getrequest setrequest [192][193][194] IMPLICITIMPLICITIMPLICIT , eventnotificationrequest action setresponse ACTIONResponse,glo IMPLICITIMPLICITIMPLICITIMPLICIT requestACTIONRequest,GETResponse,SETResponse, getresponse
[195][196][197][199]
actionresponse global ciphered pdus glosetrequestgloeventnotificationrequestgloactionrequestglo [200][201][202][203] IMPLICIT OCTET IMPLICIT OCTET IMPLICIT OCTET IMPLICIT OCTETSTRING,STRING,STRING,STRING, getrequest
getresponseglosetresponsegloactionresponsededgetrequest [204][205][207][208] IMPLICIT OCTET IMPLICIT OCTET IMPLICIT OCTET IMPLICIT OCTET STRINGSTRING,STRING,STRING,
dedicated ciphered pdus ,STRING,STRING,dedactionRequestSTRING,STRING, dedsetrequestdedeventnotificationrequestdedgetresponseded [209][210][211][212] IMPLICIT OCTET IMPLICIT OCTET IMPLICIT OCTET IMPLICIT OCTET
setresponsededactionresponse IMPLICIT OCTETSTRING,
[213][215] IMPLICIT OCTET
STRING} here to explain OBIS: a data request frame, there must beCosemAttributeDescriptorentry:CosemAttributeDescriptor: = SEQUENCECosemClassId,CosemObjectInstanceId,CosemObjectAttributeId} {classid : instanceid attributeid where classid attributeid by the references of article [1] definition. CosemObjectInstanceId by the references of article [5] definition. From reference [5] defines the content that OBIS. It is defined by a set of coding COSEM of 6 bytes long. His role is to provide a data type for each unique code. About the specific content of OBIS Refer to References [5]. 1. Data request frame :: = CHOICE GetRequestNormal,getrequestnextgetrequestwithlist {getrequestnormal
GETRequest GetRequestNext, [1] IMPLICIT GetRequestWithList}
IMPLICIT IMPLICIT [3 [2]
GetRequestNormal:: = SEQUENCE {invokeidandpriority InvokeIdAndPriority,CosemAttributeDescriptor, ]cosemattributedescriptor accessselectionparametersCosemAttributeDescriptorCosemClassId,CosemObjectInstanceId ,Cosem SelectiveAccessDescriptor OPTIONAL}CosemObjectAttributeId} :: = SEQUENCE {classid instanceid attributeid
OCTET STRING (SIZE (6)) :: = ObjectInstanceId :: =CosemObjectAttributeIdInteger8 to request a reverse active as an example: S:7e a0 1c 00 22 00 23 03 54 bd 5e e6 e6 00 c0 01 81 00 03 01 01 02 08 00 ff 02 00 9f 36 7e explains: 7e a0 1c 00 22 00 23 03 54 bd 5e e6 e6 00 / Hdlc head/ / /c0 CosemRequestinvokeidGetDataResult getrequestapdu[192]and / Nomal/ // // /01 01/ /81 (000 0001) priority (1)id 00 = data00 03Class 01 02 08ff/ reverse total active OBIS 02 00 / / reverse total active second attribute range. 9f 36 7e / / HDLC Tail 2. data response frame :: = CHOICE GetResponseWith {getresponsenormal GETResponse [1][2] IMPLICITIMPLICIT GetResponseNormal, getresponsewithdatablock InvokeIdAndPriority, getresponsewithlist GetResponseNormal GetData [3] IMPLICIT GetResponseWithList} :: = SEQUENCE {invokeidandpriority Datablock, result dataaccessresultDataAccessResult}{nulldata Result} Data, Data :: = CHOICECHOICE {data GetDataResult [0]NULL, [0] [1] IMPLICITIMPLICIT :: =
array SEQUENCE OF IMPLICIT SEQUENCE OF Data, IMPLICIT IMPLICITSTRING, IMPLICIT [6 structure [2] boolean IMPLICITData,[3]BOOLEAN, bitstringdoublelongdoublelongunsigned [4]BIT [5]Integer32, [1] IMPLICIT33, IMPLICITSTRING, IMPLICIT IMPLICIT floatingpointoctetstringvisiblestring ] IMPLICIT Unsigned32,[7] (SIZE (4)) [9]OCTET [10][11][13 OCTET STRING VisibleString, time GeneralizedTime, bcd IMPLICIT Integer8, IMPLICIT IMPLICIT IMPLICIT IMPLICIT TypeDescription integer Integer8,[15][16][17][18][19][0] longlongunsigned Integer16, unsigned Unsigned8, compactarray{contentsdescription Unsigned16, IMPLICITSEQUENCE ],long64Integer64, Unsigned64,ENUMERATED,(4)), arraycontentslong64unsigned OCTET IMPLICIT IMPLICIT IMPLICIT IMPLICIT OCTET STRING[ STRING} IMPLICIT[20] [21] enum [22] float32 [23](SIZE float64 [1] OCTET STRING IMPLICIT(0),(1),(2 don'tcareDataAccessResulthardwarefaulttemporaryfailure 24] IMPLICIT[255]NULL}
:: = ENUMERATED {success (8)), (SIZE (3),(4),(9),(11),(12), readwritedeniedobjectundefinedobjectclassinconsistentobjectunavailabletypeunmatchedsco peofaccessviolated ),(13
(14),(15),(16),(17), datablockunavailablelonggetabortednolonggetinprogresslongsetabortednolongsetin ),
progress otherreason
(18),(250)}
in response to a "request reverse active" for example: R:7E A0 18 03 00 22 00 23 74 E4 13 E6 E7 00 C4 01 81 00 06 00 35 7B 18 CD E8 7E explained: 7E A0 18 03 22 00 23 74 E4 13 E6 E7 00 / Hdlc head/ // /00 / // / /C4 01Response Normal 81invokeid (000 0001) and priority (1) 00by data 06data length 00 35 7B 18 / / reverse active value CD E8 7E / / HDLC Tail V. to the received data framedismantling received request dataare encoded according AXDR. Of the received data frame data structure in the reference [7] are detailed explanation. The following example shows the data frame analysis: Load_profileS: / hdlc link / / /SNRM Example: 7e a0 21 00 22 00 23 03 93 0b 14 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 65 5e 7e7E00000700 00 0000 00 007Eaarq / UA/ / 0007R: A0 21 032223 73 28 F0 81 80 12 05 01 80 06 01 800401 08 0401 53 3B / S : 7e a0 47 00 22 00 23 03 10 d0 5e e6 e6 00 60 36 a1 09 06 07 60 85 74 05 08 01 01 8a 02 07 80 8b 07 60 85 74 05 08 02 01 ac 0a 80 08 41 42 43 44 45 46 47 48 be 10 04 0e 01 00 00 5f 1f 04 00 00 08 1d 00 00 9a 7a 7e7E00000006 / / aare 0006R: A0 53 032223 30 40 A6 E6 E761 42 A1 0907 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 88 02 07 80 89 07 60 85 74 05 08 02 01 AA 0A 80 08 41 42 43 44 45 46 47 48 BE 10 04 0E 08 00 06 5F 1F 04 00 08 1D 21 34 00 07 72 A4 00007E00007E00 / / 007E 7e a0 22 12 87 7e 032223 31S: 7e a0 0a S:23 03 31R: 0A3F 84 0aA0 12 87 7e7E03 00 22 00 23 317E7e00 22 00 23 03000000 00 31 0A3F 84S: / / request data 22 23 03R: A0a0 1c32 8d 58 e6 e6c0 01 81 0007 63 ff0101 01strures01 01 01FF 000000000200 44 58 7e7E 0100R: A0 4F 032223 52 07 E2 E6 E7C481 / 1 array/ // / 8002/06606 091B 1 02 02 1B02 02 0F 03 16 1B / 2/ // // / 021B 06 01 0100 09FF FF FF FF FF FF FF FF09 0F 03 16 4 09FF D3 05 080C 07 5 0C 07D3 05 17 FF FF FF FF FF FF FF FF / / 6
/3
F6 CE 7E 7e a0 0a 00 14 e4 7e 03 00 22 00 23 517E S: 7e a000 22 00 23 030000 S:00 22 51R: 0A39 E7 23 037E A01c54 bd 5e e6 e6c0 01 8107 ff ff 85 ff 026202 020000000000 7a 7e7E23 6223R: A8 8C 032274 FAE6 E7C4 810101 01 / arry/ // // / / 1 arraytotal structurestructure total 3452 03 / 3 structure/ /obiscode/ / 09 06 01 01 15 08 00 00 00 00 00 00 00 00 02/0115 08 FFoctet 6 bytes long,(01FF)(0x06),(00 06 00 string,Unsigned32 data)unit.02strcture,strctures.ÊýÝÀàÐÍInteger8 ÊýÝÄÚÈÝdata û62056μÄpdf(0x16), 020202 / andtyp = num = 2 / / (0x0f),/ // / 0F 00 /scalscal:¾¾(0x00)¼unit: 16 1E ENUMERATED data = enum.This(By according(Suchstucture) (0x1e / be founded in Blue book 3rd edition. / /DL):/ / can wh)/unit:attention to XDR, when a datatype as octet string, array, can' express a data length should exist.On the other hand, when the length can be expressed bythe dataInteger8, Unsigned32,ENUMERATED),the length byte arnn't tthe data length,byte /type (such as and exist. / // ¸ ù ¾ ÝBER ± àÂë?? 0302 0202 0302 0202 01 29 06 00 00 00 000009 06 01 0108 00 FF 06 00 00 00 0000 1E0F16 1E
020600 0F16
09 0108 FF3D 030303 020202 0202 02
01 01 06 00 00 00 000009 06 01 0108 00 FF 06 000009 06 01 0108 00 0F 1E160F16 1E 09 01 FF16 08 2AFF
0600
2E 6E FE 0000000000 00 000006
9E 5D7E7E 00 7e a0 0a22 71 c5 7e 0322231603 S:23 R:A8 8C76 E8 41 0202 160F1E 0302 0609 01 01 3E 08 00 00 00 000000 FF000000 FF00 00 00 000006 020206020602 0202060602 0F16 1E0F16 1E 020303 0909 FF 010801 0108 2E 6E FE 0117 020202 020202 0202 0F 16 200000 00 000F 00 16 200000 00 00 000F 00 16 20 030303 0609 060609 00 01 2B FF01 0108FF 0682 01083F 09060601 01 08 FF00 00 000000000303 00000003 00
CB7E7E 03 7e a0 0a222391 18 22 7e 2223 S:R:A8 8C78 96 A8 82 0202 0F16 20 02 09 0609 060609 06 01 18 000001 0108 00 FF00 00 000001 0108 00 FF 0600 C2 EE 0202 0302 0202 03 0F16 200F16 20 0302 0108 FF2C 82 40 00 00 00 020002060006 0002 020002060006 00 00 00 00 02 02000F16 200F16 200F 02030303 06090901 04 FF01 0108FF C3 70 010819 16 200000 00 0000000000 0203030302 09 06 0001 01 2D 08FF 020650 88 CB7E7E 03 7e a0 0a2223b1 1a7e 2223 S:R:A8 8C7A 84 8B 0F 16 200000 00 00 000F 00 16 200000 00 000F 00 16 20 0302 0202 0302 0202 03 09 0609 060609 06 00 01 41 FF01 0108FF 0206 010805 50 01 1A 00 00 00 000001 0108 00 FF00 00 000001 0108 00 FF00 0006 0202060602 020206060F16 200F16 20 020303 0909 0108 FF2E 32 42 00 00 0200020000 00 0002 020000 000F16 200F 02030303 09 0606 01 0108FF 0632 B9 E07E7E 7e a0 0a2223d1 1c 60 7e S:R:A8 8C 22 00 23 7C B2 000000EE000000 00 0000 0016 2016 20 030302 0202 0302 02 09 0609 0606 01 1B FF01 0108FF EE06C2 0F0F 01082F 0264 16 2016 2016 20 0302 0202 030302 0202 03 09 0609 060609 06 01 43 00 00 00 000001 0108 00 FF000001 01020600 0F0F 0108 FF07 C3 52 1C 00 00 00 000008 00 FF00 00 00000000 0006 0202060602 02 0F 200F16 020303 09 08 FF01 01 30 1E 16 A8 C8 7ES: 7e a0 0a2223f1 1e 41 7e7E7E R: A8 8C 22 00 23A0 CD030000 00 00 0000030000 00 2020 030202 0202 09 0609 0606 00 01 44 FF01 01 08 08FF 06 0F16 0108 1E 0200020000 00 00 00 02 0200020000 00 0202 0200000F 200F160F16 020303 09 0609 0606 01 1D FF01 0108FF 06 161F1F 010831 62 0302 0202 030202 0202 0609 060906 01 45 00 00 00 000001 0108 00 FF00 0000 020600 0F16 1F0F16 1F 090108 FF 62 5B 0C
7ES: 7e a0 0a 00 11 10 a6 7e7E03 00 22 00 230300000003 2223 R: A8 8C70 DE 24 03 00 01 1E 08FF 062E 8D B2 02 02 0F16 1F 0209 06 01 01 09 06 0132 00 00 00 00 02 00 02 0608 00 FF 06 00 00 00 00 02 02 0F 00 16 1F 02 030608 00 FF 06 00 08 00 FF 06020F16 1F0309 01 460901 01 010A2E 8D B2 02 1F 0203020000 00 00 00 02 02 0F 00 1602 03030000 00 00 00 02 02 0F 00 1602 03 020F 00 16 09 06 FFFF FF 06FF09 06 FFFF 08FF 06FF 08 09 1C EB7E7E 7e a0 0a 00 31 12 87 7e 03 00 22 00 230000 00 00 0000 S: 2223 03R:A8 8C72 CC 07 0006 FF 04 FF 08FF 0602 02 0F16 FF 0203030303 05 FF FF 06 00 00 00 00 02 00 FF 0209 06 FF 02 FF 08 00 FF 06 00 00 00 00 02 02 0F 00 16 FF 0209 06 FFFF 08 00 09 06 FF08 00020F16 00 00 00 02 00 FF 02 06 FFFF00 FF 06 00 00 00 00 02 02 0F 00 16 FF 02 0306 FFFF00 FF 06 00 00 00 00 02 02 FF 06 00020F16030904080908 050F 16 FF00000303 0000FF00 FF00 00 00 00 02 FF09 0606 29 957E7E 0003 7e a0 0a222351 14 e4 7e A02223 06 S:R: 5B74 8C 7C08 02 0203FFFF00 FF00 00 00 00 02 02 0F 00 16 FF 02 03FFFF00 FF00 00 00 00 02 02 0F 00 16 FF 02 03 02 0F 00 16 FF 0607080609 0608080609 0906 FF 09 FF 08 FF 06 00 00 00 00 02 02 0F 00 FF0000160000 0B 2E7E7E7E 0016 7e a0 0a2223 03 71c5 7e 032223 71S R:A0 0A3B C6 S: 7e a0 00 7e 03 00 22 00 23 717E 7e a0 0a 00 22 00 23 03 71 16 c5 7e 7E A0 0A 03 00 22 00 :00 2223 71R: 0A3B C6R: 0a 16 c57E A0S: 03 3B C67E23717E23 71 3B C6 7E23717E 23 717e a0 0003 7e 03 00 22 00S: 7e a0 0a 00 22 000316 c5 7e 00 22R: 0AR: S:0a 16 c5A0 00 7E00 22 00 23 03 717E A0 0A 03 00 22 00 23 71 3B C6 7E00 22
A003 23 717e a0 16 c5 7e S: 7e a0 0a 0A 3B C6R: / / disc link 00 22 S:0a 53 06 c7 7e7E03 0000 237E 00 23 03R: A0 0A221F 43 4C six,examples of the requested data here are a fewdata communication examples for programmers programming reference. 1. Requestconsumption, Request Forward total active power and subrate power. 0A 00 93 0A 7E 7E A003 00 22 00 23010100 00 00 0100 00 00 01 S: 7E A000 2223 0301R:2173 28 F0 81 80 12 0580 0680 07 0408 0453 3B 7E 7ES:A0 46 00 22 00 23 03 10 05 C1 E6 E6 00 60 35 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 41 42 43 44 45 46 47 48 BE 10 04 0E 01 00 00 5F 04 00 00 00 14 00 00 BD BF 7E00000006 00067ER:A0 52 032223 30 95 39 E6 E761 41 A1 0907 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 88 02 07 80 89 07 60 85 74 05 08 02 01 AA 0A 80 08 41 42 43 44 45 46 47 48 BE 0F 04 0D 08 00 06 5F 04 00 00 14 21 34 00 07 14 537E7E00000000007E7E00 00 S: 1B2223 32 95 9F E6 E6C0 01 8103 01 01 01 08FF 02 0C F6R:A00322 A00318 52 D0 57 E7 00 C4 00 06 00 06 98 5A 60 7E1B 0000 23E6 E6 0001 81 0001 01 0101 00 23E601 811B7ES:A02203 54 A5 99C00408FF 02 DE 307E7E7E7E R: 18 00 74 E4 13 E7 00 C4 00 06 00 01 C7 14 A0 54S:A000 22 00 23 03E6 E6 0001 81 00 A003 00 2223E601 811B76 B5 9BC004 01 01 08 02 FF 02 BA DF7E7E017E7E 01 R: 18 00 96 F8 D7 E6 E7 00 C481 00 06 00 03 17 5E 7D 53S:A000 22 00 23 03 A003 00 22231B98 C5 95 E6 C0 00 04 01 01 01 08 FF 02 66 857E7E03 0000E60001 81 0000 017E7E E60001 8103 R:A0 182223 B8 84 1FE7C4063D 26 49 C7S: 1B 00 BA D5 97 E6 00 C0 00 04 01 01 01 08 04 FF 02 63 09 7E A003 00 22 00 23E60001 81 0000 A000 2223 03E601 817ER:18DA 90 5FE7C406 00 00 7B DF7E7E00007E7E00007E7E00007E 00 A0 0A22 1C 60R:A0 0A 032223 D1S:A0 0A2223 03R: D131 63 23 0353 06 C7 S:7E A0 0A 03 00 22 00 23 73 29 E5 7E
2, requesting instantaneous volume (voltage, current, power) 0A 00 93 0A 01 7E 7E A003 00 22 00 23 S: 7E A000 2223 03R:2173 28 F0 81 80 12 01 80 01 80 04 00 00 01 08 04 00 00 00 01 53 3B 7E0000050006 07 050607007ES:A0 462223 03 10C1 E6 E660 35 A1 0960 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 41 42 43 44 45 46 47 48 BE 10 04 0E 01 00 00 00 06 5F 04 00 00 00 14 00 00 BD BF 7E R : 7E A0 52 03 00 22 00 23 30 95 39 E6 E7 00 61 41 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 88 02 07 80 89 07 60 85 74 05 08 02 01 AA 0A 80 08 41 42 43 44 45 46 47 48 BE 0F 04 0D 08 06 5F 04 00 00 00 14 21 34 00 07 14 53 7E0000 007ES:A0 1B2223 03 32 95 9F E6 E6 C0 00 01 01 1F 07 00 FF 0D 917E7E03 00000001 81 0000 027E7E0000 0001 810302 R: 162223 52 F1 D1 E6 E7C41233 53S:A022 A01B 54 A5 99 E6 C0 00 03 01 01 07 00 FF AC 86 7E03 0000 23E60001 81 0000 02 337E 23 03E60001 8133027ER:A0 162274 C5 95E7C41253 S 1B 00 76 B5 9B E6 00 C0 00 03 01 01 47 07 00 FF 02 4F BE 7E 7E A003 00 22 00 23E60001 81 00 : 7E A000 2223 03E601 81R:1696 D9 51E7C412 33 537E7E0000000000027E7E0000 02 S: 1B22 98 C5 95 E6 E6C0 01 8103 01 01 20 07FF20 2FR:A0032223 00A023 0316B8 A5 99 E7 C4 00 12 00 01 A8 617E7E0000E6 E6 0001 81 0001 01007E7E E60001 81 S: 1B2223 BA D5 97C00334 07FF 02 70 B6R:A003 A00316 00 DA B1 D9 E7 00 C4 00 12 00 01 A8 61 7E00 22 00 23E6 E6 0001 81 0001 0100 00 2223E601 817ES:A0 1B03 DC E5 91C00348 07FF 02 B3 D47E7E7E7E7E7E R: 16 00 FC 85 9D E6 E7 00 C4 01 81 00 12 00 01 A8 61S:A000 22 00 23 03R:A003 00 22 00 A003 00 22230AF1 1E 410A F1 33 427E7E237E7E237E
23 S: 00 53 06 C7R:A0 0A 03 00 22 00 A0 0A 00 220373 29 E5
3, the request load curve S: 7E A0 0A 00 22 00 23 03 93 0A 7E010101017E7E 01 21 00 73 28 F0 81 80 12 0580 0680 07 04 00 00 0008 04 00 00 0053 3BS:A000 22 00 23 03 7ER:A003 00 22234610 05 C1 E6 E6 00 60 35 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 41 42 43 44 45 46 47 48 BE 10 04 0E 01 00 00 5F 04 00 00 00 14 00 00 BD BF 7E0000000600 00 067ER:A0 52 032223 30 95 39 E6 E761 41 A1 0907 60 85 74 05 08 01 01 A2 03 02 01A3 05 A1 03 02 01 00 88 02 07 80 89 07 60 85 74 05 08 02 01 AA 0A 80 08 41 42 43 44 45 46 47 48 BE 0F 04 0D 08 00 06 5F 04 00 00 00 14 21 34 00 07 14 53 7E S : 7E A0 3C 00 22 00 23 03 32 0E 3B E6 E6 00 C0 01 81 00 07 00 00 63 01 00 FF 02 01 01 02 04 00 09 0C 07 D3 06 09 FF FF FF FF FF FF FF FF 09 0C 07 D3 0A FF FF FF FF FF FF FF DE 82 7E0606 FFFF 06FF7ER:A8 8C 03 00 22 00 23 52 CE 26 E6 E7 00 C4 01 81 00 01 22 0202 02 09 0C 07 D30909 1D 0DFF FF FF 04 06 40 00 00 00 10 00 00 10 00 00 02 06 00 00 00 00 10 00 00 10 00 00 02 06 00 00 00 00 10 00 00 10 00 00 02 06 00 00 00 00 10 00 00 10 00 00 02 0,600,000,000,100,000 1,000,000,206,000,000 0,010,000,010,000,002 0,600,000,000,100,000 1,000,000,206,000,000 0,010,000,010,000,002 00 00 83 9E7E7E00007E7E00000000 0000 0006 00 00 00 0000 00 00 S:A0 0A22 51 14 E4R:032223 06 23 03A8 8C54 F8 431010021010 00 0,002,060,000,000,010 0,000,100,000,020,600 0,000,001,000,001,000 0,002,060,000,000,010 0,000,100,000,020,600 0,000,001,000,001,000 00 02 0,600,000,000,100,000 1,000,000,206,000,000 0,010,000,010,000,002 0,600,000,000,100,000 1,000,000,206,000,000 0,010,000,010,000,002 00 00 00 00 00 10 00 00 02 F9 317E7E00007E7E000006 00 00 00 00 10 00 00 00 S:A0 0A22 71 16 C5R:032223 06 1023 03A8 8C56 EA 6010 00 00 02 06 00 00 00 00 10 00 00 10 00 00 02 06 00 00 00 00 10 00 00 10 00 00 02 06 00 00 00 00 10 00 00 10 00 00 02 06 00 00 02 02 09 0C FF FF FF FF FF 0F 08 34 FF FF FF FF 04 06 40 02 02 09 0C FF FF FF FF FF 0F 0E 1F FF FF FF FF 04 06 40 10 00 00 10 00 00 02 06 00 00 00 00 10 00 00 10 00 00 02 06 00 00 00 10 00 00 10 00 00 02 06 00 00 00 00 10 00 00 14 247E7E00007E7E0000 00 S: 0A22 91 18 22R:A0032223 A023 037558 40 72 10 00 0,002,060,000,000,010 0,000,100,000,020,600 0,000,001,000,001,000 0,002,060,000,000,010 0,000,100,000,020,600 0,000,001,000,001,000 00 02 06 00 00 00 00 10 00 00 10 00 00 02 06 00 00 00 00 10 00 00 10 00 00 02 06 00 02 02 09 0C FF FF FF FF FF 11 23 0C FF FF FF FF 04 06 40 00 00 10 00 10 00 00 A2 1B7E7E00007E7E00007E7E00007E 00 S:A0 0A22 B1 1A 03R:A0 0A 032223S:A0 0A2223 03 23 0351 39 E7 53 06 C7 R: 7E A0 0A 03 00 22 00 23 73 29 E5 7E
4, request time 0A 00 93 0A 7E 7E A003 00 22 00 2301 S: 7E A000 2223 0301R:2173 28 F0 81 80 12 0580 80 04 00 00 01 04 00 00 00 01 53 3B 7E00000006 0708 01 01 06 010700087ES:A0 462223 03 10 05 C1 E6 E660 35 A1 0960 85 74 058A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 41 42 43 44 45 46 47 48 BE 10 04 0E 01 00 00 06 5F 04 00 00 00 14 00 00 BD BF 7E00 007ER:A0 52 0322 00 23 30 95 39 E6 E7 00 61 41 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 88 02 07 80 89 07 60 85 74 05 08 02 01 AA 0A 80 41 42 43 44 45 46 47 48 BE 0F 04 0D 08 06 5F 04 00 00 00 14 21 34 00 07 14 53 7E00000000 08 08007ES:A0 1B2223 03 32 95 9F E6 E6C0 01 81 00 00 00 02 46 2F7E7E0000000100FF FF FF 007E7E 0001FF R:A0 21 032223 52 A3 C0 E6 E7C48109 0C 07 D3 06 0E 06 0E 0D 0310 38S: 00 14 E47E7E A0 0A 03 00 22 00 23 517E7E A0 0A 00 22 00 23 037E7E A0 0A 03 00 22 00 23 A0 0A 00 22 51 R:39 E7S:R: 23 0353 06 C7 73 29 E5 7E
article to end here. DLMS protocol is a thorough understanding of large systems engineering. The formulation of the agreement, but also a lot of places for versatility. To achieve universal, in fact, the agreement does not have to be so complicated a lot of places where, it is very complicated. While the agreement also involves a number of other standards, preferably at the same time looking at this reference incorporated herein by reference, will help to understand this article.
Added one: For SN Referencing explanation When SN referencing is used, the attributes and methods of each interface object are mapped to DLMS thethenamedvariables.This is done duringdesign ofmeter. namedEachvariable identified with is a shortwhic1,isah16 bit unsigned integer.name,Attribute the logical of the object is mapped to a DLMS named variable identified by aname. namebaseExcept in the case of a few special objects, there are no general rules defined for assigning base names. All other attributes and methods of the object are then also mapped to DLMS named variables. The offsets between the base name and the short name identifying the other attributes and methods are defined in the definition of each interface class. The actual values of the short names thus depend on the number and kind of objects instantiated and the mapping strategy used. The base names allocated in the metering equipment can be retrieved by reading the object_list attribute of the SN Association object. When SN referencing is used, the DLMS named variables are accessed by the standard DLMS READ and WRITE services.(s).OBIS. WhenLN referencing thethe thethetheWhen is used,attributes and methods are accessed via logical name ofobject,specifyingindex (es) ofattribute (s) and / ormethod Logical names are defined by LN referencing is used, the attributes and methods are accessed by the xDLMS GET / SET and ACTION services. from "DLMS User Association Frequently Asked Questions")Referencing (ReferencingSNUnlike LN Referencing It uses an integer (WORD) ie Short Name, place of LN Referencing the OBIS. Short Name by the manufacturers custom for Siemens Dtype table using the SN. therefore only in the case of manufacturers to provide SN, SN can use theapplicationcontextname access statement The databelow is an example of SN data request frame: S: E6 01 02 FF 08 A0 E0 7E 7E A0 11 03 21 32 B7 3D E6 E6 00 05 7E A0 11 03 21 32 B7 3D E600 05/ / SN applicationtnamecontex ReadRequest 01 02 FF 08 / / short name and attribute??? A0 E0 7E
added two: Currently DLMS protocol used in the CLASS ID and OBIS Data name clock going active (total) going active (rates a) going active (rates two) going active (rates three) going active (rates four) Antilike active (total) Antilike active (rates a) Antilike active (rates two) Antilike active (rates three) Antilike active (rates four)
CLASS ID 08 00 0000 0000 030000 00 04 0400 0400
OBIS 0001ff 0001 01 01 08ff 01 01 01 08 01 ff 01 01 01 08 ff 02 01 01 01 08 03 ff
ATTRIBUTE 02 02 02 00 0002 0002
0004010101
08 04 ff
02 00
030000 0400
0001 01 08ff 02 01 01 08 01 ff 02
02 0002
000401
01 08 02 ff 02
0200
0400
01 01 08 03 ff 02
0002
0400
0401 01 08ff 02
0002
Active power (total) Reactive Power (Total) L1 voltage L2 voltage L3 voltage L1 Current L2 Current L3 Current
0003 030000 030000 030000 030000 030000 030000 030000
20036 26
01 01 01 07 ff00 0001 01 07ff 02 0001 01 1f 07ff 0001 01 33 07ff 0001 01 47 07ff 0001 01 20 07ff 0001 01 34 07ff 0001 01 48 07ff
0002 02 02 02 02 02 02 02
View more...
Comments