Modbus
Modbus Protocol
Description
The device is used as a gateway between Modbus TCP and Modbus RTU. The serial port configuration for Modbus RTU can be set flexibly.
The Unit ID of the Modbus device to be addressed must be specified by the Modbus client (typically a controller). An automatic scan assigns the Modbus devices to the corresponding serial ports. This assignment is stored in an internal list.
Special features:
Behavior with unavailable devices With unavailable devices, no blocking timeouts are generated, allowing communication with other participants to continue uninterrupted.
Testing connected devices The connected devices can be tested and checked independently via an internal Modbus test, without prior completed Modbus TCP client logic.
Modbus trace log for error analysis A Modbus trace log is provided for error analysis. This records the queries from all Modbus TCP clients. Performance values are also provided.
Support for multi-master queries Queries from multiple Modbus TCP clients can be carried out in parallel. The queries are processed in a queue and assigned to the corresponding Modbus TCP client.
Selection for Modbus protocol
Modbus is always selected as the default setting for a serial port. However, if another protocol was previously selected, the Modbus mode can be selected via the "Fieldbus" drop-down menu.

Modbus Test
A complete Modbus Test Client is implemented on the device. This works even when accessed by another existing Modbus TCP client.

Supported function codes of the Modbus Test
Reading:
FC 1 - Read Coil Status
FC 2 - Read Input Status
FC 3 - Read Holding Register
FC 4 - Read Input Register
Writing:
FC 5 - Write Coil
FC 6 - Write Register
FC 15 - Write Multiple Coil
FC 16 - Write Multiple Register
It should be noted that the Modbus stack supports all Modbus function codes that are available and supported by the connected Modbus RTU devices. However, the Modbus test only supports the most common function codes.
Additional functions
Display for different data types: boolean, byte, sbyte, uint16, int16, uint32, int32, float32, uint64, int64, float64, double, string
Byte Swapping
Little and Big Endian
Modbus Log
The Modbus trace log makes it possible to monitor and analyze Modbus communication data in real time. Filters can be used to display specific data, and the log data can be exported for further analysis.

Activation/deactivation of the Modbus log:
Modbus logging is disabled via the "DISABLE MODBUS LOG"-button.
The timer in the top right indicates the remaining time before logging is automatically disabled.
Filter options: Various filter options are provided for targeted analysis of the log data:
State: Filtering by status (successful/failed).
Unit ID: Restriction by a specific device ID.
Type: Serial or internal register of the Modbus TCP gateway
Serial Port: Assigned serial port
Function Code: Filter by function code
Start Address: The register address
Quantity: The number of registers
The displayed logs are adjusted accordingly based on the selected filters.
Actions:
RESET FILTER: All filter settings are reset.
CLEAR DATA: The displayed log data is cleared from the interface.
EXPORT DATA: The filtered log data is exported in CSV format so it can be processed further externally.
Display of log data
The displayed logs contain the following information:
Timestamp: The timestamp of the Modbus request is displayed.
State: The status of the request is displayed (e.g. ✅ for successful).
Info: Details about the request are provided, including:
Unit ID: The Unit ID
Type: Device type (e.g. T1.B100, H1.M300 or Serial with port assignment).
Request Data:
FC (Function Code): The Modbus command used is displayed.
Address: The start address of the access is specified.
Quantity: The number of registers read is displayed.
Response Data:
Read Value: The values returned by the target device are displayed (RTU).
Processing Time: The duration of the request processing is specified in milliseconds.
Internal register
The H1.M300 has an internal Modbus TCP Unit ID. This Unit ID is 248
Difference to the T1.B100: The H1.M300 does not have internal power supply monitoring or additional system temperature sensors. The registers for current/voltage/power (1150-1156), the associated fault registers (1160-1166), the system temperatures (1073-1075), and the register for Port 5 (2025) are not available on the H1.M300 not available.
A read access to unsupported registers is Exception Code 02 (Illegal Data Address) responded to.
FC3 / FC4
1000
20
Hostname
string
1020
20
Box Name
string
1040
20
Box Comment
string
1060
1
CPU utilization
UINT16 (0,1)
1061
1
RAM utilization
UINT16 (0,1)
1062
6
System time
UINT16
1068
4
Uptime
UINT16
1072
1
CPU temperature
UINT16 (0,1)
1080
20
Serial number
string
1100
20
System ID1
string
1120
20
System ID2
string
2021
1
Bus Port 1 configuration
UINT16
2022
1
Bus Port 2 configuration
UINT16
2023
1
Bus Port 3 configuration
UINT16
2024
1
Bus Port 4 configuration
UINT16
3000
20
Ethernet Adapter
string
3020
20
Link
string
3040
20
Mode
string
3060
20
MAC
string
3080
1
Link
UINT16
3081
1
Network mode (number)
UINT16
3090
6
MAC
string
3100
4
IP address
UINT16
3104
4
Subnet mask
UINT16
3108
4
Gateway IP
UINT16
3112
4
DNS1 IP
UINT16
3116
4
DNS2 IP
UINT16
3120
4
Broadcast IP
UINT16
3130
10
IP Address
string
3140
10
Subnet mask
string
3150
10
Gateway IP
string
3160
10
DNS1 IP
string
3170
10
DNS2 IP
string
3180
10
Broadcast IP
string
Example - Query IP Address

Modbus Exception Codes
Code
Name
Description
01
Illegal Function
The function code is not supported by the slave.
02
Illegal Data Address
The requested address is invalid. The length may be incorrect, or it may be an invalid register address.
03
Illegal Data Value
A value in the request data field is invalid. The structure of the request is faulty, e.g. incorrect length or impermissible values.
04
Slave Device Failure
An unrecoverable error occurred during processing.
05
Acknowledge
The request was accepted, but processing takes longer. The master should request again later to see whether processing is complete.
06
Slave Device Busy
The device is currently busy and cannot execute the request. The master should retry the request later.
07
Negative Acknowledge
The device cannot execute the request, e.g. for faulty programming requests.
08
Memory Parity Error
A consistency error was detected in memory. The device can retry the request, but service may be required.
10 (0A)
Gateway Path Unavailable
This error usually occurs when the TCP query to the gateway is successful, but the device cannot be assigned.
11 (0B)
Gateway Target Device Failed to Respond
This error code occurs when the device has already been assigned, but no longer responds.
Last updated

