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

DLMSPowerMeterprotocolanalyzer(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 paperistoprovideelectricenergydata
collectionterminalwiththeuseofDLMSprotocolsuitemetercommunicationprotocoldescription.
Hereinbyreferenceasfollows:
(1)(2)DLMSUserCOSEMIdentificationSystemInterfaceObjects,ThirdEditionreading,and
IEC6205653 Association,andElectricitymeteringDataexchangeformetertariffload
controlPart53:controlPartCOSEM
applicationlayer

46:IEC62056Electricitymeteringexchangeformeterreading,tariffandloadData
46layerDatalinkusingHDLCprotocol
(3)IEC62056(4)42ElectricitymeteringDataexchangemeterreading,tariffloadandfor
42:connectionorientedPhysicallayer
forandservicesprocedures
controlPartasynchronousdataexchange
(5)IEC6205661ElectricitymeteringDataexchangeformeterreading,tariffandload
controlPart61:Objectidentification
system(OBIS)(6)
AmberlogicaldeviceTECH_SPECMANAGEMENT_LOGICAL_DEVICEManagementFR:
AMBER/FW
(7)AmberElectricityLogicalDeviceAMBER/FWTECH_SPEC
ELECTRICITY_LOGICAL_DEVICE
FR:
ALayman'sGuidetoaSubsetBER,DERJr.Revised1,(9)

AnRSALaboratoriesTechnicalNote
(8)ofASN.1,andBurtonS.KaliskiNovember1993
IEC61334Distributionautomationusingdistributionlinecarrier,translationassembly.

1.

Thispaperisstructured
as DLMS protocol family complexity, this will inevitably lead to lengthy, involving more
content. Here it is necessary to put thecontentsofthisarticle,doareview,andexplaintherelationship
betweenthevariousparts.
One,DLMSAssociationanalyzermodel:theoverallpresentationDLMSprotocol.
Two, DLMS physical layer protocols: about DLMS physical layer protocol suite in the entire
role.
Three, DLMS link layer protocols: HDLC link layerprotocolsdescribetheentireprotocolsuite
role.
Four, DLMS application layer protocol: tell application layer protocol DLMS protocol suite in
theentirerole.Thissectionalso
includesthefollowingsectionscontent.
(A,) ASN.1 Syntax: This syntax is used to describe the applicationlayer protocol
frameDLMSthecomposition.
(Two,) BER encoding and AXDR Coding:coding isusedtoachievethese twoASN.1
syntax.
(Three,) AARQ with AARE data frames: These are two special data frame, which is
usedtobuildtheDLMS
protocolin clientside and serverside
applicationlayerconnections.
(IV) Data Request Process Description:introductionrequestdata isusedwhenadata
frame.
Fifth, the requesteddataExample:Hereprovidesseveral practicalexamplesrequestdata packet
messages.
1. Requestpower
2. Requestinstantaneousquantity(voltage,current,power)
3. requestload
4. requesttime

acurve,DLMScometer

modeldiagramdescribestheoverallcometermodelDLMS.

Association instrument is divided into three layers, the physical layer, link layer, the application layer.
Betweenlayersusingthespecifiedservicecommunications.
Communication between the partiesusingClientServerarchitecture,datarequester(acquisition)for the
Client,thedataproviderside(meters)toServer.
CommunicationsProcessCreate

Description:thephysicallayerconnection
Physical layer communications modelatthebottom.DLMSprotocolcanbe createdin
avarietyofphysicallayer,physical layer is mainly to do with the operation of the underlying
communicationshardwaretodo(suchasPSTNMODEMinitialization,open,
close.)

linklayerconnectionestablished
Physical layerconnection is established, The first step is to establish data
communicationconnectiontothelinklayer,thelinklayerisprimarilyresponsible
Responsible
for the reliability of data transmission, including the following aspects, address check, frame length
check,thedataoftheCRC
checksum.Long data frames unpacking group package.
Simultaneouslytotheapplicationlayerprovidesserviceslinktransmission.

Applicationlayerconnectionestablished
linklayerconnectionisestablished,theinstrumentshouldbeestablishedAssociation
DLMSapplicationlayerconnectionbeforedatacommunication.
TheapplicationlayerconnectionestablishmentprocessiscalledNegotioation.
This process is provided for the data communication configuration parameters.
ApplicationlayerconnectionrequestinitiatedbytheClientside,
Clientsidehair aarq frame,
Serversideresponseaareframe

fordatacommunication
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,tousespecificdatauniqueclassidandOBIS,toidentifythedifferenttypesofdata.

Datacommunicationsover,releaselink,unlink.
After the data communication, send the link end frame, the end of the first communication
process. After a datacommunication,youcansend thelinkendframe,theendofacommunication
process. Also, do not send any data frames, relying on the server side timeout disconnection
mechanismtoendacommunicationprocess.Shouldgenerallyusetheformer.

Relievethephysicallayerconnectionis

closedphysicalport(suchashangupModem).Fromthephysicalendofthefirstcommunication.
Two,DLMSphysicallayerprotocol
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,serialchannels,etc.).
The physical layer of the receiving data link layer, to the physical medium, transmitted to the
communicationpeer.Orreceivetrafficontheclientsendsmoredataarethentransmittedtothelinklayer
protocolprocessingforhigherleveldata.
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
thespecificphysicallayerservices.
Three,DLMSprotocollinklayer
above the physical layer is the link layer, link layer is the physical layer and the application
layercommunicationchannel.DLMSlinklayerusingHDLCspeedlinkcontrolprotocol.

