The M-Bus protocol
The M-Bus protocol is a standard protocol for reading of devices like Heating Energy meter, Water Volume counters or Electricity Energy meters. M-Bus is normalized as EN 1434-3. Many manufacturers have implemented the M-Bus protocol in their products. The M-Bus interface may be optional and must be ordered separately. The physical layer supports the data transmission as well as the power supply over a two wire cable. The data exchange follows a Master-Slave structure where the PCD is master while all counters are slaves. You can read more about M-Bus on Internet at www.m-bus.com and www.m-bus.de.
There are different possibilities to connect a PCD onto an M-Bus network.
External M-Bus interface
A signal converter from RS232 to M-Bus can be used to connect a PCD using any of the available RS232 port (maybe with plug-in module) of the PCD. The external converter is usually delivered and installed by the provider of the M-Bus counters. If no such converter is delivered, an external device should be recommended by the provider of the M-Bus device. Engiby have used an M-Bus interface of Relay AG, Germany, Type PW20 and PW60. Go to www.relay.de for more details. The PW60 also support RS 485 connection to the PCD.
Direct RS232 or RS485
We have tested some devices supporting directly RS 232 or RS 485 (without M-Bus converter). In this case, the power supply must be wired separately. If direct RS232 connection is used, only one device can be connected to the PCD. Contact the device manufacturer for more information.
Most M-Bus devices operates at 2400 bauds and this is also supported by all Saia-PCD systems and communication modules. A lot of M-Bus devices also work at 300bauds. However, this speed is not anymore supported by the Saia NT-Systems (e.g PCD3). We do not recommend using this baudrate. However using the Saia M-Bus modules and the option “M-Bus/F27x” 300 bauds may be used. Finally, some devices also operate at 9600 bauds and this is supported by the driver and all PCD systems. Some devices are autobauding while others need a configuration to operate at the desired baudrate. If you have a mix-up of devices, and you don’t use the default baudrate of 2400bds, take care at the supported baudrates and the autobauding capability. In case of incompatibility you must use different communication lines and use several Driver Fboxes.
Saia Integrated M-Bus
Saia propose also a range of M-Bus module PCDx.F27x that can be plugged in the 2 slots of PCD1.M2 and the 4 first slots of PCD3 or PCD2.M5 CPUs. This modules support directly M-Bus signals without the need for an external converter.
Important: in the M-Bus Master Fbox, select the line type called M-Bus/F27xx.
If you don’t yet have this option you can use the type PCDx.F270(0) only by selecting RS485.
Important: The minimum FW version on PCDx systems is 1.16.52 and on the PCDx.F27x(0) module is 1.02.02.
Contact also your Saia agent for more info and to check the minimum FW version needed.
Read also the Saia FAQ 101604.
Use of Port 0 PGU
The port 0 (PGU port) can be used with the M-Bus driver with the following consideration:
In PG5 1.4 : Open the hardware settings. Activate the option ‘Full RS-232 handshaking on port
In PG5 2.0 : Open the Device configurator. Select : Onborad Communications. Select RS232/PGU.
Disable all protocols (S-Bus, Modem, etc). Set ‘Full RS-232 handshaking’ to ‘Yes’.
For old systems where the port 0 is also used as PGU port to download programs in the PCD, the above mentioned option does not exist or cannot be used. In this case, you must use the channel called ‘Channel 0/PGU’ (or Channel 0/PCS1 on PCS1 systems) in the Master Fbox. The port is assigned by the driver at startup if no PGU connection is used. The PGU port is forced in PGU protocol when a PGU cable is connected and PG5 goes online. After the use of the PGU mode with PG5, unplug the PGU cable, connect the M-Bus interface, the port is restored for M-Bus protocol. In this configuration, it is important to not connect the control signals inputs, CTS and DSR on the PCD port, or better, to connect them to signal ground.
Support of several M-Bus
lines in the same PCD
Since the version 2.3.100, several M-Bus lines can be supported in the same PCD. The standard Fupla mechanism of Fbox name and reference is used.
Mix-up of devices on the
Mix-up of devices from different types or different manufacturers is in general possible without problem but cannot be warrantee in all cases.
The possible restrictions are:
- incompatible baudrates (not all devices support several baudrates and are autobauding)
- incompatible reset procedure (a required procedure for a device may disturb another one)
In case of incompatibilities, several buses must be built up and connected to different serial ports on the PCD.
How many devices can
supported by a PCD
There are no limitations set by the driver itself but increasing the number of device will soon or later reach one of these limits.
- Up to 250 devices can be addressed on one bus (with primary addressing)
- The signal converter supply the power for a limited number of device (PW6=6, PW20=20, and so on).
- The number of PCD register is limited. Each M-Bus device will need about 20..30 registers.
- The Program memory of the PCD is also limited. Each M-Bus device will use about 400..800 lines of code.
Add about 5000 lines for the driver itself (each driver).
- The total reading cycle of all devices will be affected by the number of devices on one bus.
Depending on the type and the speed, you may need up to 1 min for 10..20 devices already.
Distributing the devices on several buses reduces the cycle time. Each driver works in parallel.
- We also noticed that large M-Bus networks are more often affected by cabling errors and disturbances.
Therefore, we recommend, to limit the number of devices to 30..50 per network.
Test tools for M-Bus devices
1) NG-MScan 2 is a free Engiby tool able to scan an M-Bus network and report the full data package returned by a device. It is especially useful if you have no possibility to send a test device to Engiby or no specification is available.
Go to the download page.
2) Some manufacturer will spontaneously put a software tool at your disposal to test the connection with M-Bus counters from a PC. Such tools usually allowed to scan the bus with different baudrates and are able to find out which device is connected on the bus. This test may be useful to correctly set the baudrate and the addresses in the Driver for the PCD.
3) You can also find such tools on Internet at www.m-bus.com or www.m-bus.de.
If you have used the Saia F27x module, you don’t have any RS232 port to connect your PC. New notebooks also don’t have any RS232 interface. In this cases, we recommend the use the M-Bus-Mikro-Master-USB available from www.relay.de. It can be directly connected on the M-Bus network and support a virtual COM port in Windows. Further USB to M-Bus converters are available at .
Principle of the M-Bus
The M-Bus driver is based on a standard Driver Fbox and specific Fboxes for each counter type. The driver is the same for all counter devices and content all mechanisms and data coding used by the M-Bus protocol. The particularities of each device are given by specific Fboxes. Two types of Fboxes are delivered for each device.
- A comfort Fbox, marked with ‘01’, which delivers formatted values to individual Fbox outputs.
- A compact Fbox, marked with ‘02’delivers the values in a register array. Values and exponents are then available in individual registers. The value is not formatted but delivered ‘as received’ from the device.
Implementation in PCD
The M-Bus standard does not ensure that any counter device can be read with a unique implementation. The procedure to read the device may vary, several reset mechanisms exist, different data coding are used, the delivered data can be specifically configured in the devices and some data are even manufacturer specific. Therefore, Engiby cannot warrantee that any new device can be read with the existing function of the M-Bus library. Tests and adaptations might be required for new devices.
In general we can say that:
- Almost all Water counters can be read with a generic Fbox without problem
- Most Heating counters can be read with a generic Fbox
- Only few Electricity counters can be read without specific implementation
If you have found a working Fbox but you need few additional values, you can add the optional Fbox called ‘Additional Values’ with the same address of the main Fbox. You must know and correctly select the various identifications of each value. Even this method does not ensure that you can retrieve any value of a device.
PG5 program example
You can download this project example for a quick start.
Fbox for standard devices
For simple applications and very standard devices, some Generic Fbox have been created. If a Generic Fbox is sufficient, no specific implementation is required.
For instance the values returned by the Heating Generic Fbox are the following:
- Forward temperature
- Return temperature
- Difference temperature
Missing values are set to 0.
The functioning cannot be warrantee from Engiby. The initialization and/or the communication procedure may also be particular and need adaptation.
Fix data structure
Some old devices may use a transmission method called 'Fix data structure'. One Fbox has been created to support this type of devices.
Here you fined a list of actually supported devices.
Implementation of new
On request, new devices can be implemented. Please contact Engiby.
The driver is delivered with a user license for PG5 version 1.4 and/or 2.0. See the registration procedure under: www.engiby.ch/libreg.htm. The user may use the driver on several PCs inside the company and for several PCDs with one single license. Updates will be required for new features and for new PG5 versions. The 'General Conditions for Supply of Software' from Engiby are also applicable.
Back to Engiby main page
Engiby / 15.04.2013