RI-EA65 / RI-EA60
Protocol converter allowing access to M-Bus devices via Modbus RTU over RS-485.
Operation diagram
sequenceDiagram
autonumber
box RS-485
participant Master
participant Converter as RI-EA65
end
participant Remote as M-Bus Device
Master->>Converter: Request to M-Bus Device
activate Master
activate Converter
Note over Master,Converter: Modbus RTU over RS-485
Converter->>Remote: Request to M-Bus Device
activate Remote
Note over Converter,Remote: M-Bus
Remote->>Converter: Response from M-Bus Device
Note over Converter,Remote: M-Bus
deactivate Remote
Converter->>Master: Response from M-Bus Device
Note over Master,Converter: Modbus RTU over RS-485
deactivate Converter
deactivate Master
Configuration and registers
Modbus functions
Supported read functions:
- Read Holding Registers (FC=03 —
0x03
)
Supported write functions:
- Preset Multiple Registers (FC=16 —
0x10
)
Note
Above functions apply to configuration registers only.
Data types
Configuration registers use following data types:
u16
- unsigned 16 bit integeru32
- unsigned 32 bit integer
Unlocking configuration registers
Making configuration changes requires unlocking the device.
- To unlock the device write maintenance or administration password to
0x000C
register. - Writing incorrect password to
0x000C
register will change access level to0
(guest).
Reading Enter Password register will return current access level:
Setting | Default value | Unit | Register Address | Type |
---|---|---|---|---|
Enter Password | 0 | enum: 0 - guest 2 - maintenance 4 - administrator |
0x000C | u16 |
Note
Device will automatically return to 0
(guest) access level within 24 hours.
Passwords
Passwords can be changed using following registers:
Setting | Default value | Register Address | Type |
---|---|---|---|
Set maintenance password | 0x0001 | 0x000D | u16 |
Set admin password | Hidden | 0x000E | u16 |
Unit number
Mobus unit number ("address") is by default set to 251
(0xFB
).
Note
Requests sent to this address will not be forwarded to M-Bus port.
Setting | Default value | Register Address | Type |
---|---|---|---|
Unit number (Address) |
251 (0xFB) |
0x0007 | u16 |
Full Modbus Registers Map
Address Hex | Name | Type | Default Value | Description |
---|---|---|---|---|
0x0000 | Status 1 | u16 | ||
0x0001 | Status 2 | u16 | ||
0x0002 | Protocol Version | u16 | ||
0x0003 | Serial Number | u32 | Unique device identifier. | |
0x0005 | Hardware Version | u16 | ||
0x0006 | Firmware Version | u16 | ||
0x0007 | Modbus Unit | u16 | 251 (0xFB) | Modbus "address". |
0x0008 | RS-485 Baudrate | u32 | 9600 | |
0x000A | RS-485 Mode | u16 | 1 | Default = 8N1 |
0x000B | RS-485 Response Delay | u16 | 100 | milliseconds |
0x000C | Enter Password | u16 | 0 | |
0x000D | Set Maintenance Password | u16 | 0x0001 | |
0x000E | Set Admin Password | u16 | Hidden | |
0x000F | Allow Password Reset | u16 | 0 | |
0x0010 | Reserved | u32 | ||
0x001D | Reset Period | u16 | ||
0x001E | Reset Device | u16 | ||
0x001F | Reset Device to Factory | u16 | ||
0x0020 | Uptime | u32 | milliseconds | |
0x0050 | M-Bus Interface Baudrate | u16 | 2400 | |
0x0051 | M-Bus Slaves Quantity | u16 | 0 | Number of found M-Bus slaves. |
0x0052 | M-Bus Block/Unblock Search Slave Mechanism | u16 | 0 | Enabled by default |
0x0053 | M-Bus Cache No Update Time | u32 | ||
0x0055 | M-Bus Max Slaves | u32 | Maximum number of M-Bus slaves. | |
0x0057 | Last Error | u16 | ||
0x0058 | Block Register 1 | u16 | ||
0x0059 | Block Register 2 | u32 | ||
0x005A | Block Register 3 | u16 | ||
0x005B | Block Register 4 | u16 | ||
0x0060 | M-Bus Response Delay | u16 | Delay before responding on M-Bus. | |
0x0061 | M-Bus Command Delay | u16 | Delay between M-Bus commands. | |
0x4000 | Debug Mode | u16 | Enable or disable debug mode. | |
0x6000 | M-Bus Slave Mode | u16 | Mode of operation for M-Bus slaves. | |
... | M-Bus Slave Mode | u16 |
Mode of operation for M-Bus slaves
M-Bus slave mode registers control how M-Bus reads are performed.
Structure
Value (uint16) has following structure: xxxx xxxx uerr ffff
x - not used (FFh)
u - 0 = automatic
1 = set by user (if set it's "locked" and will not be changed by search mechanism)
e - bit which indicate slave existing
1 = slave found
0 = slave does not exist
f - function code
0 = slave does not exist
1 = REQ_UD2 (default)
2 = Ram readout
3 = Debuging Mode
4 = EEPROM readout
5 = Mode for preparing yaml files from UD_2 response
6 = Mode for preparing yaml files from ram readout response
7 = Mode for preparing yaml files from EEPROM readout response
254 = Electric Converter Mode (only one value written (it will no saved) into slave and device switching into mode)
r - reserved for future usage
Example values
0xFF00
- slave does not exist0xFF41
- slave found by automatic search mechanism, usingREQ_UD2
for reading data.
M-Bus Modbus RTU registers map
Request to Modbus addresses pointing to M-Bus slaves use following registers map:
Address Hex | Name | Type |
---|---|---|
0x0000 | Status 1 | u16 |
0x0001 | Status 2 | u16 |
0x0006 | Block register | u16 |
0x0007 | Block register | u32 |
0x0009 | Block register | u16 |
0x000A | Block register | u16 |
0x0050 | Block register | u16 |
0x0051 | Block register | u16 |
0x0052 | Block register | u16 |
0x0053 | Block register | u32 |
0x0055 | Block register | u32 |
0x0057 | Block register | u16 |
0x0058 | M-Bus Slave Unit | u16 |
0x0059 | M-Bus Slave Baudrate | u32 |
0x005A | M-Bus Slave Initialization | u16 |
0x005B | M-Bus Slave Reset | u16 |
0x0060 | M-Bus Response Delay | u16 |
0x0061 | M-Bus Command Delay | u16 |
0x4000 | Debug Mode | u16 |
0x5000 | M-Bus Slave Data Registers Start Address | |
0xFFFF | End of Registers |