Linklayercomposition:
thelinklayeriscomposedoftwosublayers,i.e.theLLCsublayerandaMACsublayer.
(A),LLCsublayer(LogicalLinkControlsublayer)
isthe functionofthislayeroftheMACsublayerdataisforwardedtotheapplicationlayer,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
providestransportservices(fromthelinklayertoreceiveortransmitdata).
Specific to the data communication, the clientside application layer data sent, to add LLC
header0xe6,(0xe6,0x00),serversideapplicationlayertosenddatatoaddLLCheader(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

varietyofservices.
(Two),MACsublayer(MACsublayer)
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. HDLCframeformat
1.
doesnotcontaininformationontheapplicationlayerdata
0x7e

frame type and destination


source
control
dataframecheck
0x7e
framesize
addressfield
addressfield domain
0x7etwo HDLC data frame is fixed header and frame end, the chain between two 0x7e user
data.
2.
Containsapplicationlayerdatainformation

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 tothree
morehereItem:
header checksum: To enhance the reliability of communication,but also on the header data
plustheCRC.Headerincludesthefollowing
fields: frame
type and frame length, destination address field, source address field, and the Control
Domain
LLCheader:userdatabeforeyouadd0xe6,0xe6,0x00or0xe6,0xe7,0x00.
Userdata:dataprocessedbytheapplicationlayer.
Note:For data integrity reasons,the maximum length of the user data information, the
defaultis128bytes.IfyouwantmorebytesthatcanSNRMdataframeprotocol.
2. Frametypefieldandthe'S'bit
frametypeandtheframelengthfield,andatotaloftwobytes.ReadsasType:

follows:Frame Used to indicate the current data frame type. There are many types of HDLC
frame,DLMSthe
usingFrame Type 3. Frame Type
constantofA(1010).
S: (segmentation Bit) This field is only one, it is used to illustrate whether the data frame is
divided.Inthelong
dataframe transmission to be used to this one.
Longdataframetransmissionwillbeexplainedlater.
FrameLengthSubfield:Thisfieldisusedtodescribethecurrentdataframelength(inbytes,
notincludingthetwo0x7e)
3. AddressResolution
Address field is divided into two parts. Destinationaddressfieldandthesourceaddressfield.
For the client side, the destination address for the server's address, the source address is the
addressofclient.Forthecorrectservergoodcontrast.
(1)extendedaddressingtechnical
HDLC using extended addressing techniques, namely the one least significant bit of the
address byte as zero, it indicates that theaddress field is notover,thereisasubsequentbytesof
the address part of the domain. If an address byte least significant bit is 1, it indicates that the
addressfieldhasended,nosubsequentbytes.
(2)addressstructure
lientCsideaddressisalwaysonebyte,asextendedaddressingtheuseof

technology,thelowestposition1,sothe
clientsideaddressonly128.
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.(Sl7000metertwosectionsaddressarenecessary).
Serverside address using the extended addressing techniques, and it is not infinitely long
(although in theory, butinpracticethereisacapon).Serversideaddressstructurecanbeusedas
byte:
follows:OneonlytheupperHDLCaddressispresent.
Abyte:onlyappearHDLChighabyteaddress.

Twobytes:oneoccursonlyHDLCHighbyteaddress,andHDLClowabyteaddress.

Fourbytes:twobytesappearonlyHDLCaddressthehighandlowordertwobytes
HDLCaddress

forSL7000meter,testedonlyfourbytesseveraddressstructureisavailable.
(3)specialaddresses
there are some addresses aredefined as reserved HDLCaddress.Amongthemoreimportant is
thebroadcastaddress.
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
supportforspecialaddress.

4.

Framecontrolword
frame control word field is primarily responsible for communications in the frame count, and
specialdataframeidentification.
FrameControlWordfieldstructureisasfollows:
correspondingitemsareexplainedas
follows:RRR:asareceivedframecount.
SSS:tosendtheframecount.
Note:Theframecountexplanation
atthelinklayerconnectionisestablished,thefirstrequestfordata(at
theclient,includingthetransmissionAARQ)
RRRissetto0,SSSisset
to0.Serverclientreceivesthisframedata,returndataresponseRRRof1,
SSSis0.ClientdataisrequestedagainRRRplus1,SSSplus1.Serverclientreceivesthis
framedata,
returndataresponseRRRplusa(a2),SSSplus1.Repeatthisuntil
theclientgetsallthedata
sofar.ThedatatransferprocessintheIdata
framerequestandresponse.Tonotehereisthatendofthedataintherequest
evenaftertheandthensendRRframesreceivedconfirmation.DISCframecanthen
sendthelinkends.Clientsideinwhich
oftheRRframetheframecountbit
RRRSimplyclient'sframecountbitRRRobtainedbyadding1.
ThefollowingdiagramdepictstheprocessofchangeframecountF:

bit:P/poll/finalbit.
Poll bit: sent by the client, serverside set that response, set to 0 indicates no
response.
finalbit: sentby the server, setto 1indicates the endofadata frame transmission,set
0:00indicatesyet
been transmitted. final bit only in the
communicationswindow(windowsize)isgreaterthan1inthecasebefore
meaningful.In the window size = 1 when returnedbytheserverside data frame thisone
isalways
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
severalrequestsandresponsescorrespondingtothesituation.

I:
Informationtransmissionframe
RR:readytoreceivedataframes(usedtoindicatereadytoreceivethenextframedata)
RNR: Receive not ready (receive not ready). Equivalent to other communication protocols busy
frames.
SNRM:Setthecorrespondingnormaldataframes.Usedtoestablishalinklayerconnection.
UA:SNRMandDISContheresponseframe.
DISC:Endlinkframe.
DM:TheresponseontheDISCframe.(Disconnectedmode)
UI:canbeusedtomaintainthelink,thedataframetransmission,thelinkcontrolhasnoeffect.
FRMR: rejected frame (Frame reject), for some reason rejected due to uncertainty of the received
dataframe.

5.

Longdataframe
transmission,in many cases, the data can not beinarequest andaresponse,inrelationtoend
the data transmission process (subject to no more than 128 bytes of user data bytes). Then itis
necessarytostartthelongprocessofthedatalinkcontrolframes.
Note:Requestsmustbeusedwhentheloadcurvelongdataframes.
When using a long data frame, to the long data frame is divided into short data frames. Then
putthese short data frames were sent, atthereceivingendoftheseshortdataframessequentially
processed.Thisrealizationofalargerpacket,completetransfertothereceivingend.
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 makethe
rightsplitdataframeaccordingly.
Thefollowingdiagramdescribesthelongprocessofsendingandreceivingdataframes:

clientsidedatabysendinganRRframetorequestdataframeissplittherest.
6. framecheckdata
HDLCusingthe16bitCRC.Thepolynomialusedis:
therealizationofspecificprocedures,refertoEnglishReferenceIEC6205646AppendixA.
(Three),thelinklayerconnectionestablishment,anddisconnect
(1)toestablishaconnection
link layer beforestartingwork,toestablishthelinklayerconnection(Association).Thisstepis
accomplished by client sends SNRM data frame, serverside data frames UA responseindicates
connection has been established, serverside response DM data frame indicates that the link is
disconnected,theconnectionisnotestablished.

UA frame configuration parameters often contain link information. 2 link control parameter is the
datatransmissionparameters.
WINDOW_SIZEparameter
Thisparameterdescribesthecommunication,the
communicationbetweenthepartiesoncethenumberofdataframestransmitted.
AllowtimetosendmultipleHDLCframedata.
MAXIMUM_INFORMATION_FIELD_LENGTHparameter.Maximumlengthoftheinformation
field,thisparameterisusedto
describea
datalinkframelengthoftheuserdata.
Thedefaultvalues
ofthesetwoparametersas

WINDOW_SIZE1defaultMAXIMUM_INFORMATION_FIELD_LENGTH=
default=128(BYTEs)
asspecifiedinthedataframehasthefollowingfourparameters:
transmitmaximuminformationfieldlength
receivemaximuminformationfieldlength
transmitwindowsize
windowsizereceive
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 maycause inconvenience to the reader. But
intheoriginaltextisDLMSstatuteinthisway,sohereisstilldoingso.
Thefollowingexampleshowshowtoestablishthe/S:
/SNRM
connection: 7e a0 21 00 22 00 23 03 93 0b14818012050180060180070400000001080400000007
655e7e
explained:
7e
a021 frametypeandframelength
00220023
DestinationAddress
03
SourceAddress
93
Controlword
0b14 headerchecksum
8180SNRMidentifies
12
grouplenth.
05Hparameteridentifier(maximuminformationfieldlengthtransmit)octet)bytes)

