M-Bus to Modbus-TCP Gateway 024380-C, 025070-C USER MANUAL SCM-1202-0096-EN 2.
Important User Information Liability Every care has been taken in the preparation of this document. Please inform HMS Industrial Networks AB of any inaccuracies or omissions. The data and illustrations found in this document are not binding. We, HMS Industrial Networks AB, reserve the right to modify our products in line with our policy of continuous product development.
Table of Contents 1 Page Preface ............................................................................................................................... 3 1.1 About This Document.....................................................................................................3 1.2 Document History ..........................................................................................................3 1.3 Document Conventions ..............................................................
Table of Contents 8 Advanced Configuration ............................................................................................. 37 8.1 FTP ............................................................................................................................37 8.2 SSH............................................................................................................................38 8.3 Ping .......................................................................................
Preface 3 (46) 1 Preface 1.1 About This Document This document describes how to install and configure the Anybus M-Bus to Modbus-TCP gateway, models 024380-C and 025070-C. For additional documentation, configuration examples, FAQs, troubleshooting guides and technical support, please visit www.anybus.com/support. 1.2 Document History Version Date Description 2.1 2018-02-01 First release for this model version M-Bus to Modbus-TCP Gateway User Manual SCM-1202-0096-EN 2.
Preface 1.3 4 (46) Document Conventions Ordered lists are used for instructions that must be carried out in sequence: 1. First do this 2. Then do this Unordered (bulleted) lists are used for: • Itemized information • Instructions that can be carried out in any order ...and for action-result type instructions: ► This action... ➨ leads to this result Bold typeface indicates interactive parts such as connectors and switches on the hardware, or menus and buttons in a graphical user interface.
Product Description 2 5 (46) Product Description The Anybus M-Bus to Modbus-TCP gateway allows measuring devices that use the M-Bus protocol (meters) to communicate on a Modbus TCP network with up to 5 Modbus clients. Meters can be added manually or automatically by scanning the M-Bus. The gateway configuration maps data from each meter to a corresponding Modbus register. Meter data will then be read automatically at an interval that can be set globally or individually for each meter.
Installation 3 6 (46) Installation This product contains parts that can be damaged by electrostatic discharge (ESD). Use ESD prevention measures to avoid damage. 3.1 3.2 Installation Overview 1. Mount the unit on a DIN rail. 2. Connect the M-Bus and Ethernet cables. 3. Connect the power supply and power on the unit. 4. Check the network settings and configure them as required. 5. Open the web interface to configure the unit. DIN Rail Mount Fig.
Installation 3.3 7 (46) Connections and Indicators To ensure a good M-Bus signal, make sure that power ground (GND) is NOT electrically connected to protective earth (PE). Maximum cross sectional area in terminal block = 2.
Installation 3.4 8 (46) Network Settings The Anybus M-Bus to Modbus-TCP gateway is normally configured using the built-in web interface. The IP address of the gateway must be in the same subnet range of your local network as the computer used for configuration. Default network settings Static IP address Subnet mask Default gateway 192.168.1.101 255.255.255.0 192.168.1.254 The network settings can be configured automatically from a DHCP server or manually using the configuration tool Net discover.
Configuration 4 9 (46) Configuration When power is applied the gateway will run the following startup sequence: 1. Applying TCP/IP network settings using DHCP or static configuration 2. Initial generation of SSL device keys (may take some time on first startup) 3. Setting system time via SNTP 4. Starting system services 5.
Configuration 4.2 10 (46) General Tab This tab contains general network settings. Fig.
Configuration 4.3 11 (46) Meter Tab This tab lists the connected meters and allows you to add and edit individual entries. Fig. 6 Meter tab The meter list is initially empty. After connecting meters to the gateway, click Scan to start populating the list. The scanning settings can be changed on the Configuration tab. Successive scans will add discovered meters to the list. Existing meters will not be deleted even if they are unavailable. To delete a meter from the list, select it and click Delete.
Configuration 12 (46) The default configuration for each meter is applied immediately after scanning. Additional changes to the configuration must be saved manually. When activating or deactivating a meter, its meter values will automatically be enabled or disabled according to the hierarchy. An inactive meter will be activated when one of its meter values is enabled. Hold down the SHIFT or CTRL keys to select multiple meters or meter values.
Configuration 13 (46) Editing Entries Fig. 7 Editing meter and value entries Meter and value entries can be configured by double-clicking the entry or by right-clicking the entry and selecting Edit. The fields in the Edit dialog correlate with the fields in the meter list. Depending on the used interface some fields may be disabled for editing. The readout interval can be set independently for each meter in the field Cycle.
Configuration 4.4 14 (46) Configuration Tab This tab provides global meter settings. Fig. 8 Configuration tab Discard the changes made on the page and reload the currently active settings. Save the changes and reinitialize the gateway. See Print Page, p. 21. M-Bus to Modbus-TCP Gateway User Manual SCM-1202-0096-EN 2.
Configuration 15 (46) Configuration tab fields Field Description Writable Readout interval (s) Standard readout cycle of meters (in seconds). Value might be overwritten for each meter by parameter Cycle in tab Meter Yes Description mode Mode of displaying the meter value description. None No display of description Yes Standard Display of common value description. Extended Extended display of value description (if not 0).
Configuration 4.5 16 (46) Server Tab This tab provides settings for the Modbus TCP interface. Fig. 9 Server tab Server tab fields Field Description Writable Modbus mode Select Modbus TCP (default) or Modbus UDP. A maximum of 5 simultaneous connections from Modbus masters are accepted in Modbus TCP mode. Yes Modbus port Port number that the Modbus TCP client (master) should connect to. Default = 502. Activates a dummy process image for testing purposes. See Modbus TCP Specification, p. 22.
Configuration 4.6 17 (46) Security Tab This tab allows you to enable/disable access to the gateway over FTP, SSH and Telnet connections. Fig. 10 Security tab Server tab fields Field Description Writable FTP server active SSH server active Telnet server active Enable FTP server Enable SSH server Enable Telnet server Yes Yes Yes Discard the changes made on the page and reload the currently active settings. Save the changes and reinitialize the gateway. See Print Page, p. 21.
Configuration 4.7 18 (46) User Tab This tab allows you to create and manage users and assign them specific access rights. Fig. 11 User tab User tab fields Field Description Writable Name Overwrite password Username Not used No Yes Change password User is allowed to change his/her password Yes Sessions Number of currently open session with this user account No Maximum sessions Max.
Configuration 19 (46) To edit the password and the maximum sessions setting, either double-click on the user entry or right-click on the entry and select Edit from the context menu. Fig. 12 Edit user Username cannot be changed once the user has been saved. FTP Access will only allow access to the log data directory (C:\log). Only the admin user will have full access to the file system via FTP.
Configuration 4.8 20 (46) Service Tab This tab provides read-only information about the hardware and software for support and troubleshooting. Fig. 13 Service tab Refresh the information on this page. (disabled) Restart the gateway and reinitialize all internal processes. See Print Page, p. 21. M-Bus to Modbus-TCP Gateway User Manual SCM-1202-0096-EN 2.
Configuration 4.9 21 (46) Print Page Clicking Print on any tab in the web interface will export the complete configuration (not only the active tab) as a printable HTML page in a new browser tab or window. The Meter Configuration section will be output in a table format that can be copied and pasted directly into a spreadsheet program. Fig. 14 Printable export page M-Bus to Modbus-TCP Gateway User Manual SCM-1202-0096-EN 2.
Modbus TCP Specification 5 22 (46) Modbus TCP Specification The Modbus protocol is a single master protocol. The Modbus TCP client (master) controls the entire communication, and the connected Modbus TCP servers (slaves) are only allowed to respond to its requests. The Anybus M-Bus to Modbus-TCP gateway is a Modbus TCP server. Modbus TCP communication requires an established connection between the servers and the client over a specified TCP port.
Modbus TCP Specification 23 (46) Dummy Data For checking the data layout on the Modbus master side the gateway can be configured to generate dummy data. See Server Tab, p. 16. The following data will be represented via the Modbus interface according to the register layout described in Meter Data Format, p.
Acquiring and Processing Meter Data 6 24 (46) Acquiring and Processing Meter Data The main task of the Anybus M-Bus to Modbus-TCP gateway is the processing and transmission of meter data. For proper operation, the following issues must be considered: The following requirements must be fulfilled for the Anybus M-Bus to Modbus-TCP gateway to process and transmit meter data: 6.1 • Each meter and value must be correctly configured and have a valid register address.
Acquiring and Processing Meter Data 25 (46) Adding Meters Manually Fig. 15 Adding a meter Meters that are connected but not found during a scan can be added manually by clicking on the Add button in the Meter tab. The configuration of the meter must be known to be able to add it manually. The fields in the Add meter dialog correspond to the fields in the meter list.
Acquiring and Processing Meter Data 6.2 26 (46) Meter Data Format The media IDs, value types and units used in meter data are defined in the EN 13757-3 standard. Custom types and units can be defined depending on the meter interface.
Acquiring and Processing Meter Data 27 (46) Predefined Measurement Value Types Index Description Index Description 0 None 46 Access code developer 1 Error flags (Device type specific) 47 Password 2 Digital output 48 Error mask 3 Special supplier information 49 Baud rate 4 Credit 50 Response delay time 5 Debit 51 Retry 6 Volts 52 Remote control (device specific) 7 Ampere 53 First storagenum. for cyclic storage 8 Reserved 54 Last storagenum.
Acquiring and Processing Meter Data 28 (46) Predefined Units Index Unit Description 0 1 None Bin None Binary 2 Cur Local currency units 3 4 V A Volt Ampere 5 6 7 Wh J m^3 kg Watt hour Joule Cubic meter Kilogram 9 10 11 12 s min h d Second Minute Hour Day 13 14 W J/h Watt Joule per Hour 15 m^3/h Cubic meter per hour 16 m^3/min Cubic meter per minute 17 m^3/s Cubic meter per second 18 kg/h Kilogram per hour 19 Degree C Degree celsius 20 21 22 23 - 24 25 26 27 28 29 K Bar
Acquiring and Processing Meter Data 29 (46) Modbus Register Layout The Anybus M-Bus to Modbus-TCP gateway uses a fixed address structure of 10 Modbus registers per meter/meter value. Addresses are enumerated starting with 0. • Data types using more than one register are encoded with the most significant word at the lowest address. • The function code 0x03 (Read Holding Register) is used for reading the data. Within the Modbus protocol, data is formatted as either integer or float.
Acquiring and Processing Meter Data 30 (46) Example Configuration In this example, the following data will be transmitted to the Modbus master: Address Device entry Value 0 1 2 3 4 5 0x0002 0x993A 0x0001 0x006F 0x519C 0xC16D 6 7 0x0000 0x0100 Reserved Type field / reserved - 8 9 Meter entry 0x0000 0x0000 Reserved - 10 11 12 0x03F8 0x3CAA 0x32A7 Serial number 0x03F83CAA = 66600106 Manufacturer ID 0x32A7 = 0011.0010.1010.0111 1st letter: _011.00__.____.____ = 0x0C = 12 = L 2nd letter: ____.
Troubleshooting 7 31 (46) Troubleshooting This section lists some common problems and suggestions how to solve them. If none of the suggested actions solves the problem, please contact Anybus support. 7.1 Hardware Errors Gateway is not responding After powering on the gateway it does not operate. Current consumption is ~0 mA and both Ethernet LEDs are unlit. 1. Check that the power supply is connected with the correct polarity. 2. Check that the voltage between 24VDC and GND is ~24 VDC.
Troubleshooting 7.2 32 (46) Network Errors Web interface and FTP server inaccessible 1. Run Net discover and check if the gateway appears in the list. • If the gateway is not listed, continue to No network connection. • If the gateway is listed: – Run a connection test (ping). – Try to access the FTP server in the gateway. No network connection The gateway cannot be accessed and is not visible in Net discover. 1. Check the physical connection (cables and connectors).
Troubleshooting 33 (46) Web session is unexpectedly terminated If the web session is unexpectedly terminated, this may be due to a connection timeout. The timeout limit can be increased by editing the system parameter WEBCOM_TIMEOUT. See Configuration Files, p. 39. A timeout may also occur if the gateway is currently busy with the collection and transmission of meter data, which takes priority over web communication. FTP login fails or file list is empty 1.
Troubleshooting 7.3 34 (46) Meter Reading Errors No meters are detected A scan has been completed but none of the connected meters appear in the meter list. 1. Check the cable between the gateway and the meter and replace faulty cables. 2. Check that the voltage between terminals MBUS+ and MBUS- is ~36 VDC. 3. Check that the M-Bus interface (M-Bus mode) is enabled in the Configuration tab. 4. Check that the connected meters support configured search mode (primary or secondary). 5.
Troubleshooting 35 (46) Meters are detected but have no data Some meters may contain a wrong declaration of the secondary address. These meters will be visible in the meter list but not addressable for meter readouts. The system parameter MBUS_SELECTMASK makes it possible to mask parts of the secondary address and replace them with a wildcard character. The version field especially is a frequent cause of this problem (MBUS_SELECTMASK=4). See Configuration Files, p. 39.
Troubleshooting 36 (46) Webserver capacity error message After a scan or a change in the meter list, the gateway (even after a reboot) may show the following error message in the meter list: The meter list exceeds the capacity of the internal webserver This error message is caused by an internal limitation of the webserver.
Advanced Configuration 8 37 (46) Advanced Configuration The file system in Anybus M-Bus to Modbus-TCP gateway can be accessed directly for advanced configuration or troubleshooting. Right-clicking on the gateway in Net discover will open a context menu for accessing the file system in different ways. Fig. 18 Context menu Editing the configuration files may restrict functionality of the device and should always be done with care. 8.
Advanced Configuration 8.2 38 (46) SSH Secure shell access to the file system is possible using a terminal emulator such as PuTTY, which is bundled with Net discover and accessible from the context menu. After logging in as admin you can use shell commands to access the file system. Fig. 20 8.3 SSH access using PuTTY Ping The Ping command in Net discover can be used to test the network connection. Fig. 21 Ping command M-Bus to Modbus-TCP Gateway User Manual SCM-1202-0096-EN 2.
Advanced Configuration 8.4 39 (46) Configuration Files The configuration files are updated when changes are made via the web interface. They can also be edited manually and downloaded to the gateway via FTP. Manual changes to the configuration files will take effect after the gateway has been rebooted. Some parameters can only be changed by editing the configuration files manually. When editing the configuration files you must use an UTF-8 capable text editor.
M-Bus to Modbus-TCP Gateway User Manual Upper limit of address range for M-Bus primary scan Number of retries for a M-Bus or multipage request Lower limit of address range for M-Bus primary scan M-Bus parity: 0 = no, 1 = odd, 2 = even, 3 = mark, 4 = space Enables raw data log to drive B: MBUS_MAXRETRY MBUS_MINPRIMARYADDRESS MBUS_PARITY MBUS_RAWLOGENABLE Scan mode for M-Bus Predefined manufacturer ID for secondary scan MBUS_SCANMODE MBUS_ SECMASKMANUFACTURER Reset mode: 0 = Reset after select,
Enables specific wake-up request Limits the total number of meter values (0 = no limit) Limits the number of meters (0 = no limit) Limits the number of meter values per meter (0 = no limit) Path for meter configuration file Interval for meter read-out (seconds) IMPORTANT: Short cycle times and/or many meters may cause very high amounts of data being generated.
M-Bus to Modbus-TCP Gateway User Manual Maximum timeout for time request from a SNTP server (seconds) Minimum timeout for a time request from a SNTP server (seconds) Timeout for the SNTP request (ms) IP address of SNTP time server Timeout for watchdog during idle state (seconds) Timeout for watchdog during busy state (seconds) Timeout for watchdog during read-out (seconds) Timeout for watchdog during scan process (seconds) Timeout for a web session, user is logged out automatically after that perio
Advanced Configuration 43 (46) Meter Configuration File Parent Element name Description Default value Example root version Version of XML specification - 0x08 meter Parent element for each meter - - interface serial Interface to meter Serial number of meter (hexadecimal notation with leading 0x) - M-Bus 0x30101198 meter manufacturer Manufacturer of meter (abbreviation) Not set SLV version medium Version of meter Medium of meter (see Meter Data Format, p.
This page intentionally left blank
Appendix A: Technical Data A 45 (46) Technical Data Technical Specifications Model name Anybus M-Bus to Modbus-TCP gateway Order code M-Bus max. number of unit loads M-Bus baud rates M-Bus Uspace 024380 20 300 to 19200 Bd 36 V M-Bus Umark M-Bus max.
last page © 2018 HMS Industrial Networks AB Box 4126 300 04 Halmstad, Sweden info@hms.se SCM-1202-0096-EN 2.1.