Modbus/TCP
This page describes the Modbus TCP/IP slave interface on the Smappee Genius Flex platform. The interface allows a Modbus master to read and control Smappee products over the local network.
Detailed register tables are documented on the dedicated subpages.
Master vs. slave
Modbus distinguishes between master and slave roles. Over TCP/IP these are also referred to as client and server respectively.
This implementation provides the slave (server) role: the Genius Flex platform serves an external Modbus master that initiates the connection and sends read or write requests.
The Modbus master must connect to the IP address of the wired Ethernet interface of the Genius Flex platform. Keep in mind ModbusTCP is unencrypted.
The server is started by installing the ModbusTCP app. This app will act as a bridge between the data available on the Genius Flex. Each device is mapped to a Modbus slave address during the installation of the app (see Configuration below).
Registers are updated every 5 seconds by default. For EMS control the update rate can be lowered to 2 seconds on request via the helpdesk.
Configuration
Navigate to the Smappee Store in the mobile application:
Make sure you have a Genius Flex activated on your location
Go to Control → Smappee Store
Tap “Manage”
Find the “Modbus/TCP” app
Tap “Install Integration”
Setting | Description |
|---|---|
Port | The TCP port is shown in the Activity view of the Modbus TCP app once it is installed. |
Slave address mapping | The list of available devices can be configured and viewed in the Configuration view of the app. Every entry in the list represents a slaveID/unitID. So the first in the list is slaveID 1, the second 2, etc… |
Supported Modbus function codes
Code | Function |
|---|---|
| Read Holding Registers |
| Write Single Register |
| Write Multiple Registers |
Reading registers
The Modbus slave supports reading of holding registers using function code 0x03. Multiple registers can be requested in a single Modbus request as long as they are contiguous.
Reserved or unavailable registers are filled with 0, encoded as
0x0000for a 16-bit register.String registers contain ASCII strings, two 8-bit characters per 16-bit register, with a trailing zero.
Reads are performed in network byte order (=Big endian)
Example: reading a float (=32bits, 2 registers) at start register 10
The first register (addr 10) contains the 16 most significant bits of the float (bytes AB)
The first register (addr 11) contains the 16 least significant bits of the float (bytes CD)
To form the float arrange the bytes as such: ABCD
Writing registers
The Modbus slave supports writing of holding registers.
When a value spans multiple Modbus registers (for example a 32-bit float occupying two consecutive 16-bit registers), all registers must be written in a single Modbus request. If only part of the value is written, the request is denied.
Writes are performed in network byte order (=Big endian).
Modbus/TCP - EV Line
Modbus/TCP - EV line - Smappee API - Confluence