01Hparameter(128parameter(maximumlength
parameter(180Hvalue
length06Hidentifierinformationfieldreceive)octet)bytes)transmit)octets)value)
parameter(128parameter(windowparameter
parameter(highparameterparameter01Hparameter
parameter(180Hvaluevaluevaluevalue

length

07Hidentifiersize,
length04H(4of
value00Hbyte00H00H

01Hbyte(windowreceive)(4octets)valuebytevalue)valuevaluevalue(lowbytevalue)
(low08Hidentifiersize,parameterparameterparameterparameterparameter
ofparameter04Hlengthofof
00H(high00H00H
value)
07H
655e dataframecheck(CRCcheck)
7e
SNRM data frames in the user information may not occur, which means that the clientisconfiguredto
receivethedataserverside.
//UA
R:7EA02103002200237328F0818012050180060180070400000001080400000001533B7E
explained:
7E/Flag//
/0xA021(type=a:frametype3,s=0:endofframe,len=021:33bytes)
03/source/
/address////

2200
/address0023destination
73controlUA
28F0hcs
818012060180070400000001080400000001800501
///////////informationfield
/parameternegotiation
81
80
12
05
01
information field80:maximumlength transmit (128
BYTEs)
/06///// 01:01:
maximuminformationfieldlength(1)receive
/07
01000004000000
80:(128BYTEs)transmitwindowsize,(1)
08
0400
receivewindowsize,
533B/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
saidthatafterreceivingtheDISCdisconnected.DMthatbeforereceivingtheDISCisdisconnected.

Itstillgivesspecificexamplesof
communication:S:7ea00a00220023035306c77e
explains:
7ea00a0022002303
53//frametypeDisc
06c77e7E
R:A00A03002200231F434C7E
explained:
7EA00A0300220023
1F//frametypeDM
434C7E
(four),withregardtothetransparencyofthedatalinklayertransmission
0x7e frame
destinatio
the
contr
header
LLC
user
checkda 0x7e
type
n address source
ol
checksu heade datainform taframe
and
fieldof
address
Doma m
r
ation
frame
field
in
length
HDLCis a transparent data transmission link layer protocol. Userdatalinklayerdoesnot have
any relationship with. In the DLMS protocol model, the link layer is responsible for data
transmission reliability, applicationlayerprocessinguser data.Linklayertotheapplicationlayerto
providetransparentdatatransmissionchannel.
Four,DLMSapplicationlayerprotocol
application layer protocol DLMS understand, you need to first establish the following
concepts:
ASN.1syntax,BERencoding,AXDRcoding.
ASN.1 syntax is used to describethe application layer data frame. DLMS protocol is different from
some other place where simple communication protocol in this. He is notusingsomeformandto 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
transplantprocedure.
BER encoding and AXDR encoding is used to achieve the ASN.1 syntax. In order toachieve
the ASN.1abstract and versatility, this syntax to use special coding to describe. This introduces BER
encodingandAXDRcoding.
Thefollowingwereexplainedtheseitems.

(A)ASN.1syntaxfor
adatadescribedusingASN.1syntaxframesshouldlooklikebelow:
Name::=[tag] IMPLICIT/EXPLICIT
type
{nulldata
Data

item1
item2
item3
...}

[0][1]IMPLICITNULL,
IMPLICIT/EXPLICIT
[2]IMPLICIT/EXPLICIT
[3]

DatatypeA1OPTIONAL
DatatypeDatatypeA2OPTIONAL

Thefollowingexplainsthesyntaxdescription.
Name
thenameofthedataframe.
Tagtag

consistsoftwopartsclasstypeandadigital
Classtypehasthefollowingfour:
1)Universal
indicate name defined data frame in all
applicationsisthemeaningofDLMS
unique.
2) Application name defines a data frameshowsthemeaningof the
specificapplicationofthesame.
3)Private
indicate name defines a data frame is only at a
manufacturer'scustomrange.
4) Contextspecific data frame shows the same name defined in the
contextofthemeaningofthedataitems.
This type of data in different
structuresmayhavedifferentmeanings.
Tag of the figures asalabelofthisdataframeexists,it isusedasahandleto
thedataframe
intheapplicationdataunit.

the current data frame (referred to as subdata frame) may be


derivedfromadataframe(calledtheparent
dataframe), this field is used to describe the subdata frames between frames with the parent
data.
IMPLICIT:
changingtheparentdataframeTag.
EXPLICIT:
DonotchangetheparentdataframeTag.
notmarkedIMPLICITEntryisEXPLICIT.
Datatype

the type of data describing the dataframe.Data types are divided into
simpleandcomplextype.Mostdatatypescanfromthe
be seenname of its
type.Listedbelowareseveral,completesetofdatatypes,seeAppendix.
IMPLICIT/EXPLICIT

TypeTagnumberTagnumber
(decimal)(hexadecimal)
INTEGER202
BIT303STRING
STRINGOCTET404
NULL505
OBJECTIDENTIFIER606
SEQUENCESEQUENCE10andOF16
andOFSETSET1711
PrintableString1913
T61String2014
16IA5String22
UTCTime2317
"{}"
thecontentofbraces,namelydataframedataitems.Thenumberaftereach
dataitemnumber,namely,the
theidentityofdataitem(tag).Eachdataitem
maybeacompositeofanotherdataframe.Thatis,adata
frameis
usuallyacombinationofotherdataframes.
OPTIONALThis keyword describes the data items in the user considersnecessary occasions

canbeomitted.

TwoofthemoreimportantcomplextypeSEQUENCEandCHOICEExampleexplainedSEQUENCE:
1)below:thecontentsofthedataframeorder.BelowtoillustratetheSEQUENCEtype.
::=SEQUENCE
{invokeidandpriority
GetRequestNormal
InvokeIdAndPriority,CosemAttributeDescriptor,
cosemattributedescriptor
SelectiveAccessDescriptor
accessselectionparameters
OPTIONAL}
Thisiscommonlyusedintherequestdataisadataframe.SEQUENCEindicatesthat
thedatacontentoftheframeisarrangedinorder.
2)CHOICE: choose the type, i.e., it indicates that the current data frame is a data frame froma
fewselectaasthecurrent
framedatatype.BelowtoillustratetheCHOICEtype.
::={getrequestnormalCHOICE
GETRequest
GETRequest
getrequestwithlist

[1][2][3]IMPLICITIMPLICITIMPLICITgetrequestnext
GetRequestNormal,GetRequestNext,
GetRequestWithList}

frameonlyOnecanfillthreechoices.
ASN.1 syntax above brief introductionbythesyntaxdescriptionofthevariousdataframes,all
given in the appendix. These sorts of data frames will constitute DLMS protocol Client Server
applicationlayerinteractswiththelanguageused.
ReaderswhohaveincomprehensionASN.1syntax,seethisarticleinEnglishReferences[7]
(two)BERencodedencodingandAXDR
ASN.1just agrammar,takeitwritesthedataframe,itisnecessaryconvertittoadatabyte.This
would be one kind of (actually two kinds) coding to achieve this syntax. So he introduced the BER
encodingandAXDRcoding.
In the DLMS DLMS protocol described using ASN.1, BER encoding used to achieve using
ASN.1descriptionsXDLMSagreementwithAXDRCoding.
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].
Herejustknowthatthesetwoprotocolsusedifferentencoding.
1BER
encodingdetailedsyntaxseeAppendix.
TheBERencodedusingthefollowinggeneralstructure,whereinthedatacontentportionof
anotherBERcodingstructurecanbenested:
dataidentification

datalength

datacontent

datalength,anddatacontentcanknowthecontentsfromthename.
Hereitisnecessarytoexplainthecompositiondataidentification:
ABERBERdataidentifierandadatalengthofa16bitbitstring:
bit15(bit15,
bit0
datatypeclasses14)

Datatype(bit13)

datalength(bit12bit0)

1)datatypeclassesfield:ThisfieldisusedforASN.1syntaxclasstypecoding
Universal
Application
Contextspecific
Private

(00)(01)(10)(11)

2)Datatypefield:Usedtodescribethedatastructureofthecontent
Primitive
(0)
simpletype
Constructed
(1)
complextype(arrayor
structure)3)datalengthfield:Usedtodescribethedatacontentlength(inbytes).

BelowthereceiveddataframeAAREexample:
AAREdataframeSyntaxDescription:
::IMPLICITSEQUENCE[APPLICATION1][61H]=[
[APPLICATION=1]==[97]
{protocolversion
AAREapdu
0]IMPLICITBITSTRING{version1(0)}DEFAULT{version1},
applicationcontextname [1][2]
resultAssociationresult,resultsourcediagnostic
Applicationcontextname,
respondingAPtitleAPtitlerespondingAEqualifier
[3][4]
OPTIONAL,Associatesourcediagnostic,
[5][6]followingOPTIONAL,OPTIONAL,OPTIONAL,
AEqualifierrespondingAPinvocationidAPinvocationidentifierrespondingAEinvocationidAEinvoca
tionidentifier
[7]
ThefieldshallnotbekernelOPTIONAL,Thefollowingonlypresentifselected.
theresponderacserequirementsACSErequirementsthemechanismname
is[8]IMPLICITis
presentifonlyused.fieldshallbeauthenticationfunctionalunit
[9]IMPLICITfollowingisRespondingauthenticationvalue
OPTIONAL,
Thefieldshallonlybepresentifthefunctionalunitselected.
mechanismnameauthentication
EXPLICIT[29]implementationdataassociationinformation
OPTIONAL,OPTIONAL,OPTIONAL}
authenticationvalueimplementationinformationuserinformation
[10]IMPLICIT
IMPLICIT[30]

AAREBERencodingofthedataframeandAXDRCoding:
61//AAREtag
42/AARElen//COSEM_Application_Context_Name//
/A1tagof
09
06
IDENTIFIERisan

datalength
//(OBJECTIDENTIFIER,Universal)OBJECT
//ASN.1datatype
//datalength

07
60857405080101//datacontent
//Thefollowingdataframescanbeexplainedinthesameway
A2///Tagof//
0302010003020100
/TagofAssociationresult,A3Associatesourcediagnostic
05A1
88IMPLICITOPTIONAmechanismnameauthenticationvaluethe
070280
ACSErequirements89/IMPLICIT//OPTIONAL//
0207608574050108
/OPTIONALAAEXPLICIT
80080A4142434445464748
BE
04encodingchoiceforuserinformationthetheOCTET(14octets)
(OCTETSTRING,Universal)0E/encodingoflengthofSTRING'svaluefield/
/*ThefollowingcontentisXDLMSwithAXDRdescription*//
/08encodingthetag(explicittag)oftheDLMSCHOICE(FALSE,present)(ASN.
00/usageflagforcomponentnot////

/the06negotiateddlmsversionnumberthe
PDU(InitiateResponse)proposedqualityofservice5F1Fencoding[APPLICATION31]tag1explicit(4)
tag)04/length'contents'field//encodingofofinoctetof//encodingoflength
/theoftheinoctet00thenumberunusedbitsthefinalthebitstring00the
encoding081DfixedBITSTRINGvalue
2134/the//theAXDRencodingofanUnsigned16isitsAXDR:
/encodingofanUnsigned16isitsvalue0007value.0007==LN
2AXDR
Thisencodingisunix'sXDR(Externaldataidentificationmethod)codingextensions.
SeeIEC61334distributionautomationusingdistributionlinecarrier,translationcompilation,
thenextbook,thesixthsection.Thisarticlereferences[9]
three twoencodingcomparison:
AXDRencoding,thedifferencebetweentheBERencodingcanbeseenfromthe
followingexample.
Encodedontwonumbers,anditsvalueas0x1234,0x5678
1)withaBERencoding
30
08
0,202,
123,43
4,025,
678
sequenceidentification
sequencelength
Alogo(integer)
Awordlengthof
thevalueofA
Blogo(integer)
Btheword
valueofB

