Danfoss M-Bus Operating guide

01.02.00 © Danfoss| Energy Meters| 2018.02| 2
1 Basic information .................................................................................................... 4
1.1 The physical layer ............................................................................................. 4
1.2 Wake up process and baud rate changes (IR) ....................................................... 4
1.3 Baud rate changes ............................................................................................ 4
1.3.1 Wait time before reply after correct message reception .................................... 5
1.4 Data Link layer (DLL) ......................................................................................... 5
1.4.1 C field (Control field, Function field) – Field size 1 byte ................................... 5
1.4.2 A Field (Address Field) – 1 byte .................................................................... 6
1.4.3 L Field – 2 fields with a size of 1 byte ............................................................ 7
1.4.4 CS field – 1 byte ......................................................................................... 7
1.5 Combined Transportation and application layer ..................................................... 8
1.5.1 CI Field (Control information field) ................................................................ 8
1.5.2 Long header ............................................................................................... 9
1.5.3 Status byte and error handling ................................................................... 10
1.5.4 DIF & VIF configuration of data records ........................................................ 11
1.6 The standard read out ..................................................................................... 13
2 Communication process ......................................................................................... 16
2.1 M-Bus EN 13757 data frames ........................................................................... 16
2.2 Pulse readout ................................................................................................. 17
2.3 Application reset ............................................................................................. 17
2.4 Send/Confirm procedures available using the Danfoss Meter ................................. 21
2.4.1 SND_NKE ................................................................................................. 21
2.4.2 SND_UD .................................................................................................. 22
2.4.3 REQ_UD2 ................................................................................................. 34
2.4.4 RSP_UD ................................................................................................... 35
Annex A ..................................................................................................................... 36
01.02.00 © Danfoss| Energy Meters| 2018.02| 3
Identify the needed telegrams from the EN13757 standard and determine how to implement the SonoSelect 10 and SonoSafe 10 communication protocol into an M-Bus telegram. This
document contains the description the M-Bus protocol implemented for SonoSelect 10 and SonoSafe 10. The M-Bus protocol will follow the EN13757 standard.
According to the software architecture of the SonoSelect 10 and SonoSafe 10 the communication shall be split into three layers.
Figure 1 - OSI model and architecture of HM
The M-Bus protocol for the IR and Wired communication will be identical and therefore these two components will share the same data-link and application layer. The M-Bus will only
support physical, data-link and combined transportation and application layer. The other layers
stated in EN13757-3 are optional and will not be part the wired M-Bus implementation of the SonoSelect 10 and SonoSafe 10. According to the EN13757-1 standard the transportation layer must be handled in an Application Layer.
01.02.00 © Danfoss| Energy Meters| 2018.02| 4
The physical layer is a serial asynchronous half-duplex communication.
The meter act as a slave and each character communicated consist of 11-bits as shown below:
1 start bit (‘Space’)
8 data bits
1 parity bit (even)
1 stop bit (‘Mark’)
The master issues a request and the slave respond.
Since the optical interface uses the EN 13757-2 protocol, a wake-up message can be sent after
every ¡die time of> 330 bit times to the heat meter. The wake up message consists of zeroes
and ones alternating at the desired baud rate for a duration of (2,2 ± 0,1) s. After an idle time
of 33 bit times to 330 bit times, the communication can start.
The baud rate requirements from EN13757-3 are as follows:
The IR supports 2400 and 4800 Baud
The wired baud rate supports 300, 2400, 4800 and 9600
Baud rate is kept after reset of device.
Meters with hardware issue 5 have auto baudrate detection on both the IR and Wired M-Bus interface.
Maximum data records:
The maximum data record length is 235 bytes
Wildcard search (Secondary address)
Secondary address is found by using a wildcard search (CI = 52H). The top positions are run
through in ten selections from 0-9 (0FFFFFFF – 9FFFFFFF). If slave is found it answers with an ACK and the master requests the full secondary address which is returned in a RSP_UD from the slave. Any collisions and the master vary the next positions and hold the existing one.
01.02.00 © Danfoss| Energy Meters| 2018.02| 5
After reception of valid telegram the slave has to wait between 11bit time and (330 bit times + 50ms) before answering (EN1434-3)
Baud rate
Min.
Max.
300 Baud
36,7ms
1150ms
2400 Baud
4,6ms
187,5ms
4800 Baud
2,3ms
118,8ms
9600 Baud
1,2ms
84,4ms
In this section the data link layer is described. One of the frames used in the M-Bus standard is shown below. The other M-Bus frames can be found in section 4.1.
The function field specifies the direction of the data flow and has various additional tasks in both calling and replying directions but many of these are optional and therefore not implemented.
Bit Number
7 6 5 4 3 2 1
0
Calling
direction
0 1 FCB
FCV
F3
F2
F1
F0
Reply Direction
0
0
ACD
DFC
F3
F2
F1
F0
Bit7 reserved for future use.
Bit6 specifies the direction of the data flow. If it is set to 1 the communication has the
direction Master to slave and vice versa if it is set to 0.
FCB The slave do not act on this bit and is always sending new data.
FCV The slave ignores this bit.
DFC (data flow control) Not supported must be 0.
ACD (Access demand) Not supported must be 0.
01.02.00 © Danfoss| Energy Meters| 2018.02| 6
Control field F3-F0 the control field code tells the function or action of the message.
The control field has 7 predefined control field shown below.
Name
C field binary
C field
(HEX)
Telegram
Description
SND_NKE
0100 0000
40
Short frame
Initialization of slave
SND_UD
01F1 0011
53/73
Long/Control
Send user data to slave
REQ_UD1
01F1 1010
5A/7A
Short frame
Request class 1 data
REQ_UD2
01F1 1011
5B/7B
Short frame
Request class 2 data
REQ_SKE
0100 1001
49
Short frame
Status request
RSP_SKE
0000 1011
0B
Short frame
Status data, slave to
master
RSP_UD
00AD 1000
08
Long/Control
Data transfer from slave
to master after request
REQ_UD1 telegrams are answered with ACK because the Alarm protocols are not supported.
The primary address of the meter can be set to a value from 0-250. The default primary
address is part of the serial number (red letters: ssssswwNNyyww) and is always a number from 00-99. To change the primary address either use the SonoApp or M-Bus command described later in this document.
Point-to-point addressing (0xFE) is intended for communication using the infrared eye or for network with only one slave (used for test of network with one slave).
Broadcast (0xFF) is used to communicate across the network to all the slaves e.g. to set a new
baud rate on all slaves at the same time. Be aware that no acknowledge byte is replied from the slave in broadcast mode.
The secondary address can be used to select a slave. This slave can then afterwards be
contacted using the primary address FDH. All slaves have an unique secondary address which ensures only a single slave answers.
Addressing Form
Slave Addressing
Primary addressing
0-250
Secondary addressing and
selected slave
253 (FDH) Point-to-Point addressing
254 (FEH)
Broadcast
255 (FFH)
01.02.00 © Danfoss| Energy Meters| 2018.02| 7
The Length Field (L Field) defines the number of bytes (expressed in hex value) of the Active Data making up the telegram, plus 3 bytes for the C, A and Cl Fields.
This field is always transmitted twice in Long Telegrams (RSP_UD) see 4.1.
The Checksum (CS Field) serves to recognize transmission and synchronization faults. The
checksum is calculated on the Active Data making up the telegram, plus 3 bytes for the C, A and Cl Fields. All bytes are added together in a 8 bit unsigned integer, which means that when the value gets larger than FFh it will wrap around and start all over.
01.02.00 © Danfoss| Energy Meters| 2018.02| 8
The CI-Field declares the transportation direction and the Application protocol (if exists). The CI-Field declares also which type of Transport Layer (“None”, “Short” and “Long” header) is applied.
In the SonoSelect/Safe meters with wired M-Bust the long header (0x72) is always used.
The SonoSelect/Safe meters supports the following CI-Fields.
CI-field (HEX)
Direction
50
Application reset
51
Data send to device
52
Slave select (no header)
72
The telegram contains data for the master
with long header
B8
Set baud rate 300 (only wired M-Bus)
BB
Set Baud Rate to 2400
BD
Set Baud Rate to 9600
01.02.00 © Danfoss| Energy Meters| 2018.02| 9
The long header contains 12 bytes which is used to identify the Meter, hold track of new or old message and to apply encryption.
The encryption is not currently available for wired Danfoss Meters which means the configuration field always is 0000H.
The 12 byte long header is shown in the table below:
Byte Nr.
Size(Byte)
Value(Hex)
Description
1-4
4
xx xx xx xx
Meter identification number
5-6 2 D310
Manufacturer’s ID (DFS Danfoss 10D3h)
7 1 xx
Version number firmware (00-FF)
8 1 04/0C
Medium: Heat outlet/inlet
9 1 xx
Access Number (00-FF-> 00)
10 1 xx
Status
11-12 2 0000
Configuration
The identification number (secondary address) is a non-changeable (according to OMS)
number in between 00000000 and 99999999. The identification number is part of the Danfoss Meters serial number and is unique. (In installations with other meters where same address is present the address can be change with SonoApp or M-Bus command shown later)
The secondary address is derived from the serial number. The serial number has the following format:
ssssswwNNyyww
The secondary address has the following format
ywwsssss
The manufactures ID is used to identify the manufacture of the Meter. Each manufacture has a
flag consisting of three capital letters which can be combined to two bytes according to EN13757-3. The Danfoss manufacture flag is DFS (10D3h) and this flag is always part of the long header.
The version number is used to identify if the meter is of type:
SonoSafe (0x01)
SonoSelect (0x02).
The medium byte identifies the flow sensor installation of the Meter and has two settings for each meter type:
Heat Inlet meters (supply 0x0C)
Heat Outlet meters (return 0x04).
Cooling Meter (Volume measured at return temperature: outlet)
01.02.00 © Danfoss| Energy Meters| 2018.02| 10
Cooling Meter (Volume measured at flow temperature: inlet)
Combined meter
Water meter (For pulse readout only)
The Access Number has an unsigned binary coding and is incremented (modulo 256) by one after each RSP-UD is send from the slave.
The status byte is used to indicate different potential errors in the Meter. The errors are stated in the table below:
Bit
Meaning with bit set
Significance with bit not set
0,1
See table 5
See table 5
2
Power Low
Power Ok
3
Permanent error
No Permanent error
4
Temporary error
No Temporary error
5
Specific to manufacturer
Specific to manufacturer
6
Specific to manufacturer
Specific to manufacturer
7
Specific to manufacturer
Specific to manufacturer
Status bit 1 bit 0
0 0
No Error
0 1
Application busy
1 0
Any application error
1 1
Abnormal condition/alarm
The status bit shall be used in this meaning:
Power low:
Warning – The bit “Power Low” is set only to signal interruption of external power supply or end of battery life time
Permanent error:
Failure – The bit “Permanent error” is set only if the meter signals a fatal device error which requires a service action.
Temporary error:
Warning – The bit “Temporary error” is set only if the meter signals a slight error condition which not immediately requires a service action. This could be an error which may later disappear.
Any application error:
The application error shall be used to communicate a failure during the interpretation or execution of a received command, e.g. a message which could not be decrypted.
01.02.00 © Danfoss| Energy Meters| 2018.02| 11
Abnormal conditions:
Shall be used if a correct working application detects an abnormal behavior like a permanent high flow.
The most critical active E-number (Error shown in the display) is sent as the status byte. The most critical error is E1 and least critical is E32.
Below is a table showing the bit pattern.
E­Number
E1
E2
E3
E4
E5
E6
E7
E8
E9
E10
E11
E12
E13
Hex code
0x08
0x10
0x28
0x04
0x24
0x30
0x50
0x70
0x90
0xB0
0xD0
0xF0
0x48
E­Number
E14
E15
E16
E17
E18
E32
Hex code
0x40
0x44
0x60
0x62
0x13
0x92
Error type
E number
Power Low
E4, E5, E15
Permanent error
E1, E3, E13
Temporary error
E2, E6, E7, E8, E9, E10, E11, E12, E14, E16,
E17, E18, E32
The application layer contains the data sent from the slave to the master or vice versa.
Every data record sent which is not manufacture specific have the following data record header (DRH)
Data Information Block (DIB)
Value Information Block (VIB)
DIF
DIFE
VIF
VIFE
Data
1 Byte
0-10Byte(s)
1 Bytes
0-10 Byte(s)
0-n Bytes
01.02.00 © Danfoss| Energy Meters| 2018.02| 12
The Data Information Block (DIB) contains at least one DIF but can be extended by 10 DIFE if needed.
The DIFs supported by the Danfoss Meters:
Bit
Name
Description
7
Extension Bit
Specifies if a DIFE byte follows: 0 = No 1 = Yes
6
LSB of Storage Number
0 if log is not send
5-4
Function Field
Specifies the kind of value 00 = instantaneous value 01 = Maximum value 10 = Minimum Value 11 = Value during error state
3-0
Data Field
Length and Coding of Data:
0001 (0x01): 8 Bit Integer 0010 (0x02): 16 Bit Integer
0011 (0x03): 24 Bit Integer
0100 (0x04): 32 Bit Integer 0110 (0x06): 48 bit Integer (only for record)
0111 (0x07): 64 Bit Integer (only for record) 1001 (0x09): 2 digit BCD
1010 (0x0A): 4 digit BCD
1011 (0x0B) 6 digit BCD 1100 (0x0C): 8 digit BCD
1101 (0x0D): Variable length (Only for TX) 1111 (0x0F): Manufacture Specific Data
The DIFE supported by Danfoss Meters:
Bit
Name
Description
7
Extension Bit
Specifies if a DIFE byte follows: 0 = No 1 = Yes
6
Unit
Specifies if it is pulse counter or cooling value
5-4
Tariff
Used oC*m^3 records
3-0
Storage number
0000 (only used for logs)
The DIFE is used for selection of pulse 1 and pulse 2 counters. If first DIFE has the unit set to 1, it is pulse counter 1 and if the unit is set in the second DIFE, it is pulse counter 2 (see
4.4.2.7). The DIFE unit 3 is used for cooling records (Energy, Volume, Max Flow, Max Power).
The DIFE storage number is used to show the log values and which type of log there are sent.
The storage number 1 & 2 are used for year log 1 and 2.
The storage number from 3-26 is used for month log 1-24.
Loading...
+ 26 hidden pages