What is M-Bus?

What is M-Bus?

M-Bus is a wired communication technology used for remote reading of temperature, water, heat, and electricity meters.

M-Bus is available in both wired and wireless versions. The wireless M-Bus has similar advantages to the wired one but without the need for cable installations.

M-Bus is an open and standardized protocol developed in 1991 for collecting meter data. Today it is mainly used for submetering in properties. It remains one of the most widely used protocols for meter data collection.

Complete guide to M-Bus

General addressing

According to the M-Bus standard, new or unconfigured meters should be delivered with primary address 0. If many new or unconfigured meters are connected simultaneously with address 0 to the M-Bus loop, you will not be able to communicate with any of the meters via primary addressing. One way to set new primary addresses is to use secondary addressing if the meter supports communication with secondary addressing. However, some meters do not support secondary addressing. In these cases, you must use special software from the meter supplier. If the meter supports secondary addressing and address change via the M-Bus protocol, you can remotely manage the address change. If the meters do not support secondary addressing and address change via M-Bus, you will probably need to disconnect the meters one by one from the M-Bus loop and connect the meter to an external M-Bus master to change the meter's address.

Primary address

  • The primary address for reading meters should always be set within the address range 1-250.
  • Normally, the meter is delivered with primary address 0; first test communication with primary address 0.
  • If you only have one meter connected, you can use primary address 254 to read the actual primary and secondary address of the meter. All types of meters should respond to primary address 254. If multiple meters are connected to the loop, a collision will occur as all meters will respond simultaneously.
  • If the meter responds to primary address 0, it is important to change the meter to a new primary address within the standard range 1-250. This means you can connect an additional new meter to the loop that can be remotely managed via primary address 0.
  • If you have multiple meters connected to the M-Bus loop, check that no meters share the same address. If this is the case, you will not be able to communicate with any of these meters.
  • Some meters, such as ABB Odin, do not support complete primary addressing but only address 0.

Secondary addressing

  • If your meters support secondary addressing, you can search for the meters even if all meters on the M-Bus loop have the same primary address, for example via PiiGAB's M-Bus Wizard. You can now change the primary address by using the meter's secondary address.
  • Some meters, such as older Kamstrup models, do not support secondary addressing.

Communication speed

  • When you have changed the communication speed, it is important to read information from the meter within a couple of minutes at the new speed. If this does not happen, the meter, according to the M-Bus standard, will revert to the original communication speed.
  • If you use the communication speed 300 baud, make sure the time delays are sufficiently long.
  • If you cannot find the meter on the M-Bus network, try changing the communication speed. The communication speeds most commonly used are 300 and 2400 baud, and sometimes 9600 baud. The most common and recommended speed is 2400 baud. Some meters are set to 300 baud at delivery. Change and test, but keep in mind the time delay if you only get contact with the meter when running SND_NKE.
  • On most meters, you can easily change the communication speed over the M-Bus network using PiiGAB's M-Bus Wizard.

Wiring

  • A prerequisite is that the meter has an M-Bus output and/or an M-Bus card installed. Some meters have their own configuration connection that does not support M-Bus but can easily be confused. Examples include Mini-Bus, which cannot be used for standard M-Bus communication.
  • Check that the M-Bus loop is not accidentally connected to a pulse input on the meter.
  • If you cannot connect to the meter despite trying different addresses and communication speeds, it indicates either a break in the M-Bus loop or that the meter's wiring is incorrect.
  • An easy way to test the M-Bus loop is to measure the voltage on the loop itself. Normal voltage on an M-Bus loop is between 22 and 42V depending on the type of M-Bus master.
  • No terminating resistor is needed on the M-Bus cable.

Single/Multi telegram

Measurement points in an M-Bus meter are either placed in one or several telegrams. For multi-telegram meters, the meter's measurement points appear in different telegrams. Usually, the most common measurement points are in the first telegram. For single telegram meters, all measurement points are in the only telegram.

  • Single telegram meter

Reading the meter is done with the REQ_UD2 command. There is only one telegram to read.

  • Multi-telegram meter

To read a multi-telegram meter, the meter's telegram counter must first be reset. This way, the meter responds with its first telegram during reading. This usually happens with the SND_NKE command. Sometimes the APP_RESET command with a subcode may be required.

