MBUS configuration |
The following settings for PC serial COM port are recommended to be used in M-Bus communication:
Baud rate: 2400 bps or 300 bps
Parity: Even
Data bits:8
Stop bit:1
M-Bus DataProvider (according to Mode 1) reads data as classes containing records with various types of information. Each M-Bus class is represented in CommServer as a block: blocks contain metadata (description of a particular record content) and process data. Metadata and data from each record can be made available in the OPC address space as tags. The sequence of tags and tags type shall correspond to record fields.
To read a data block, a request with the selected data type (class) and device address on the network is sent to the device (called a station in the CommServer configuration). The M-Bus device address is configured as a port (interface) address property.
For the performance reasons, with each class defined by the specification a simplified class is associated that allows to define blocks containing only process data values from the received M-Bus records – metadata is neglected. To publish M-Bus data as OPC tags, the user has to create groups to define the scanning policy, and blocks to define an appropriate class of data. M-Bus DataProvider allows reading the following classes of data:
Class2_Data - This class contains process data that are measured by the device,
Class2_Data_Short - This class contains the same data as Class2_Data, but description of data is excluded. Only values of the received data records are returned to CommServer as consecutive tags,
Class1_Data and Class1_Data_Short - – those classes contain data referring to alarms (this version of M-Bus DataProvider does not support Class 1)
During configuration of the block, address and name properties are unimportant because they are not used in M-Bus communication. Below find an example of block configuration:
After sending a request for data (User Data Class 2), the remote device responds using a frame that is available in CommServer as a block containing the following tags:
Index in block | Meaning |
---|---|
0 | Counter serial number* |
1 | Manufacturer identifier * |
2 | Information * |
3 | The number of received data records (called N in this manual)* |
4 | Record 1 – Value |
5 | Record 1 – Description of data type (length in bits, how the value is encoded, etc.)* |
6 | Record 1 – Description of data (e.g. Energy, Volume, Flow, etc.)* |
7 | Record 1 – Engineering unit* |
... | ... |
4+(N-1)*4+0 | Record N – Value |
4+(N-1)*4+1 | Record N – Description of data type (length in bits, how the value is encoded, etc...)* |
4+(N-1)*4+2 | Record N – Description of data (e.g. Energy, Volume, Flow, etc.)* |
4+(N-1)*4+3 | Record N – Engineering unit* |
Fields marked with an asterisk (*) are not available for data types with “short” postfix, e.g.. Class2_Data_Short.