Suchen Sie etwas anderes?
Table of Contents
Introduction
Titan routers (those which have an optional W-MBus) can be used to convert Modbus TCP – Wireless M-Bus protocols. Nowadays there are many platforms using Modbus TCP protocol to read different kinds of devices (meter boxes, network analysts, …). With MTX-Router-Titan-3G we can keep using the same existing software platforms, meaning, we can keep using Modbus TCP protocol to read Wireless M-Bus (OMS) devices.
Example Scenario
This application note will clearly explain how to configure the Titan router so it functions as a Modbus TCP <> Wireless-Mbus converter. To do that, we are going to develop a complete example. Let’s say there is a building with Wireless M-Bus pulse count input connected to water meter boxes and we want to be able to read those meter boxes via Modbus-TCP remotely using the 3G network.
WAN Configuration
We need to access the configuration screen “WAN > Basic Settings” to provide the Titan router with an Internet 3G or 4G output, and enter the APN, User and Password according to the SIM card being used. The following screen shows how to do that:
Let’s not forget to select Remote Management if we want to run the Titan router remotely via 3G/4G.
W-MBUS Card Configuration
Next we will properly configure the W-MBus card of the Titan router. Since said card is connected to the USB port of the Titan router, we will go to the section “Serial Settings > Serial Port5 USB” and will configure the suitable speed, parity, etc. … so the W-MBus can work properly:
Next, we need to configure the W-MBus itself, specifying it is connected to the USB port, choosing the W-MBus mode, the time window “0”, an optional filter to point out the meter boxes manufacturer to be managed, the Parser mode (compulsory in order to be able to make modbus readings), and leave the “Logger” option unchecked since we are not going to send data to a Web platform or through FTP, but we want to read them through Modbus TCP.
We can add a filter by meter box serial number. That is, we can specify the serial numbers of the Wireless M-Bus devices from which we want to gather data (up to 500 devices) in our Titan router. To do that, we click the “SERIAL NUMBER FILTER” button in the lower part of the screen of the previous picture, and we can enter the numbers of our devices.
Modbus TCP Configuration
Next we will configure the Titan router to use it as Modbus Slave TCP. This way we will be able to communicate with it remotely to make the received readings from Wireles M-Bus devices. To do that, from the menu “Other > Modbus TCP Slave” we check “Enabled” (to activate the service) and enter the chosen TCP port, which is 502 by default.
After clicking on the “SAVE CONFIG” button and restart the MTX-Router-Titan-3G we are set to connect remotely and read the Wireless M-Bus meter boxes through Modbus TPC protocol.
This application note is a summary of the essentials, but we can also configure OpenVPN services for safe communication, firewall, SMS communication, remote updates… For more information check the user guide, the application notes or contact us at iotsupport@matrix.es.
Testing the Configuration
In the lower part of the previous screen (Other > Modbus TCP Slave) there is a MODBUS memory map related to the Wireless M-Bus devices.
How to read a Wireless M-Bus device via Modbus TCP
Let’s say we want to read the Wireless M-Bus meter box with the serial number “06461000102a011b” via Modbus TCP.
If we pay attention to the Modbus memory bus, we can see the positions of the registry 5000 to 5003 are to read/write the Wireless M-Bus device serial number. Therefore, we will enter the serial number of the devices we want to read in those registries.
If the Wireless M-Bus serial number is: 0646100002180307, we enter the following words in the registries 5000, 5001, 5002, 5003:
Registry 5000: > 0646 (decimal 1606)
Registry 5001: > 1000 (decimal 4096)
Registry 5002: > 0218 (decimal 536)
Registry 5003: > 0307 (decimal 775)
We enter the following words in the registries 5000, 5001, 5002, 5003:
Once we enter the meter box we want to read, we just need to read registries 5000 to 5179, where all the information about the requested Wireless M-Bus is.
Registry 5004: > 0: no data | 1: valid data.
It shows 0 when for instance there is no data from a W-MBus device with a proper serial number in the Titan router or when no data is being received. It shows 1 when the received data on the following registries are valid.
Registry 5005: > Year: 2000 … 2100
It shows the year of the last reading received from the Wireless M-Bus device.
Registry 5006: > Month: 1 … 12
It shows the month of the last reading received from the Wireless M-Bus device.
Registry 5007: > Day: 1 … 31
It shows the day of the last reading received from the Wireless M-Bus device.
Registry 5008: > Hour: 0 … 23
It shows the hour of the last reading received from the Wireless M-Bus device.
Registry 5009: > Minutes: 0 … 59
It shows the minutes of the last reading received from the Wireless M-Bus device.
Registry 5010: > Seconds: 0 … 59
It shows the seconds of the last reading received from the Wireless M-Bus device.
Registry 5011: > RSSI: 0 … 100
It shows the RSSI read by the Titan router of the communicating device.
Registry 5012: > ERROR: 0 … 255
It shows the byte of ERROR of the Wireless M-Bus device.
Registry 5013: > NUM DATA: 0 … 20
It shows all the data tokens gathered from the Wireless M-Bus device. That is, the gathered DIFx, VIFx, DATAx number.
Registry 5020-5021: > DIF1: 0x00000000 … 0xFFFFFFFF
It shows the DIF1 (Data Information Field) of Token 1.
Registry 5022-5023: > VIF1: 0x00000000 … 0xFFFFFFFF
It shows the VIF1 (Value Information Field) of Token 1.
Registry 5024-5027: > DATA1: 0x0000000000000000 … 0xFFFFFFFFFFFFFFFF
It shows the DATA1 of Token1.
Registry 5028-5029: > DIF2: 0x00000000 … 0xFFFFFFFF
It shows the DIF2 (Data Information Field) of Token 2.
Registry 5030-5031: > VIF2: 0x00000000 … 0xFFFFFFFF
It shows the VIF2 (Value Information Field) of Token 2.
Registry 5032-5035: > DATA2: 0x0000000000000000 … 0xFFFFFFFFFFFFFFFF
It shows the DATA2 of Token2.
………
Registry 5172-5173: > DIF20: 0x00000000 … 0xFFFFFFFF
It shows the DIF20 (Data Information Field) of Token20
Registry 5174-5175: > VIF20: 0x00000000 … 0xFFFFFFFF
It shows the VIF20 (Value Information Field) of Token20
Registry 5176-5179: > DATA20: 0x0000000000000000 … 0xFFFFFFFFFFFFFFFF
It shows the DATA20 of Token20.