Kara Systems BACnet:M-Bus User manual

User’s Manual
Kara BACnet Gateway Page 1
BACnet:M-Bus
BACnet:Modbus
Gateway
User’s M
ANUAL
Kara Systems
www.karasystems.eu
Version: 2.2.23

User’s Manual
Kara BACnet Gateway Page 2
USER'S MANUAL
TABLE OF CONTENTS
1 GENERAL INFORMATION .............................................................................................................4
1.1 M-Bus .........................................................................................................................................4
1.2 Modbus.......................................................................................................................................4
1.3 BACnet.......................................................................................................................................4
1.4 Kara BACnet Gateway.............................................................................................................4
1.5 Scenario......................................................................................................................................6
2 Hardware M-Bus and Modbus (Tcp/IP)............................................................................................7
2.1 Ethernet Port .............................................................................................................................7
2.2 Serial Port ..................................................................................................................................8
3 Hardware with RS-485 (optional) ......................................................................................................8
3.1 Dip Switch..................................................................................................................................9
3.2 Serial Ports.................................................................................................................................9
4 Installation.........................................................................................................................................10
4.1 3.1 Ethernet LAN.....................................................................................................................10
4.2 3.2 BACnet Configuration......................................................................................................13
4.2.1
BACnet Device Instance:.....................................................................................................................13
4.2.2
BACnet Broadcast Management Device (BBMD)..............................................................................14
4.3 BACnet Objects.......................................................................................................................14
4.4 M-Bus Configuration..............................................................................................................14
4.4.1
Enable Baud rates for M-Bus:..............................................................................................................15
4.4.2
Serial Port Name:.................................................................................................................................15
4.4.3
Enable consumption:............................................................................................................................15
4.4.4
RS485 Interface ...................................................................................................................................15
5 Meter Readings..................................................................................................................................16
5.1 4.1 Export to Excel ..................................................................................................................17
5.2 4.2 Scanning Meters ................................................................................................................17
5.3 4.3 Meter Configuration .........................................................................................................18
5.3.1
Reading Interval:..................................................................................................................................18
5.3.2
Record No:...........................................................................................................................................18
5.3.3
Delete Meter: .......................................................................................................................................18
5.4...........................................................................................................................................................19
5.5 4.4 Meter Records....................................................................................................................19
5.6 4.5 Edit Records.......................................................................................................................19

User’s Manual
Kara BACnet Gateway Page 3
5.6.1
To BACnet Object...............................................................................................................................19
5.6.2
Unit......................................................................................................................................................20
6 MODBUS...........................................................................................................................................20
6.1 Adding Modbus Objects.........................................................................................................20
7 The BACNET Browser......................................................................................................................20
8 Recovery.............................................................................................................................................21
9 BACnet Specifications ......................................................................................................................21
6.1 BACnet Object Name..............................................................................................................23
9.1 6.2 BACnet Services Supported.............................................................................................23
9.2 6.3 BACnet specific Object Properties..................................................................................24

User’s Manual
Kara BACnet Gateway Page 4
1 GENERAL INFORMATION
1.1M-Bus
M-Bus (Meter-Bus) is a European standard (EN 13757-2 physical and link layer, EN 13757-3 application
layer) for the remote reading of gas or electricity meters. M-Bus is also usable for other types of
consumption meters. The M-Bus interface is made for communication on two wires, making it very cost
effective.
The M-Bus was developed to fill the need for a system for the networking and remote reading of utility
meters, for example to measure the consumption of gas or water in the home. This bus fulfills the special
requirements of remotely powered or battery driven systems, including consumer utility meters. When
interrogated, the meters deliver the data they have collected to a common master, such as a hand-held
computer, connected at periodic intervals to read all utility meters of a building.
1.2Modbus
Modbus is a serial communications protocol published by Modicon in 1979 for use with its
programmable logic controllers (PLCs). It has become a de facto standard communications protocol in
industry, and is now a commonly available means of connecting industrial electronic devices.
Modbus allows for communication between many devices connected to the same network, for example a
system that measures temperature and humidity and communicates the results to a computer. Modbus
supports communication over EIA-485, EIA-232 and Ethernet TCP/IP
1.3BACnet
BACnet is a communications protocol for building automation and control networks. It is an ASHRAE,
ANSI, and ISO standard protocol.
BACnet was designed to allow communication of building automation and control systems for
applications such as heating, ventilating, and air-conditioning control, lighting control, access control,
and fire detection systems and their associated equipment. The BACnet protocol provides mechanisms
for computerized building automation devices to exchange information, regardless of the particular
building service they perform.
1.4Kara BACnet Gateway
The Kara BACnet gateway is a 2 in 1 gateway for BACnet. It integrates M-Bus meters and Modbus
devices sensors into BACnet. It represents a BACnet Device and several BACnet objects. M-Bus meters