The meter reading is then done with the REQ_UD2 command. The meter then responds with its first telegram. Repeat the REQ_UD2 command to get the next telegram, and so on. Each telegram will indicate if there are more measurement points in the next telegram. This is done with a field called the Manufactory Data Header (MDH). These values apply for MDH:

  • MDH = 0x0F: No more measurement points in the next telegram.
  • MDH = 0x1F: More measurement points in the next telegram.
Use the Browse template in PiiGAB Explorer or the DEBUG box in PiiGAB M-Bus Setup Wizard to find the MDH field in the telegram.

Find out how many telegrams need to be read from the meter to obtain the desired measurement points. This is also done to avoid reading telegrams that are not needed. At the next reading, send the SND_NKE command again to restart the procedure.

Time delay

An M-Bus telegram is at most 261 bytes, which corresponds to 261*11 bits (including start, parity, and stop bits), i.e., about 2800 bits in the response telegram. Then add the request and waiting time before the response is delivered. If the telegram has this size at 300 baud, this means the delay should be at least 10 seconds. Normal timeout for 2400 baud is 2-3 seconds. If you change the baud rate from, for example, 2400 to 300 baud, the time delays are probably set too tight.

M-Bus loads

There is often confusion that an M-Bus load is not the same as an M-Bus meter. An M-Bus load is defined by the M-Bus standard* as 1.5mA. M-Bus masters normally specify the number of M-Bus loads they can handle at most. This indirectly indicates how much current the M-Bus master can supply on the M-Bus loop. Most M-Bus meters usually consume one M-Bus load. However, there are exceptions where a meter takes up two or more M-Bus loads. If the number of M-Bus loads exceeds the limit for an M-Bus master, it is usually indicated on the master. For PiiGAB’s converters PiiGAB M-Bus 810 and PiiGAB M-Bus 900, this is indicated by a slow blinking of the power LED.

*M-Bus standard (EN13757)

M-Bus cables

The M-Bus standard* prescribes a two-wire cable with the dimensions 2x2x0.8 and the specification 73Ω/km and 120nF/km. Here is a list of cables and E-numbers.

Name J-H(ST)Hh J-Y(ST)Y
Area 2x2x0.8 2x2x0.8
Resistance 73.2Ω/km 73.2Ω/km
Capacitance 120nF/km 100nF/km
Description Halogen-free Twisted pair Shielded Twisted pair Unshielded
E-number 4836650 4956560
*M-Bus standard (EN13757)

Recommended length of the M-Bus loop: 1500-2000 meters.

Choose M-Bus converter / gateway

Here are some points to consider when choosing an M-Bus converter.

  • M-Bus loads: All M-Bus converters are sized based on how many M-Bus loads need to be powered on the M-Bus loop, not how many M-Bus meters are connected to the loop. One 1 M-Bus load = 1.5mA and not 1 M-Bus meter.
  • Clients: Number of systems that will read the M-Bus meters. For example: Citect, M-Bus OPC, PLC, SCADA, or HMI. For PiiGAB M-Bus 810, only one client can read the M-Bus meters. For PiiGAB M-Bus 900, up to four clients can read the M-Bus meters.
  • Protocol: The protocols that the clients communicate with the converter. Both data protocols and carrier protocols. For PiiGAB M-Bus 810, the client must communicate M-Bus over UDP/IP, TCP/IP, or RS232. For PiiGAB M-Bus 900 there is support for M-Bus, Modbus, and MBusASCII over UDP/IP, TCP/IP, RS232, RS485, or M-Bus slave. Additionally, there are add-on programs QuickPost, Modbus2Mbus, and Wireless M-Bus.

We have gathered some recommended websites

M-Bus related

M-Bus User GroupDLMS Flag Manufacturers IDBeuth Verlag GmbH

Various tools

Fifo Serial AnalyzerDependency WalkerWindows SysinternalsNull modem emulator (com0com)Lantronix Com Port RedirectorTactical COM Port RedirectorTeamViewerNSSMDataHub OPC Tunneller

Can't find the information you are looking for? Please notify us by sending an email to support@piigab.se. We also want to recommend our manuals and our "getting started" documents, which you can find under downloads and the respective product. In these documents, you will find valuable information on how to proceed.

If you are looking for features or if you find that something is not working as expected, do not hesitate to contact us so we can adjust help files or features before the next update. If there is something you are missing or think could be improved, inform us so we can add it to our list of desired features.

Contact us.

info@piigab.se