M-Bus Rev. 4.8 communication protocol

Supported device types and versions
Communication line configuration
Communication station configuration
I/O tag configuration
Specific data of Multical III device
Parameters settings and data acquisition methods
Literature
Changes and modifications
Document revisions

Supported device types and versions


Communication allows data reading from devices that support the M-Bus protocol by the Rev. 4.8 specification. Communication was tested against MULTICAL® III, MULTICAL® 5 measuring devices by KARMSTRUP Company, CALSTREEM EEM-C measuring device by Danfoss Company and PolluTherm Pt500 by Sensus.
The communication was also verified against the water flow meter Sensus MeiStream 150 with communication module HRI-Mei using EthMBus-5 converter manufactured by JC-e (it was necessary to configure a converter to TCP mode and use a TCP/IP-TCP line category).


Communication line configuration


Line protocol parameters

The following station protocol parameters can be defined:

KeywordFull nameMeaningUnitDefault value
CHBR
Change BaudrateValue Yes means that communication will be switched between modes 1 and 2 (only Serial line).
Value No means that communication will be performed using the mode 1 (300 Bauds).
-No
SNKEBR
Send SND_NKE as BroadcastThe Yes value means that the SND_NKE (slave device initialization) command is sent as Broadcast before reading from the first station on the line.
The No value means that the SND_NKE command is sent to each device individually before the start of the reading.
Note: if the parameter is set to Yes, after sending Broadcast, there is a delay configurable by parameter WAI.
-Yes

Communication station configuration


  • Communication protocol: M-Bus Rev 4.8
  • Station address is a decimal number within the range of 1..250 – slave address, it is derived from the serial number of the measurement device (last three digits). If last three digits are greater than 250, the highest digit is not to be taken into account. If the serial number is one of the numbers of 000, 300, 400, 500, 600, 700, 800, 900 then must be changed.


Station protocol parameters

The following station protocol parameters can be defined:

KeywordFull nameMeaningUnitDefault value
ASCM
Address Scan ModeEach reading of values increments the station address. This mode can be used to find a device with an unknown address.-No
RC
Retry CountPoll repetition count in case of a communication error.-2
RT
Retry TimeoutDelay between poll repetition in case of a communication error.ms100 ms
WFT
Wait First TimeoutFirst waiting for response after sending the poll.ms800 ms
WT
Wait TimeoutDelay after transmitting the poll before reading the response.ms500 ms
MWR
Max Wait RetryRepetition count of response readings till its finalization.-40
WAI
Wait After SND_NKE BroadcastDelay after sending a broadcast SND_NKE, before reading from the first station on a communication line.ms8000 ms
WBR
Wait before REQ_UD2 RequestDelay before sending the REQ_UD2 poll request to a slave.ms4000 ms
SFAI
Set FCB Bit after SND_NKEParameter specifies whether an FCB bit in a poll request after sending SND_NKE shoult be ste to 1 (YES) or 0 (NO).-YES
AFOR
Accept Following Records (0=disable,255=read all)If the slave station has Variable Data available, the parameter specifies the number of records read during one polling of the station. A value of 255 means that all available records will be read.-0
RESB
Send Application Reset before REQ_UD2Optional sending of "application reset" message (50h) prior to reading the values from the station.-NO
WUL
WakeUp LengthLength (given in characters) of so-called wake-up message sent before each poll. Value 0 disables sending of wake-up message.bytes0
WUD
WakeUp DelayDelay between wake-up message and poll.ms400
FULL_DEBUG
Full DebugEnables debug logs on the communication and acquired data.-NO
MULTICALIII
Multical IIIEnables decoding the Manufacture specific data of Multical III device.-NO

String containing the protocol parameters is being defined as follows:

Keyword=value;Keyword=value; ...

Example:

RC=1;RT=500;LBR=1;

If there is used a keyword with an invalid value in the initialization string, there will be used corresponding default value according the table 1.

I/O tag configuration


Possible I/O tag types: Ai, Ci, TiA, TiR, TxtI