User’s Manual
Kara BACnet Gateway Page 5
are converted to BACnet Analog Inputs. Modbus Input discrete and Coils are converted to BACnet
Binary inputs and outputs respectively and Modbus Input/Holding Registers and converted to BACnet
Analog input and output objects.
The gateway supports both BACnet/IP and BACnet/Ethernet
The connection to BACnet is done over Ethernet LAN BACnet/IP or BACnet/Ethernet. To connect the
gateway to M-Bus you need a Level Convertor to convert the EIA-232( optional EIA-485) connection to
M-Bus physical Bus.

User’s Manual
Kara BACnet Gateway Page 6
1.5Scenario
The scenario shows an overview of the involved components. USB-Hub is only required if you connect
more than one bus to the device.

User’s Manual
Kara BACnet Gateway Page 7
2 HARDWARE M-BUS AND MODBUS (TCP/IP)
The Gateway runs on a high quality Industrial Linux computer.
The Device is based on a 32 Bit ARM processor running at 1.2Ghz.
Features:
•One 10/100 Mbps Ethernet
•One RS-232
•Integrated Power Supply
•Integrated Power Plug
•Power Type 50 – 60Hz 100 – 240 V
•Ultra-low power consumption, less than 5 Watts
•System cooling: passive
Dimensions: 68.5 x 110 x 48.5 mm
Regulation: CE Class A, FCC Class A
Operation Temperature: 0 to 70C(32 to 158F)
2.1Ethernet Port
The Ethernet Port use RJ45 connector
Pin Signal
1 ETx+
2 ETx-
3 ERx+
6 ERx-

User’s Manual
Kara BACnet Gateway Page 8
2.2Serial Port
The RS-232 comes with a DB9 Jack.
Pinning of DB9
connectors:
Pin Jack Usage
2 RXD Receive from Level
convertor
3 TXD Send to Level Convertor
4
-
Unused
5 GND Ground potential
7 RTS Handshake unused
8
CTS
Always active
The RS-2332 cable can be connected directly to a Level Convertor such as PW20 from www.relay.de.
3 HARDWARE WITH RS-485 (OPTIONAL)
The Gateway runs on a high quality Industrial Linux computer.
The Device is based on a 32 Bit ARM processor running at 200 Mhz.
Features:
·ARM920T ARM Thumb Processor with 200MIPS at
·180MHz, Memory Management Unit
·One 10/100 Mbps Ethernet
·One 3-in-1 RS-232/422/485 ports and three RS-232 ports
·9 to 48 VDC Power input
·3 USB
·Two USB 2.0 full speed (12 Mbps) Host Ports
·Optional DIN RAIL mounting adaptor
·Ultra-low power consumption, less than 3 Watts
Dimensions: 78 x 108 x 24mm
Regulation: CE Class A, FCC Class A
Operation Temperature: 0 to 70C(32 to 158F)

User’s Manual
Kara BACnet Gateway Page 9
3.1 Dip Switch
The four keys DIP switch is used to configure serial port interface for Port 1. Key 1 and 2 are used to
configure the RS-232/422/485 mode of serial port P1 and Key3 and Key 4 are connected to GPIO and
they are reserved for the gateway software.
Switch
1
2
3
4
RS
-
232
ON
ON
RS
-
422
OFF
ON
RS
-
485
OFF
OFF
3.2 Serial Ports
The four serial ports use RJ45 connector and the pin assignment are shown as following table.
Pin RS-232 RS-422 RS-485
1
DSR
---
--
2
RTS
TXD+
Data+
3
GND
GND
GND
4
TX
D
TXD
-
Data
-
5
RXD
RXD+
---
6
DCD
RXD
-
---
7
CTS
---
---
8
DTR
---
---
The Names of the serial ports are:
Port 1 = ttyS1
Port 2 = ttyS2
Port 3 = ttyS3
Port 4 = ttyS4
Port 1: RS-232/422/485 (switch selection)
RS-232: RXD,TXD,RTS,CTS,GND
RS-422: TXD+, TXD-,RXD+,RXD-,GND
RS-485: DATA+,DATA-,GND
Port 2: RS-232: RXD, TXD, RTS, CTS, DSR, DTR, DCD, GND
Port 3: RS-232: RXD, TXD, RTS, CTS, GND
Port 4: RS-232: RXD, TXD, RTS, CTS, GND

