M-Bus Trouble shooting guide

This document may help you to solve problems you may encounter when using the M-Bus driver on Saia PCD® systems. Note that some basic knowledge of M-Bus technology and a description of the used devices may be necessary to correctly configure your application. Please read also the M-Bus Startup guide to ensure you have correctly prepared your application.

Take note that this guide does not warrantee that you will be able to find the error and fix it in any case. Engiby would be glad to receive your feedback about your experience in order to improve this document as to be more helpful for other users in the future. Thanks in advance for your help.

You must first distinguish between installations and build errors or runtime problems. Please refer to M-Bus Startup guide in case of basic installation and build problems. This document describes only runtime problems. It means errors reported in the M-Bus FBoxes after you have loaded your application, the PCD is in run and you are online with Fupla.

Because most problems are due to cabling, hardware and addressing errors, we will first focus how to identify and fix those problems. Once communication is physically working, we can look for device specific problems like incompatible configuration or missing values. The error code of the M-Bus Master FBox gives a good idea about possible problems. You should go step by step through the list of possible error below. This basic role is important: as long as the Master FBox reports errors in range 1 to 29, you face a cabling, hardware or addressing problem. It is not worth to change the device FBox or to check options in the device FBoxes in this case.

1 Cabling, Hardware and Addressing Problems

1.1 SASI error / Code 1
This error indicates that the driver could not take control of the serial line. It is not a real hardware problem but has the same consequence.

  • Ensure you have selected the correct channel.
  • A typical error is when the same port is already declared in the Hardware settings as S-Bus PGU port, Modem or Gateway port.
    Remove any configuration on the port used by the M-Bus Driver. Don't forget to download the new configuration.
    For a safe check start the debugger and enter the command ‘Display - sBus config’.
  • Ensure that no other part of your program is using the same channel.
  • The corresponding module may be missing, wrongly equipped or defective.
  • The PGU port (COM 0 on most systems) is forced in PGU mode when a PGU cable is used.
  • On Saia-NT systems the option Full RS232 handshaking in the Device Configurator must be checked to avoid the port to be forced in PGU mode.
  • Use the option Channel 0/PGU (or Channel 0/PCS1) only if you want to use it alternatively with PGU and M-Bus.
    In this case, the option Full RS232 handshaking must be unchecked.

1.2 No response / Timeout error / Code 23 or 24
If you have no response from the device (error 23 or 24 is reported), it may be due to a bad cabling, a defective component or a wrong addressing.

1.3 Bad channel settings
Ensure you have correctly set the following channel settings:

  • The channel number must be the one you have connected the M-Bus signal converter or plug the Saia F27x module
  • The line type is correct. Normally you use an RS232 for connection over a signal converter.
    You must select M-Bus/F27x if you are using a Saia F27x module.
  • Usually all device works at 2400 bauds. Do not select another speed unless you are sure your device supports it.
  • If you are using a PCD3.F121 module on I/O slot 0 of PCD3, select Channel 1 (Not Slot 0, Channel 1).
    This error may not issue the Error code 1.

1.4 Wrong addressing
To eliminate wrong addressing proceed as follow:

  • If the devices have been installed by the provider, ensure each device is given a unique primary address.
  • If you install the devices yourself, set a unique primary address, in range 1 to 250 to each device.
  • If the device address is unknown and cannot be set, use the address 254 in the device FBox and connect only one device on the bus.
    All devices respond to the "Test address" 254 whatever its address is.
  • Use a tool able to scan the network as to find all devices. See NG-Mscan 2 in point 4 below.

1.5 Readdressing devices
If you need to change some device addresses, proceed as follow

  • First ask the provider to set the address.
  • If the provider allows you change the address yourself, use the tool it will provide for that.
  • In emergency cases only, use the FBox set address after having carefully read its description in the manual.

1.6 For cabling errors

  • Check your RS232 cabling. Usually a direct connection (not crossed) is required (Tx -> Tx and Rx -> Rx)
  • Check the 24V power supply on the level converter or on the Saia PCDx.F27x module
  • Check if the meter needs an auxiliary power supply (this is usuallly the case for electricity meters)
  • Ensure the level converter has sufficient power to support the number of connected device. You may need to purchase a larger converter.
    Note that the Saia module does not limit the used power but the number of accessed devices by mean of an internal address list.

1.7 Incompatible or bad firmware
If you are using the Saia M-Bus module PCDx.F27x, ensure you have the correct firmware in the PCD and in the F27x module.
Minimum for PCD FW is 1.16.52. Minimum for the F27x FW is 1.02.02, recommended is 1.02.11.

1.8 Defective hardware
To eliminate defective hardware, exchange each part one by one :

  • RS232 cable
  • Serial communication module
  • M-Bus level converter
  • M-Bus device

