M-Bus is a wired communications technology used to remotely read temperature, water, heat, and electricity meters.
M-Bus is available in both wired and wireless variants. Wireless M-Bus offers similar benefits to wired M-Bus, but without the need for cable installation.
M-Bus is an open, standardized protocol developed in 1991 for collecting meter data. Today, it is primarily used for submetering in buildings. It is still 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 supplied with primary address 0. If many new or unconfigured meters, all with address 0, are connected to the M-Bus loop simultaneously, 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 via 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 changes via the M-Bus protocol, you can administer the address change remotely. If the meters do not support secondary addressing and address changes via M-Bus, you will probably need to disconnect the meters one at a time from the M-Bus loop and connect the meter to an external M-Bus master to change its address.
The primary address
- The primary address used to read meters must always be set within the address range 1–250.
- Normally, the meter is supplied with primary address 0; first, try communicating using primary address 0.
- If you have only one meter connected, you can use primary address 254 to read the meter’s actual primary and secondary addresses. All types of meters should respond to primary address 254. If several meters are connected to the loop, a collision will occur because all the meters will respond simultaneously.
- If the meter responds at primary address 0, it is important to change the meter to a new primary address within the standard range of 1–250. This allows another new meter to be connected to the loop and remotely administered via primary address 0.
- If you have several meters connected to the M-Bus loop, check that multiple meters are not using 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 and only support address 0.
Secondary addressing
- If your meters support secondary addressing, you can search for the meters even if all the meters on the M-Bus loop have the same primary address, for example using 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
- After changing 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 will, in accordance with the M-Bus standard, revert to the original communication speed.
- If you use a communication speed of 300 baud, make sure that 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 on delivery. Change the speed and test it, but keep in mind the time delay if you only establish 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.
Connection
- 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 with one. One example is Mini-Bus, which cannot be used for standard M-Bus communication.
- Make sure that the M-Bus loop has not accidentally been connected to a pulse input on the meter.
- If you cannot connect to the meter despite trying different addresses and communication speeds, this indicates either a break in the M-Bus loop or an incorrect meter connection.
- A simple way to test the M-Bus loop is to measure the voltage on the loop itself. The normal voltage on an M-Bus loop is between 22 and 42 V, depending on the type of M-Bus master.
- No termination resistor is required on the M-Bus cable.
Single/multi-telegram
Measurement points in an M-Bus meter are placed in either one or several telegrams. For multi-telegram meters, the meter’s measurement points appear in different telegrams. The most common measurement points are usually found in the first telegram. For single-telegram meters, all measurement points are contained in the single telegram.
- Single-telegram meter
The meter is read using 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 makes the meter respond with its first telegram when read. This is usually done with the SND_NKE command. Sometimes the APP_RESET command with a subcode may be required.
The meter is then read using the REQ_UD2 command. The meter responds with its first telegram. Repeat the REQ_UD2 command to obtain the next telegram, and so on. Each telegram indicates whether there are more measurement points in the next telegram. This is done using a field called the Manufacturer Data Header (MDH). These values apply to 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 window 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 also avoids reading telegrams that are not needed. When reading again, send the SND_NKE command once more to restart the procedure.
Delay
An M-Bus telegram is at most 261 bytes, which corresponds to 261*11 bits (including start, parity and stop bits), i.e. approximately 2,800 bits in the response telegram. Then add the request and the waiting time before the response is delivered. If the telegram is this size at 300 baud, the delay should be at least 10 seconds. The normal timeout for 2,400 baud is 2–3 seconds. If you change the baud rate from, for example, 2,400 to 300 baud, the delays are probably set too short.
M-Bus loads
It is often confusing that an M-Bus load is not the same as an M-Bus meter. According to the M-Bus standard*, an M-Bus load is defined as 1.5 mA. M-Bus masters normally specify the maximum number of M-Bus loads they can handle. This indirectly indicates how much current the M-Bus master can supply to the M-Bus loop. Most M-Bus meters usually consume one M-Bus load. However, there are exceptions where a meter uses two or more M-Bus loads. If the number of M-Bus loads is exceeded for an M-Bus master, this 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 flashing power light.
*M-Bus standard (EN13757)
M-Bus cabling
The M-Bus standard* specifies a two-wire cable with dimensions 2x2x0.8 and specifications of 73 Ω/km and 120 nF/km. Here is a list of the cables and E-numbers.
| Name | J-H(ST)Hh | J-Y(ST)Y |
|---|---|---|
| Cross-sectional area | 2x2x0.8 | 2x2x0.8 |
| Resistance | 73.2 Ω/km | 73.2 Ω/km |
| Capacitance | 120 nF/km | 100 nF/km |
| Description | Halogen-free shielded twisted pair | Unshielded twisted pair |
| E-number | 4836650 | 4956560 |
*M-Bus standard (EN13757)
Recommended length of the M-Bus loop: 1,500–2,000 metres.
Choosing an M-Bus converter / gateway
Here are some points to consider when choosing an M-Bus converter.
- M-Bus loads: All M-Bus converters are dimensioned according to how many M-Bus loads will be powered on the M-Bus loop, not how many M-Bus meters are connected to the loop. One M-Bus load = 1.5 mA, not one 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.
- Protocols: The protocols that the clients communicate with the converter. Both data protocols and bearer protocols. For PiiGAB M-Bus 810, the client must communicate via M-Bus over UDP/IP, TCP/IP or RS232. PiiGAB M-Bus 900 supports M-Bus, Modbus and MBusASCII over UDP/IP, TCP/IP, RS232, RS485 or M-Bus slave. In addition, the QuickPost, Modbus2Mbus and Wireless M-Bus add-on programs are available.
We have collected some worthwhile 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’re looking for? Please let us know by emailing support@piigab.se. We would also like to recommend our manuals and “getting started” documents, which you can find under Downloads and the respective product. These documents contain valuable information on how to proceed.
If you are looking for features or discover that something is not working as expected, please do not hesitate to contact us so that we can adjust help files or features for the next update. If there is anything you are missing or think could be improved, please let us know so that we can add it to our list of requested features.