User’s Manual
Kara BACnet Gateway Page 10
4 INSTALLATION
4.13.1 Ethernet LAN
Before connecting the Kara BACnet Gateway to your target LAN you have to configure the Network
Configuration of the device by connecting the device to an install network see Step 1.
Step 1:
Connect the gateway with an Ethernet cable direct to a Workstation and set the workstation IP number to
192.168.2.1.
Step 2:
Open the browser on the workstation and enter the following URL:
http://192.168.2.127
The Kara BACnet Gateway configuration is protected with a user name and password, so you will be
prompt a dialog to enter the user name and password.
The user name is
admin
.
The default password is
password
.
Please change the default password!
You will stay logged in till you close the browser.

User’s Manual
Kara BACnet Gateway Page 11
Click on “Administration” and then on “Network Configuration”
Step 3:
Configure the Network Configuration of the target LAN.

User’s Manual
Kara BACnet Gateway Page 12
Host Name:
Enter the name for the device
IP-Address:
Enter the IP number for the device for the target LAN.
Subnet-mask:
The IP Mask of the Target LAN. For example 255.255.0.0
Default gateway:
The default IP number of the IP-Gateway/Router of the target LAN
Domain Name Server:
The DNS Server of your target LAN, if required
Default Domain:
This field can be left empty
Step 4:
Click on “Save” and click on “BACnet Configuration”
Proceed in next chapter

User’s Manual
Kara BACnet Gateway Page 13
4.23.2 BACnet Configuration
Step 5:
Before connecting the device to the target LAN you have to configure the BACnet Configuration.
4.2.1 BACnet Device Instance:
This is a unique BACnet Device Identifier. Please consult your BACnet Administrator to get a unique
Instance number.
ATTENTION: If this Device Instance is not unique on the BACnet LAN, other BACnet devices
may fail to operate

User’s Manual
Kara BACnet Gateway Page 14
4.2.2 BACnet Broadcast Management Device (BBMD)
If the “BACnet Workstation Operator “ or other BACnet device which needs to establish a bind with the
“M-Bus:BACnet Gateway” is located on a different IP sub-network, you have to register the device IP
number in the “BBMD Registration dialog”. The default port is 47808 (bac0 in hexadecimal). Enter the
new IP Number in the “IP Number Field” and click on save to register this remote device IP number.
4.3BACnet Objects
BACnet Objects are not automatically included. By M-Bus Gateway you have to select the checkbox “to
BACnet” for the particular meter record or records.
For Modbus Gatway select the check box “to BACnet in the modbus object configuration. The BACnet
Instance number and type is done automatically.
4.4M-Bus Configuration

User’s Manual
Kara BACnet Gateway Page 15
4.4.1 Enable Baud rates for M-Bus:
M-Bus supports multiple baud rates for different meters. Here you can multiple select the Baud rates
used on your M-Bus. If you select all Baud rates the Scan will take longer to complete.
4.4.2 Serial Port Name:
The default setting is “ttyUSB0”. If you are using a USB hub and two interfaces then choos “ttyUSB1”
for the second interface.
4.4.3 Enable consumption:
If enable, the device save the meter daily readings in the flash. Readings will be deleted if older than 1
year maximum 2 years. The data is written on the external SD-Card. Please order the optionally SD-Card.
4.4.4 RS485 Interface
If cable length to the M-Bus Level-Converter is longer than 8 meters, you should use the RS-485
interface.
You require an M-Bus level converter with an RS-485 interface.
Step 6:
Now click “Save” and return to the “Main Menu” and click on “Reboot Device”.
Your browser will display an error message that the connection to the device did failed. This is because
now the device has a new IP number.
Now you can unplug the device from the Install network and plug the device to the target network.
Installation is ready.