1.9 Special cases
Some very rare and special cases have been encountered. Here is a non-exhaustive list.

  • The M-Bus level converter needs not only Tx-Rx and ground but also RTS-CTS control lines (Aquametro).
  • The use of an incompatible device FBox results in a Timeout instead of Missing value or other error. Make your first test with a "Generic" FBox.
  • The M-Bus device has too long delay before sending its response. You must increase the timeout value and the number of repetitions (EMU Pro).
  • The device is set to a particular baudrate and is not auto-bauding. Try different bauds or set it back to the default speed of 2400 bds.
    Note that Saia-NT systems do not anymore support baud rates below 1200 except on the PCD2/3.F27x module.
  • The M-Bus device is sensitive to very small inter-character delay. This has been improved in the library and in the PCD firmware.
  • The M-Bus device does not support primary addressing. See in the manual how to use secondary addressing (based on serial number).
  • The M-Bus device does not react to the initial Initialization command sent in broadcast but need an addressed Initialization command (EMU Light).
  • The M-Bus device communicates over a Radio Receiver. You need a particular M-Bus library extension to support radio receivers from Hydrometer, Techem or Sappel.

2 Device FBox errors

The above described hardware and addressing problems result in a ‘Read fails’ error in the activated device FBox. Any other error means that the communication with the device works but a problem has been detected in the response. Here is the list of the most common errors with hints how to solve them.

2.1 Manufacturer
The manufacturer code of the device does not match the FBox. You have used a wrong FBox or the used address is the one of another device. Generic FBoxes don't check the manufacturer code. Specific FBoxes however are made for a particular device and may not work correctly with other devices. If you are sure you are reading the correct device, you can disable this check with an option in the Master FBox. This is useful if the same device is distributed under different manufacturer names. If the reading works well, please report this case to Engiby as to extend the FBox to allow new manufacturer codes.

2.2 Medium
The medium code of the device does not match the FBox. You have used a wrong FBox or the used address is the one of another device. Each FBox is made for one, or a set of mediums and may not work correctly with other devices. If you are sure you are reading the correct device, you can disable this check with an option in the Master FBox. This is useful if the same device is distributed with different medium coding. If the reading works well, please report this case to Engiby as to extend the FBox to allow new medium codes.

2.3 Missing value
This error concerns usually only one or few values of the FBox. Check first if the Master driver shows also the error "Too many data". This problem is due to the fact that the Master buffer is too small to save all returned values and the FBox misses one of this lost values. In this case, extend the Data buffer length in the Master FBox. For the other cases, see the descriptions in the next chapters hereafter.

2.4 Too many data
Some Fboxes may show the error "Too many data" at the same time as the Master FBox. It means that the device returns more vales than the driver can store in its internal buffer. Some values are lost and cannot be returned by the FBox. In this case, extend the parameter called "Data buffer length" in the Master FBox (this will increase the usage of dynamic registers and flags).

2.5 Configuration
Some device FBoxes may need to send configuration telegrams before to be able to read the values. If the device did not respond to the configuration command, this error is shown.
The reason may be a general timeout problem as described above. It may also be that the device does not support the configuration telegram. Try to read the device with a generic FBox. If you are sure you have to use a specific FBox for this device, please report the problem to Engiby.
In case you are working with a "Aquametro Calec MB", please update the library to version 2.7.213 which features an improved mechanism for the above mentioned configuration.

3 Missing value errors

If you have eliminated all problem sources described above, you should get at least the counter identification at the FBox output. A typical problem at this stage is the "Missing value" error.
This error indicates that the device responds correctly to the read request, but the device FBox did not find one or more values in the telegram. You may be able to identify the missing value by checking the FBox output values. A missing value remains to 0 despite the value shown on the device is not 0 or it is unlike to be currently at 0. Use NG-Mscan2 (see point 4 below) to check the values returned by the device.
Several situations can lead to a "Missing value" error.

  1. The unit of Energy or Power does not match de device configuration. Different coding (VIF coding) exist for the energy (Wh, MWh, J or GJ) and the power (W or MW). If the used FBox has options for these units, select the one matching the device configuration. If the FBox does not have these options and you are sure the device has a different coding, report the case to Engiby (in this case the FBox may need to be extended). These options are not always implemented because the document was not clear about this point or the device firmware has been extended later on.
  2. A value is missing in the returned telegram. Due to different device variants, firmware versions or different configurations, an expected value is not supported by the used device. Check if the device can be re-configured in order to add the missing value in the telegram.
  3. A value has a particular identifier (DIF and VIF coding) which is different than the expected one. This is often the case for devices with two or more energy counters, different tariffs or additional inputs. Depending of device variant, these particular values may have a different coding or be missing in the device response. If you get all needed values despite of this error you may ignore it. You can also report the case to Engiby. We will adapt the FBox to find the value or define the missing value as optional, without error in the FBox.
  4. A value can be omitted in the data telegram because a sensor is defective or missing. This case has been encountered with temperature sensors on some heating devices. At the same time a status bit may be set to 1. Connecting a working sensor will restore the value and avoid the error.
    Some devices do also mark the Power with Function Code "Error" in case the return temperature is higher than the forward flow temperature. In this case the "Missing Value" error will disappear once the temperature are "normal" again. In this case the error can be ignored if the return temperature is higher than the forward temperature.

4 NG-Mscan 2
NG-Mscan2 is a free Engiby tool able to scan an M-Bus network to find all device on the bus and report the full data package returned by each device. It can be installed as Add-on tool for PG5 2.x and is especially useful to discover all values returned by a device. If necessary you can use it to create a scan file that can be sent to Engiby for analysis. Download page NG-MScan2.