2)AXDRcoding
112,345,678
sequenceidentity
valueAis
Bthevalueof
codehereisaAXDRinstance:
Note:ASN.1syntaxhere,buttheuseisstilldifferentencoding.
ASN.1syntaxDescription:(ThisdataframeisadataframeAARQ
part)::={dedicatedkeyresponseallowedproposedqualityofserviceSEQUENCE
xDLMSInitiate.requestOCTETSTRINGOPTIONAL,TRUE,
BOOLEANDEFAULT
[IMPLICITInteger8AXDROPTIONAL,Unsigned8,Conformance,
clientmaxreceivepdusize
proposedconformance
proposeddlmsversionnumber
Unsigned16}
0]Code:
01dlmspuuidentified
00//usageflagforthededicatedkeycomponent(FALSE,notpresent)
00 / responseallowedcomponent(FALSE,defaultvalueconveyed)00/ /usageflagforthe
proposed
/usageflagforthecomponent(FALSE,notpresent)06theAXDRofis

qualityofservice//encodinganUnsigned8itsvalue
5f/the[APPLICATION31]tagexplicit04//encodingtheofthe(4)
/encoding(ASN.1tag)length'contents'fieldinoctet
00/thenumberofunusedbitsinthefinaloctetoftheBITSTRING//encodingofthe///
/encodingof0010fixedlengthbitstringvalue.(LNSN)00
0080clientmaxreceivepdusizebytes)
(128(three)AARQwithAAREdataframe
with the basic concepts of syntax and coding, the following began to discuss specificDLMS
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,followingabout
howtocreateapplicationlayerconnection.
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
communicationconfigurationparameters.
AboutAARQ,AARE:

inthestandardapplicationlayerconnectionorientedservicecontrol(ACSE),inorderto
interactwiththeserviceusers,ACSEprovidesmanyfunctionalunits.InCOSEMuseonlytwo
ofthem:thekernelandtheauthenticationfunctionalunits.
(A)AARQ,AAREdetaileddescriptionofthedataframe(ASN.1syntaxdescription):
AARQapdu::=[APPLICATION0]IMPLICITSEQUENCE
{protocolversion{version1{version1},
applicationcontextnamecalledAPtitleAPtitlecalled
(0)}DEFAULT[1][2]OPTIONAL,
Applicationcontextname,
[0]

IMPLICITBITSTRING

AEqualifierAEqualifiercalledAPinvocationidAPinvocationidentifiercalledAEinvocationidAEinvoc
ationidentifiercallingAPtitle
[3][4][5]OPTIONAL,OPTIONAL,OPTIONAL,

[6][8]OPTIONAL,OPTIONAL,OPTIONAL,
APtitlecallingAEqualifierAEqualifiercallingAPinvocationidcallingAEinvocationidAE
[7]
APinvocationidentifier
[9]invocationidentifierfollowingsenderacserequirementsACSErequirementsfollowing
OPTIONAL,OPTIONAL,
notkernelThefieldshallonlybepresentifselected.
thethe is[10]IMPLICITis
Thefieldshallbepresentifonlyused.authenticationfunctionalunit
mechanismnamemechanismnamefollowingcallingauthenticationvalueauthenticationvalueimple
mentationinformation
is[12]IMPLICITOPTIONAL,OPTIONAL,
Thefieldshallonlybepresentifthefunctionalunitselected.
authentication
EXPLICIT
[11]IMPLICIT[29]implementationdatauserinformationassociationinformationAAREapdu{protocolve
rsionOPTIONAL,OPTIONAL}{version1},
[APPLICATION1]IMPLICIT[0]IMPLICIT
(0)}
[30]IMPLICIT::=SEQUENCE
{version1
BITSTRINGDEFAULT
applicationcontextname [1][2]

resultAssociationresult,resultsourcediagnostic
Applicationcontextname,
respondingAPtitleAPtitlerespondingAEqualifier
[3][4]
OPTIONAL,Associatesourcediagnostic,
[5][6]followingOPTIONAL,OPTIONAL,OPTIONAL,
AEqualifierrespondingAPinvocationidAPinvocationidentifierrespondingAEinvocationidAEinvoca
tionidentifier
[7]
ThefieldshallnotbekernelOPTIONAL,Thefollowingonlypresentifselected.
theresponderacserequirementsACSErequirementsthemechanismname
is[8]IMPLICITis
presentifonlyused.fieldshallbeauthenticationfunctionalunit
[9]IMPLICITfollowingisRespondingauthenticationvalue
OPTIONAL,
Thefieldshallonlybepresentifthefunctionalunitselected.
mechanismnameauthentication
EXPLICIT[29]implementationdataassociationinformation
OPTIONAL,OPTIONAL,OPTIONAL}
authenticationvalueimplementationinformationuserinformation
[10]IMPLICIT
IMPLICIT[30]

aremarkedasOPTIONAL,itemswhentheywereinthecompositionofthedataframecanbe
omittedThe.Butthereareafewexceptions:
1.
userinformationcarryingXDLMSinformation(XDLMSwillbeexplainedlater),cannever
beomitted.
2.
Serversidedeclaredasidentityverification(requestpassword),thenAARQ
themechanismname,senderacserequirements,callingauthenticationvalue,AAREin
theresponderacserequiremenmechanismname,t,respondingauthenticationvalueisnot
tobeomitted.Ifyouomittheseitems,therequesteddatawillberejected.
(B)AARQ,AAREtheinterpretationofthedataprotocolversion:
1
AARQ
frame:theACSEprotocolversion.Usethedefaultvaluedoesnotappearinthedataframe.
applicationcontexname:Thisisamustitemforthecurrentusageofthisvalueis
unique.(0x0x0x0x0x0x0x6085 7405080101,donotexplainthespecificmeaningcanbe
foundinIEC6205653The7.3.7.1)acse
senderandresponderrequirements:SpecifywhethertousetheACSEauthentication
function(requestdata,etc.),
usingBERbitstringencodedusingonlyBIT0bit.Thisbitis
thattheuseofauthenticationfunction
case:acserequirementssenderacserequirements
8a/tagforthefieldcomponentIMPLICIT,Contextspecific)////thecomponent
/02Len
the([10],(ACSErequirements::=BITSTRING(0).
BIT07/thenumberunusedbitsinthelastbyteofthe//ofthe
STRING)/of80encodingauthenticationfunctionalunitHighestpositionarestforunused
bits.
mechanismname:usedtoindicateinwhatAuthentication.Therearefourkinds.
callingandauthenticationvalue:PointedAuthenticationvalues
(iepassword).

userinformation:ContentisxDLMSInitiate.requestPDU,xDLMSInitiate.requestcontent
below.
::
={dedicatedkeyresponseallowedproposedqualityofserviceproposeddlmsversionnumberpropo
sedconformanceSEQUENCE
xDLMSInitiate.requestOCTETSTRINGOPTIONAL,OPTIONAL,TRUE,Unsigned8,
BOOLEANDEFAULT
[0]IMPLICITInteger8
Conformance,
clientmaxreceivepdusize
Unsigned16}
ThefollowingwereexplainedxDLMSInitiate.requestvarious

dedicatedkey:elements:indicatewhetherthedataisencrypted(ciphering).Usuallydonot.
responseallowed:whethertoallowtheresponse.Usuallyallows.
proposedqualityofservice:usuallydonot.
proposeddlmsversionnumber:currently6
proposedconformance:Thisisthemainpart,describingtheneedtoprovideXDLMSserverside
servicetypesandspecies.

Itisa24bitstring,asshownabove,eachonerepresentsaservice,specificallyexplainedas
Attibute_0(Bit_08)(Bit_09)Attibute_0
follows:SETnotissupportedreferencingwithissupported
isPriorityManagement
referencingwithsupportedGET(Bit_10)(Bit_11)(Bit_12)(Bit_13)(Bit_14)(GET,
BlockTransferwithservicesupportedBlockTransferwithservicesupportedsupported
BlockTransferwiththeserviceisthetheSET
isACTIONis
supportedMultiplereferencesare
GETSETAllLNservicesACTION,EVENTare20,22,23)issupported(Bit_21)
,NOTIFICATION)supported(Bit_19,SelectiveAccessfeature
avarietyofservicesprovidedhere,forthecollectormeter,themostimportantthingforthe
collectorserviceisGETservice,thereaddata.Normallythisbitstringof24bitsisdefinedas
0x00,0x00,0x10can.LNservicesthatuseonlytheGETservice.
clientclientmaxreceivepdusize:sidereceivingdataatthemaximumlimit.Setto0x0000
indicatesthatusingthedefaultsettings,theapplicationlayerdataunitforamaximumof128
bytes.
Example:Thefollowingisthelongestdataunitreceivedan
R:
7EA88C0300220023BA884D
//HDLCheader
00000002020F00161E0203090601013E0800FF0600000002000202000002
020F00161E0200000002020F00
00020F161E030906010108FF064B097403090601011708FF067E721620020309
0601012B0800FF060000012C02020F0016200203090601013F0800FF0600
00000002020F001620020309060101030800FF0600007F
/
/applicationlayerdataunit128bytes
2AEA7E
//HDLCframeend
(IMPORTANTimplementations,(5F)Forcompliancewithexistingencoding[Application31]tagononebyte
of
oftheinsteadtwobytes(5Fisacceptedwhentheconnectionoriented,HDLCbasedprofileis
used.)protocolversion:1F)

AARE
3layer,I.e.ACSEprotocolversion.Usethedefaultvaluedoesnotappearinthedataframe.
result:ClientServerclientconnectionrequestsfortheresultsofresponse
resultsourcediagnostics:ClientServersideconnectionrequestrejected,thereasonsgiven
here.
applicationcontextname:WithAARQ
respondingauthenticationvalue:WithAARQ
userinformation:ContentisxDLMSInitiate.rexDLMSInitiate.responsesponse
PDU,readsfollows.
as
::=SEQUENCE
negotiateddlmsversionnumbernegotiatedconformanceservermaxreceivepdusize
{negotiatedqualityofservice

xDLMSInitiate.response
Unsigned8,Conformance,Unsigned16,

[0]IMPLICITInteger8

OPTIONAL,
vaaname
ObjectName}

ThefollowingwereexplainedxDLMSInitiate.responseofvarious
negotiatedqualityofservice:elements:

correspondsxDLMSInitiate.requesttheproposedqualityofservice,usually
donot.
negotiateddlmsversionnumber:correspondingxDLMSInitiate.requestthe
proposeddlmsversionnumber,iscurrently
6
negotiatedconformance:HereistheserversideforclientsiderequestXDLMSserviceresponse.
Ifyouallowclient
toclient'srequest,
onthecorrespondingposition1.Bitstringmodelwith
xDLMSInitiate.requestTheconformancesame
serversideservermaxreceivepdusize:applicationdataunitcanreceivethemaximumlimit.For
thecollector
isconcerned,usually
notverylongtotheserversendsdataframes.
vaaname:Thisiscurrentlyuseless,serversideonlyrespondtoadefaultvalueof0x0007.
3otheritems
AARQ,AAREdataframelabeledotherOPTIONALitemsthatcannotappearinthedata
frame,ifonceappearedattheclient,whilenocorrespondingserversideprocessing,theserver
sidewillskiptheseitems,withouttreatment,withoutaffectingtheconnectionestablishment.
Fourexamples
givenhereaAARQ,AAREcommunicationexample.

//Aarq
S: 7e a047002200230310d05ee6e6006036a1090607608574050801018a0207808b07608574
05080201ac0a80084142434445464748be10040e01000000065f1f040000081d00009a7a7e
explains:
{7e
a047//
//

/22002300
03
10
d05e
00e6e6LLC////////////
{60
/AARQtag
36lengthlength
mustbeapplicationcontextname
tagapplicationcontextnamea1forcomponentthethecomponent
Thein.the09oftaggedvaluefield
06
type
choice
for
applicationcontextname
IDENTIFIER,(context_idreferncing)important
Universal)
07/Len////
data(OBJECT/60857405080101=1meansLN
COMMENT by DL: The mostpart of this / that it chooses LN referencing or SN / /the
senderacserequirements//thethe
applicationcontextname

/referencing.

component

component,

encodingacserequirementsfieldcomponent([
isencodingfield8atagfor
(tagged[10]10],IMPLICIT,senderacserequirements(ACSErequirementsSTRING)
02/Len/////
Contextspecific)/thecomponent::=theofthetheBITSTRING
BIT07numberunusedbitsinlastbyteof
80 encoding authentication functional unit / / encoding(tagged[11])/
/([11],Contextspecific)//
(0)mechanismnamecomponentcomponentmechanismnamecomponent
/ofthethe8bthetagfortheIMPLICIT,
07lengthtaggedcomponent'sfieldvalueofcomponent
ofvalue60857405080201/ObjectIdentifier//////
the/actagformechanismname([12],Contextspecific)
thethethethethe0aLen
80choicefor[0]IMPLICITinformationcan'tinformation
08/Len////
4142434445464748
theAuthenticationinformation/*ignored.*be
(charstringGraphicString)Userbeuser(xDLMScontext)
10/to//(OCTETUniversal)//Lenbytes//
{04
/(accordingdatatypechoiceforuserinformationSTRING,04
Lenbytes)0e=14
01000000065f1f0000081d0000
theoctet
the
xDLMSInitiate.request{dedicatedkeyresponseallowedproposedqualityofservice
/*
sequencexDLMSInitiate.request::=SEQUENCE
OCTET
STRINGTRUE,OPTIONAL,
OPTIONAL,BOOLEANDEFAULT
ofPDU.

[0]IMPLICITInteger8

proposeddlmsversionnumberproposedconformanceclientmaxreceivepdusizeclientmaxreceivepd
usize0x4B0.the Unsigned8,Conformance,
Unsigned16}
Theis1200D=
/*//
*
/01tag(explicitDLMSPDUCHOICEthepresent)the
///fordedicatedkey////responseallowed
tag) /dedicatedkey00usage flag component (FALSE, not 00usage flag
forcomponent
responseallowed
ofthedefaultvalue(FALSE,present)
///proposedqualityofservice//proposedqualityofservice
(FALSE,conveyed)/proposedqualityofservice00usageflagforthecomponentnot

06 /the Unsigned8 its value / /proposedconformance/ / encoding the/ /


encodingtheofthe
/AXDR
anis5f1f[APPLICATION31]tag(ASN.1explicittag)

encodingof04length'contents'fieldofofinoctetofof(LNSN)
inoctet/thenumberunusedbitsthefinaltheBITSTRING00//encodingthe///
(4)00encoding081dfixedlengthbitstringvalue.
/clientmaxreceiveAXDR
pdusize00/encodinganUnsigned16itsvalue./}}//000000
/*
7e}
of9a7a
7E

theisaare
00R: A0 53 032223 30 40 A6 E6 E761 42 A1 09 06 01A203 01 A3 05 A10302010002070760857405
08020108
07 60 85 74 05 08 0102008880 89AA 0A 8041 42 43 44 45 46 47 48 BE 10 04 5F 1F040000
0800000000COSEM_Application_Context_Name06
081D21340772A4
{7E{A1
7E
A053
03
002223
30
40A6
E6E7
61/tag//AARE//
/AARE42len
0E
09
06/Objectidentifier//=//////type=//=
/=07length07length
60857405080101
A2TagofAssociationresult,
ofAssociationresult,03Len
type02structure
011
00////
/*
::=INTEGERrejectedpermanentrejectedtransienttheresultthe
{accepted
(1),(2)}(tagged[2])
Associationresult

(0),componentcomponentencoding
encodingA2tag&lengthresultcomponentofcomponentresultcomponentforresult
the03/thelengthofthetaggedsvaluefieldencodingthe//encodingthe
Contextspecific)encoding(INTEGER)(INTEGER,
for([2],/02choiceUniversal)octets)accepted)
01/lengthofresultsfield//encodingofvalueofResult///of
/encodingvalue(100Associatesourcediagnostic,
*
ofthethethethe(0,A3Tag
05/Len/Associatesourcediagnostic{acseserviceusernoreasongiven

A1
03
020100
/*
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

encodingcomponent([3],Contextspecific)
[3])A3 / the resultsourcediagnostic component / / encoding thethecomponent/ / encoding the tag
for
/the05oflengthoftaggedsvaluefield
encodingtagforA1CHOICEofthethethe(INTEGER)theresultsourcediagnostics(INTEGER
the03/lengthoftaggedcomponent'svaluefieldencodingcomponent//encoding
acseserviceuser(1)encodingresultsourcediagnostics
/02choiceforoctets)0,provided.
Universal)01/lengthoffield(1//encodingofvalue://///
,/encodingofvalue00nodiagnosticsignored.
*
theContentsbelowcanbe
thethe88IMPLICITACSErequirementsOPTIONAL
0202
0707
8080
89/IMPLICIT//authenticationvalueOPTIONAL///xDLMS
608574050108
/OPTIONALAAEXPLICIT
0A
08
4142434445464748
Userinformationmustbeexist.
*
mechanismnameInitiate.response::=SEQUENCE
{negotiatedqualityofservice
negotiateddlmsversionnumbernegotiatedconformanceservermaxreceivepdusizevaaname
[0]IMPLICITInteger8Unsigned8,Conformance,Unsigned16,

OPTIONAL,

ObjectName}for
*//////
BEUserinformationcontext)theuserinformationUniversal)thethe(
10
{04
/encodingchoiceencodingOCTETSTRING
(xDLMS(OCTETSTRING,0Eoflength
of
s
value
field
octets)xDLMSInitiate.responsetag)(InitiateResponse)
14///encodingthethePDU//encodingthe
encodingPDU08tag(explicitDLMSCHOICEnegotiatedqualityofservice
/AXDRtheofcomponent(FALSE,notpresent)(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[APPLICATION31](SIZE(24))5F1Ftagexplicit

04encodinglength 'contents' field (4)encoding ofofinoctet ofencoding


oflengthencoding

thethein octet /the numberunused bitsthe finalthe bitstring /


/the00//the
/fixedBITSTRINGvalue
00081D
ofserver component 0x01F4)AXDRUnsigned16valuecomponent
(Unsigned16,value=
maxreceivepdusize(Unsigned16,value2134/anisits//encodingthe
=/theencodingofVAAName0x0007forLNandFAforSN)0000
0007//theAXDRencodingofanUnsigned16isitsvalue.07==LN
}}
72A4
7E
(four)thenecessarydatarequestframe,andresponseframes
at the application layer connection is established,client canrequestdatafromtheserver.Here
onlytwobasicdatacommunicationframes.
AllDLMSapplicationdataframeisCOSEMpdupartofthefollowinglistedfirstCOSEMpdu.
::=standardizedinitiateRequestreadRequestwriteRequestinitiateResponseCHOICE{
COSEMpduusedinCOSEMDLMSPDUsInitiateRequest,
DLMSPDUs(noencryptionselected30)
[1][5][6][8]IMPLICITIMPLICITIMPLICITIMPLICIT
ReadRequest,WriteRequest,

readResponseReadResponse,
writeResponseWriteResponse,confirmedServiceErrorConfirmedServiceError,
unconfirmedWriteRequestUnconfirmedWriteRequest,
informationReportRequestInformationReportRequest,aarq
InitiateResponse,
[12][13][14][22][24]
IMPLICITIMPLICITIMPLICITIMPLICIT

twoACSE
APDUsAARQapduAAREapdu
theaareGETRequest,SETRequest,EVENTNOTIFICATIONRequest,
APDUsusedfordatacommunicationservicesusingLNreferencing
getrequestsetrequest
[192][193][194]
IMPLICITIMPLICITIMPLICIT,
eventnotificationrequest
actionsetresponseACTIONResponse,glo
IMPLICITIMPLICITIMPLICITIMPLICIT
requestACTIONRequest,GETResponse,SETResponse,
getresponse

[195][196][197][199]

actionresponse
globalcipheredpdus
glosetrequestgloeventnotificationrequestgloactionrequestglo
[200][201][202][203]IMPLICITOCTETIMPLICITOCTETIMPLICITOCTETIMPLICIT
OCTETSTRING,STRING,STRING,STRING,
getrequest

getresponseglosetresponsegloactionresponsededgetrequest
[204][205][207][208]IMPLICITOCTETIMPLICITOCTETIMPLICITOCTETIMPLICITOCTET
STRINGSTRING,STRING,STRING,

dedicatedcipheredpdus
,STRING,STRING,dedactionRequestSTRING,STRING,
dedsetrequestdedeventnotificationrequestdedgetresponseded
[209][210][211][212]IMPLICITOCTETIMPLICITOCTETIMPLICITOCTETIMPLICITOCTET

setresponsededactionresponse
IMPLICITOCTETSTRING,

[213][215]IMPLICITOCTET

STRING}
heretoexplainOBIS:
adatarequestframe,theremustbeCosemAttributeDescriptorentry:CosemAttributeDescriptor:
=SEQUENCECosemClassId,CosemObjectInstanceId,CosemObjectAttributeId}
{classid
:
instanceid
attributeid
whereclassidattributeidbythereferencesofarticle[1]definition.
CosemObjectInstanceIdbythereferencesofarticle[5]definition.
Fromreference[5]definesthecontentthatOBIS.ItisdefinedbyasetofcodingCOSEMof6bytes
long.Hisroleistoprovideadatatypeforeachuniquecode.AboutthespecificcontentofOBISRefer
toReferences[5].
1.
Datarequestframe
::=CHOICEGetRequestNormal,getrequestnextgetrequestwithlist
{getrequestnormal

GETRequest
GetRequestNext,
[1]IMPLICIT
GetRequestWithList}

IMPLICITIMPLICIT[3
[2]

GetRequestNormal::=SEQUENCE
{invokeidandpriority
InvokeIdAndPriority,CosemAttributeDescriptor,
]cosemattributedescriptor
accessselectionparametersCosemAttributeDescriptorCosemClassId,CosemObjectInstanceId
,Cosem
SelectiveAccessDescriptor
OPTIONAL}CosemObjectAttributeId}
::=SEQUENCE
{classid
instanceid
attributeid

OCTETSTRING(SIZE(6))::=
ObjectInstanceId::=CosemObjectAttributeIdInteger8
torequestareverseactiveasan
example:S:7ea01c002200230354bd5ee6e600c0018100030101020800ff02009f367e
explains:
7ea01c002200230354bd5ee6e600/Hdlchead//
/c0CosemRequestinvokeidGetDataResult
getrequestapdu[192]and
/Nomal//////0101/
/81(0000001)priority(1)id
00=data00
03Class
010208ff/reversetotalactiveOBIS
0200//reversetotalactivesecondattributerange.
9f367e//HDLCTail
2.
dataresponseframe
::=CHOICEGetResponseWith
{getresponsenormal
GETResponse
[1][2]IMPLICITIMPLICITGetResponseNormal,
getresponsewithdatablock
InvokeIdAndPriority,
getresponsewithlistGetResponseNormalGetData
[3]
IMPLICIT
GetResponseWithList}
::=SEQUENCE
{invokeidandpriority
Datablock,
result
dataaccessresultDataAccessResult}{nulldata
Result}
Data,Data::=CHOICECHOICE
{data
GetDataResult[0]NULL,
[0][1]IMPLICITIMPLICIT
::=

array
SEQUENCEOFIMPLICITSEQUENCEOFData,
IMPLICITIMPLICITSTRING,IMPLICIT[6
structure
[2]
boolean
IMPLICITData,[3]BOOLEAN,
bitstringdoublelongdoublelongunsigned
[4]BIT
[5]Integer32,
[1]IMPLICIT33,IMPLICITSTRING,IMPLICITIMPLICIT
floatingpointoctetstringvisiblestring
]IMPLICITUnsigned32,[7]
(SIZE(4))[9]OCTET[10][11][13
OCTETSTRING
VisibleString,
time
GeneralizedTime,
bcd
IMPLICITInteger8,IMPLICITIMPLICIT
IMPLICITIMPLICITTypeDescription
integer
Integer8,[15][16][17][18][19][0]
longlongunsigned
Integer16,
unsigned
Unsigned8,
compactarray{contentsdescription
Unsigned16,
IMPLICITSEQUENCE
],long64Integer64,Unsigned64,ENUMERATED,(4)),
arraycontentslong64unsigned
OCTETIMPLICITIMPLICITIMPLICIT
IMPLICITOCTETSTRING[
STRING}
IMPLICIT[20]
[21]
enum
[22]
float32
[23](SIZE
float64
[1]OCTETSTRINGIMPLICIT(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)}

inresponsetoa"requestreverseactive"for
example:R:7EA018030022002374E413E6E700C40181000600357B18CDE87E
explained:
7EA0180322002374E413E6E700/Hdlchead////00////
/C401ResponseNormal
81invokeid(0000001)andpriority(1)
00bydata
06datalength
00357B18//reverseactivevalue
CDE87E//HDLCTail
V.tothereceiveddataframedismantling
received request dataare encoded according AXDR. Of the received data framedatastructure
inthereference[7]aredetailedexplanation.
Thefollowingexampleshowsthedataframeanalysis:
Load_profileS:
/hdlclink//
/SNRM
Example: 7e a0 21 00 22 00 23 03 93 0b 14 81 80 12 05 01 80 06 01 80 070400000001080400 00 655e
7e7E0000070000000000007Eaarq
/UA//
0007R:A0210322237328F08180120501800601800401080401533B
/
S : 7e a0 47 00 22 00 23 03 10 d0 5e e6 e6006036a1090607608574050801018a0207808b076085
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 040000081d00009a7a
7e7E00000006
//aare
0006R: A0 53 032223 30 40 A6E6 E76142A1090760857405080101A203020100A3 05 A1030201
00 88 02 07 80 89 07 60 85 74 05 08 02 01 AA0A80084142434445464748BE10040E0800065F1F
0400081D2134000772A400007E00007E00
//
007E7ea02212877e03222331S:7ea00a
S:230331R:0A3F84
0aA012877e7E0300220023317E7e002200230300000000
310A3F84S:
//requestdata
222303R:A0a01c328d58e6e6c00181
0007 63ff010101strures010101FF
000000000200
44587e7E
0100R:A04F0322235207E2E6E7C481
/1array////
8002/06606
091B 1
02021B02020F03161B
/2//////
021B0601010009FFFFFFFFFFFFFFFF09
0F0316
4
09FFD305080C07
5
0C07D30517FFFFFFFFFFFFFFFF //6

/3

F6CE7E
7ea00a0014e47e0300220023517ES:7ea000220023030000
S:002251R:0A39E7
23037EA01c54bd5ee6e6c0018107
ffff85ff026202
020000000000
7a7e7E23
6223R:A88C032274FAE6E7C4810101
01/arry//////
/1arraytotal
structurestructure
total3452
03/3structure//obiscode//
0906
010115080000000000000000
02/0115 08 FFoctet 6
byteslong,(01FF)(0x06),(00
06
00
string,Unsigned32
data)unit.02strcture,strctures.Integer8data62056pdf(0x16),
020202 /andtyp=num=2//(0x0f),////
0F00 /scalscal:(0x00)unit:
161E ENUMERATEDdata=enum.This(Byaccording(Suchstucture)
(0x1e/befoundedinBluebook3rdedition.//DL)://can
wh)/unit:attentiontoXDR,whenadatatypeasoctetstring,array,
can' express a data length should exist.On the otherhand,whenthelengthcanbe expressedbythe
dataInteger8,Unsigned32,ENUMERATED),thelengthbytearnn't
tthedatalength,byte/type(suchasandexist./
//BER??
0302020203020202
0129060000000000090601010800FF060000000000
1E0F161E

020600 0F16

090108FF3D
030303
0202020202
02

0101060000000000090601010800FF060000090601010800
0F1E160F161E
0901FF16
082AFF

0600

2E6EFE
000000000000000006

9E5D7E7E
007ea00a2271c57e0322231603
S:23R:A88C76E841
0202 160F1E
0302
0609 01013E08000000000000FF000000FF0000000000060202060206020202060602 0F16
1E0F161E
020303
0909 FF0108010108 2E6EFE
0117
0202020202020202
0F1620000000000F00162000000000000F001620
030303
0609060609 00012BFF010108FF
0682
01083F
090606010108FF000000000000030300000003 00

CB7E7E
037ea00a22239118227e2223
S:R:A88C7896A8
820202
0F1620
02
09060906060906
0118000001010800FF0000000001010800FF 0600 C2 EE 0202 0302
020203 0F16200F1620
0302
0108FF2C
82
40
0000000200020600060002020002060006000000000202000F16200F16200F
02030303
0609090104FF010108FF
C370
010819
16200000000000000000
0203030302
0906 0001012D08FF 020650
88CB7E7E
037ea00a2223b11a7e2223
S:R:A88C7A848B
0F162000000000000F001620000000000F001620
030202020302020203
09060906060906
000141FF010108FF
0206
010805 50
011A000000000001010800FF0000000001010800FF00 00060202060602020206060F16
200F1620
020303
0909 0108FF2E
32
42
00000200020000000002020000 000F16200F
02030303
090606
010108FF
0632
B9E07E7E
7ea00a2223d11c607e
S:R:A88C2200237CB2000000EE000000000000
0016201620
0303020202030202
0906090606 011BFF010108FF
EE06C2 0F0F
01082F 0264
162016201620
03020202030302020203
09060906060906
0143000000000001010800FF00000101020600 0F0F
0108FF07
C352
1C00000000000800FF000000000000 0006020206060202
0F200F16
020303
09
08FF010130 1E
16
A8C8
7ES:7ea00a2223f11e417e7E7E
R:A88C220023A0CD0300000000000003000000
2020
0302020202
0906090606 000144FF01010808FF 06
0F16
0108
1E02000200000000000202000200000002020200000F200F160F16
020303
0906090606 011DFF010108FF
06
161F1F
010831 62
030202020302020202
0609060906 0145000000000001010800FF000000 020600 0F161F0F161F
090108FF
62
5B0C

7ES:7ea00a001110a67e7E03002200230300000003
2223R:A88C70DE24
03
00011E08FF062E8DB202020F161F0209060101
0906013200000000020002060800FF060000000002020F00161F0203060800FF0600
0800FF06020F161F03090146090101
010A2E8DB2021F020302000000000002020F0016020303000000000002020F00160203
020F00160906FFFFFF06FF0906FFFF08FF06FF
08
09
1CEB7E7E
7ea00a003112877e0300220023000000000000
S:222303R:A88C72CC07
0006FF04FF08FF0602020F16FF0203030303
05 FF FF 06 00 00 00 00 02 00 FF020906FF02FF0800FF060000000002020F0016FF020906
FFFF0800
0906FF0800020F16
00 00 00 02 00 FF 0206FFFF00FF060000000002020F 00 16 FF020306FFFF00FF0600000000
0202
FF0600020F16030904080908
050F16FF000003030000FF00FF0000000002
FF090606
29957E7E
00037ea00a22235114e47eA02223
06S:R:5B748C7C08

020203FFFF00FF0000000002020F0016FF 02 03FFFF00FF0000000002020F0016
FF0203
020F0016FF06070806090608080609
0906FF09FF08FF060000000002020F00FF0000160000
0B2E7E7E7E
00167ea00a22230371c57e03222371S
R:A00A3BC6
S:7ea0007e0300220023717E7ea00a00220023037116c57e7EA00A03002200
:00222371R:0A3BC6R:
0a16c57EA0S:
033BC67E23717E23713BC67E23717E
23717ea000037e03002200S:7ea00a0022000316c57e
0022R:0AR:
S:0a16c5A0
007E0022002303717EA00A0300220023713BC67E0022

A00323717ea016c57eS:7ea00a
0A3BC6R:
//disclink
0022S:0a5306c77e7E030000237E
002303R:A00A221F434C
six,examplesoftherequesteddata
hereareafewdatacommunicationexamplesforprogrammersprogrammingreference.
1.
Requestconsumption,
RequestForwardtotalactivepowerandsubratepower.
0A00930A7E7EA0030022002301010000000100000001
S:7EA00022230301R:217328F08180120580068007040804533B7E
7ES:A0 46 00 22 00 23 03 10 05 C1 E6E6006035A1090607608574050801018A0207808B076085
74 05 08 02 01 AC 0A 80 08 41 42 43 44 45 46 47 48 BE 10 04 0E01 0000 5F04000000140000BDBF
7E00000006
00067ER:A0 52 032223 30 95 39 E6 E761 41 A1090760857405080101A203020100A305A1030201
00 88 02 07 80 89 07 60 85 74 05 08 02 01 AA 0A80084142434445464748BE0F040D0800065F04
0000142134000714537E7E00000000007E7E00
00S:1B222332959FE6E6C001810301010108FF020CF6R:A00322
A0031852D057E700C400060006985A607E1B000023E6E60001810001010101
0023E601811B7ES:A0220354A599C00408FF02DE307E7E7E7E
R:180074E413E700C400060001C714A054S:A00022002303E6E600018100
A003002223E601811B76B59BC00401010802FF02BADF7E7E017E7E
01R:180096F8D7E6E700C48100060003175E7D53S:A00022002303
A0030022231B98C595E6C0000401010108FF0266857E7E030000E60001810000017E7E
E600018103R:A0182223B8841FE7C4063D2649C7S:
1B00BAD597E600C000040101010804FF0263097EA00300220023E60001810000
A000222303E601817ER:18DA905FE7C40600007BDF7E7E00007E7E00007E7E00007E
00A00A221C60R:A00A032223D1S:A00A222303R:
D13163
23035306C7
S:7EA00A03002200237329E57E

2,requestinginstantaneousvolume(voltage,current,power)
0A00930A017E7EA00300220023
S:7EA000222303R:217328F08180120180018004000001080400000001533B7E000005000607
050607007ES:A0 462223 03 10C1 E6 E660 35 A109608574050801018A0207808B07608574050802
01AC0A80084142434445464748BE10040E01000000065F04000000140000BDBF7E
R : 7E A0 52 03 00 22 00 23 30 95 39 E6 E7 006141A109060760857405080101A203020100A305
A1 03 02 01 00 88 02 07 80 89 07 60 85 7405080201AA0A80084142434445464748BE0F040D08
065F04000000142134000714537E0000
007ES:A01B22230332959FE6E6C00001011F0700FF0D917E7E0300000001810000027E7E0000
0001810302R:16222352F1D1E6E7C4123353S:A022
A01B54A599E6C0000301010700FFAC867E03000023E6000181000002337E
2303E600018133027ER:A0162274C595E7C41253
S1B0076B59BE600C000030101470700FF024FBE7E7EA00300220023E600018100
:7EA000222303E60181R:1696D951E7C41233537E7E0000000000027E7E0000
02S:1B2298C595E6E6C001810301012007FF202FR:A0032223
00A0230316B8A599E7C400120001A8617E7E0000E6E6000181000101007E7E
E6000181S:1B2223BAD597C0033407FF0270B6R:A003
A0031600DAB1D9E700C400120001A8617E00220023E6E600018100010100
002223E601817ES:A01B03DCE591C0034807FF02B3D47E7E7E7E7E7E
R:1600FC859DE6E700C4018100120001A861S:A00022002303R:A003002200
A0030022230AF11E410A
F133427E7E237E7E237E

23S:005306C7R:A00A03002200
A00A0022037329E5

3,therequestloadcurve
S:7EA00A0022002303930A7E010101017E7E
0121007328F08180120580068007040000000804000000533BS:A00022002303
7ER:A003 00 22234610 05 C1 E6E6006035A1090607608574050801018A0207808B0760857405
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 41A1090760857405080101A2030201A305A103020100
88020780890760857405080201AA0A80084142434445464748BE0F040D0800065F040000
00142134000714537E
S : 7E A0 3C 00 22 00 23 03 32 0E 3B E6 E6 00C0018100070000630100FF020101020400090C07
D30609
FFFFFFFFFFFFFFFF090C07D30AFFFFFFFFFFFFFFDE827E0606

FFFF

06FF7ER:A8 8C 03 00 22 00 23 52 CE 26 E6 E7 00C40181000122020202090C07D309091D0DFFFF
FF040640000000100000100000020600000000100000100000020600000000100000100000
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,0001,000,000,206,000,0000,010,000,010,000,002 0000839E7E7E00007E7E000000000000
0006000000000000
00S:A00A225114E4R: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,002000000000010000002F9317E7E00007E7E00000600000000100000
00S:A00A227116C5R:032223
06 1023 03A8 8C56 EA 6010000002060000000010000010000002060000000010000010000002
06 00 00 00 00 10 00 00 10 00 00 020600000202090CFFFFFFFF FF0F 08 34 FFFFFF FF04064002
02 09 0C FF FF FF FF FF 0F 0E1F FFFFFF FF0406401000001000000206000000001000001000
00020600000010000010000002060000000010000014247E7E00007E7E0000
00S:0A22911822R: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 060000000010000010000002
06 00 00 00 00 10 00 00 10 00 000206000202090CFFFFFFFF FF11230CFFFF FFFF0406400000
1000100000A21B7E7E00007E7E00007E7E00007E
00S:A00A22B11A03R:A00A032223S:A00A222303
23035139E7
5306C7
R:7EA00A03002200237329E57E

4,requesttime
0A00930A7E7EA0030022002301
S: 7E A000 2223 0301R:2173 28 F0 8180120580 80 04 000001 0400000001533B7E00000006070801
01
06 010700087ES:A0 462223 03 10 05 C1 E6E66035A109608574058A0207808B0760857405080201
AC0A80084142434445464748BE10040E010000065F04000000140000BDBF7E00
007ER:A0 52 0322 00 23 30 95 39 E6 E7 00 61 41A109060760857405080101A203020100A305A1
03 02 01 00 88 02 07 80 89 0760857405080201AA0A80 4142434445464748BE0F040D08 065F
04000000142134000714537E0000000008
08007ES:A01B22230332959FE6E6C0018100000002462F7E7E0000000100FFFFFF007E7E
0001FFR:A02103222352A3C0E6E7C481090C07D3060E060E0D031038S:
0014E47E7EA00A0300220023517E7EA00A00220023037E7EA00A0300220023
A00A002251R:39E7S:R:
23035306C7
7329E57E

article to end here. DLMS protocol is a thoroughunderstandingoflargesystemsengineering.


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
referenceincorporatedhereinbyreference,willhelptounderstandthisarticle.

Addedone:
ForSNReferencingexplanation
WhenSNreferencingisused,theattributesandmethodsofeachinterface
objectaremappedtoDLMSthethenamedvariables.Thisisdoneduringdesignofmeter.
namedEachvariableidentifiedwithisashortwhic1,isah16bitunsignedinteger.name,Attribute
thelogicaloftheobjectismappedtoaDLMSnamedvariableidentifiedbyaname.
namebaseExceptinthecaseofafewspecialobjects,therearenogeneralrulesdefinedfor
assigningbasenames.Allotherattributesandmethodsoftheobjectarethenalsomappedto
DLMSnamedvariables.Theoffsetsbetweenthebasenameandtheshortnameidentifyingthe
otherattributesandmethodsaredefinedinthedefinitionofeachinterfaceclass.Theactual
valuesoftheshortnamesthusdependonthenumberandkindofobjectsinstantiatedandthe
mappingstrategyused.Thebasenamesallocatedinthemeteringequipmentcanberetrieved
byreadingtheobject_listattributeoftheSNAssociationobject.WhenSNreferencingisused,
theDLMSnamedvariablesareaccessedbythestandardDLMSREADandWRITE
services.(s).OBIS.
WhenLNreferencingthethethethetheWhenisused,attributesandmethodsare
accessedvialogicalnameofobject,specifyingindex(es)ofattribute(s)and/ormethodLogical
namesaredefinedbyLNreferencingisused,theattributesandmethodsareaccessedbythe
xDLMSGET/SETandACTIONservices.
from"DLMSUserAssociationFrequentlyAskedQuestions")Referencing
(ReferencingSNUnlike LN Referencing It uses an integer (WORD) ie Short Name, place of LN
Referencing the OBIS. Short NamebythemanufacturerscustomforSiemensDtype tableusingtheSN.
therefore only in the case of manufacturers to provide SN, SN can use theapplicationcontextname
accessstatementThedatabelow
isanexampleofSNdatarequest
frame:S:E60102FF08A0E07E7EA011032132B73DE6E60005
7EA011032132B73DE600
05//SNapplicationtnamecontexReadRequest
0102FF08//shortnameand
attribute???
A0E07E

addedtwo:
CurrentlyDLMSprotocolusedintheCLASSIDandOBIS
Dataname
clock
goingactive(total)
goingactive(ratesa)
goingactive(ratestwo)
going active (rates
three)
going active (rates
four)
Antilikeactive(total)
Antilike active (rates
a)
Antilike active (rates
two)
Antilike active (rates
three)
Antilike active (rates
four)

CLASSID
080000000000
030000
0004
0400
0400

OBIS
0001ff
0001010108ff
0101010801ff
01010108ff02
0101010803ff

ATTRIBUTE
02
02
0200
0002
0002

0004010101

0804ff

0200

030000
0400

00010108ff02
01010801ff02

02
0002

000401

010802ff02

0200

0400

01010803ff02

0002

0400

04010108ff02

0002

Activepower(total)
ReactivePower(Total)
L1voltage
L2voltage
L3voltage
L1Current
L2Current
L3Current

0003
030000
030000
030000
030000
030000
030000
030000

2003626

01010107ff00
00010107ff02
0001011f07ff
0001013307ff
0001014707ff
0001012007ff
0001013407ff
0001014807ff

0002
02
02
02
02
02
02
02

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