User’s Manual
Kara BACnet Gateway Page 16
5 METER READINGS
The Meter Reading Dialog shows a list of all meters found on the M-Bus. Meters are detected by doing a
scan on the M-Bus. The device starts a scan after a switch on or after a reboot. You can start a scan
manually by clicking on the button “Start Scan”
Addr: is the primary Meter Address
Ident: is the Meter identification number, which should be unique.
Baudrate: is the baudrate used for this meter.
Manu.: is the Manufacture 3 letter code
Version: is the software Version of the M-Bus slave meter software
Status: Definition of the Meter Status
Bit Meaning
0 (LSB) Error
1 Application Busy
2 Power Low
3 Permanent Error
4 Temporary Error
5 Specific to Manufacture
6 Specific to Manufacture
7 Specific to Manufacture

User’s Manual
Kara BACnet Gateway Page 17
State: could be one of the following
OK
Inactive: meter is not responding
Communication Error:
Collision Detection: Two meters are responding for same address, check meter addresses
Send Error: check RS232 cabling
Wrong Command: Incorrect Data received
Wrong Start Character: Incorrect Data received
Message too short: Incorrect Data received, a meter on the M-Bus could be damaged
Wrong length: protocol Error
Wrong Checksum: Check Baudrate and cable lengths
M-Bus Status Error: means that the Meter signals an error in the Meter status field
Value: Value of the default record set in the meter configuration
Units: Value of the default record set in the meter configuration
Description: description of the default record set in the meter configuration
To BACnet: a List of record numbers which are converted to BACnet Analog Input
The first number is the meters record number and the second number is the BACnet Instance number.
Records: see Meter Records
5.14.1 Export to Excel
If you want to export the meter list to Excel click on “Export to Excel” then open the file with Microsoft
Excel.
5.24.2 Scanning Meters
To detect new meters on M-Bus the M-Bus:BACnet Gateways performs a scan on all primary M-Bus
addresses for all baudrates selected and then make a secondary scan on meter Identification numbers for
all baudrates selected. Meter found on secondary scan has a primary address of 253.
Attention
The meters Identification Number must be unique for all meters.
Clicking on “Start Scan” will show the scan status.
Meters found will be listed in the M-Bus Meter Reading dialog. The Meters found are saved and will get
an Inactive Status if they are switched off.

User’s Manual
Kara BACnet Gateway Page 18
5.34.3 Meter Configuration
5.3.1 Reading Interval:
Meters are read periodically. You can set the reading interval in minutes for a specific meter or you can
set this interval for all meters by clicking on the “Set Interval for ALL Meters”. The default value is one
minute.
5.3.2 Record No:
This is the record number which its values will be displayed in the “Meter Reading List” dialog.
5.3.3 Delete Meter:
If a meter is removed from the M-Bus you can delete this meter by click on this button. The meter is
attached at the M-Bus again and you perform a scan the meter will be included again with default
settings.

User’s Manual
Kara BACnet Gateway Page 19
5.4
5.54.4 Meter Records
There are two types of M-Bus Meters, those who support a fixed record data and those who support
variable record data. The fixed records can send up to two meter records where the variable record
protocol can send many records. The Meter Record dialog displays all records received from the meter
and their data respectively. Here you can select which record will be converted to a BACnet Analog
Object.
The “Next >>” and “<< Back” buttons will show the records of the next or previous meter in the list
respectively.
5.64.5 Edit Records
Every single record can be configured in this dialog.
5.6.1 To BACnet Object
If set, this record will be converted to a BACnet Analog Input Object. The record will be assigned the
next available BACnet object instance starting from zero. The BACnet instance number will be assigned

User’s Manual
Kara BACnet Gateway Page 20
to this record till you detach this record again from BACnet. The instance assigned will be displayed in
the meter list.
5.6.2 Unit
The BACnet gateway automatically converts the M-Bus units to BACnet Units respectively. This is the
{default} value. But you can select any other BACnet Unit from the list.
6 MODBUS
6.1Adding Modbus Objects
Before add modbus objects you have to add first the modbus device.
Click on “Add new Device” to add a device.
To add a modbus object list the devices and click on the device’s objects.
You can list all Modbus objects configured or all Objects which belong to one particular device.
7 THE BACNET BROWSER
The Gateway has an integrated BACnet Browser. It shows only objects connected to this gateway.
This manual suits for next models
1
Table of contents