Two types of addresses can be configured:

  • Simple address: a number that is an index of value in M-Bus data packet. To get detailed information on unknown device activate debug logs using the parameter FULL_DEBUG.
    An example of debug log (individual rows correspond with addresses 1 to 9, value is displayed at the end of listing after the text "Val"):
    >> Adr.1,DF:0CH (8 digit BCD)(inst. val),VIF:05H=Energy 0*10^2 [Wh],VIFE:7DH=Multiplicative corr. factor 10^3,Val:0
    >> Adr.2,DF:0CH (8 digit BCD)(inst. val),VIF:15H=Volume 0*10^-1 [m3],Val:0
    >> Adr.3,DF:0CH (8 digit BCD)(inst. val),VIF:3DH=Volume Flow 0*10^-1 [m3/h],Val:0
    >> Adr.4,DF:0CH (8 digit BCD)(inst. val),VIF:2DH=Power 0*10^2 [W],Val:0
    >> Adr.5,DF:02H (16 bit int)(val during err),VIF:5AH=Flow temperature 0*10^-1 [C],Val:0
    >> Adr.6,DF:02H (16 bit int)(val during err),VIF:5EH=Return temperature 0*10^-1 [C],Val:0
    >> Adr.7,DF:03H (24 bit int)(val during err),VIF:60H=Temperature difference 0*10^-3 [K],Val:0
    >> Adr.8,DF:0CH (8 digit BCD)(inst. val),VIF:78H=Fabrication No.,Val:53155203
    >> Adr.9,DF:0CH (8 digit BCD)(inst. val),VIF:7DH=Extension of VIF-codes,VIFE:10H=Customer location,Val:53155203
    
  • Address of header objects: in format 0.subadr enables to address objects located in a header of an answer. A device can answer using a fixed or variable respond that have different header contents. Following table lists header objects and their addresses for fix and variable respond.

    ObjectValue typeAddress in fix respondAddress in variable respond
    Identification No.Ci, TxtI0.00.0
    ManufacturerTxtI (3 characters)-0.1
    VersionCi-0.2
    MediumCi-0.3
    Access No.Ci0.10.4
    StatusCi0.20.5
    SignatureCi-0.6


    An example of debug log for variable respond:

    Variable data respond CI=0x72 mode 1 from St:'B.MBUS_SENSUS'(0) detected.
    >> Adr.0.0,Identification No.,Val=53155203
    >> Adr.0.1,Manufacturer,Val='SEN'
    >> Adr.0.2,Version,Val=12
    >> Adr.0.3,Medium,Val=4
    >> Adr.0.4,Access Nr.,Val=50
    >> Adr.0.5,Status,Val=16
    >> Adr.0.6,Signature,Val=0
       


Specific data of Multical III device


Multical III device sends extended "manufacture specific data". Activating the parameter MULTICALIII allows to configure I/O tags according to the following table:

AddressValue descriptionType
12Access counterCi
13Number of customer 1Ci
14Number of customer  2Ci
15InfoCi
16TAR2Ci
17TL2Ci
18TAR3Ci
19TL3Ci
20AUX1Ai
21AUX2Ai
22Prog_NoCi
23ConfigCi
24DateTiA
25Date*TiA

Parameters settings and data acquisition method


Recommended polling parameters are at least 1 minute. When the polling time comes, the before polling the first station on the line a SND_NKE(255) datagram is broadcasted, i.e. init for all measuring devices (Slaves) and KOM process waits for a period specified by the parameter WAI. The slaves prepare all current measured values and implicitly change their Baudrate to 300.

Then the communication speed can be optionally changed to higher speed (specified on communication line as mode 2) by SND_UD data, if it configured by the means of the line parameter Change Baudrate. Only baudrates 300/600/1200/2400/9600/19200/3840 are supported by M-Bus protocol.
Note: change of baudrate is supported only on a Serial line.

Then a REQ_UD2 poll request is sent to every slave, after waiting according to value specified by the parameter WBR) to which they all should respond by the data datagram RSP_UD.

Times of individual values are not set to the time when the telegram was received, but to the time of required polling period. So if the period is set to 1 hour, all the times of values are set to given hour.


Note: Polling period as well as station parameters should be the same on all stations and one line.

Literature



Blog

You can read a blog about M-Bus protocol: Communication – M-Bus


Changes and modifications


  • November 22nd, 2005 - Redesigned by M-Bus Rev. 4.8.

Document revisions


  • Ver. 1.0 - June 26th, 2000 – document creation.
  • Ver. 1.1 – November 9th, 2000 – testing Danfoss CALSTREEM.
  • Ver. 1.2 – December 14th, 2000 – Change of the outputs AUX1 and AUX2 from Ci to Ai
  • Ver. 1.3 - November 22nd, 2005 - Redesigned by M-Bus Rev. 4.8.


0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .