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
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 powerIO-Box T1.B100 has an internal Modbus TCP Unit ID. This Unit ID is 248
Attention: From firmware version v4.0 the Unit ID was changed to 248 changed. In earlier firmware versions (before v4.0), the Unit ID was 240.
This change was made because Unit ID 240 is a valid Serial Unit ID. The value range for Serial Unit IDs is between 1 and 247.
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)
1073
1
Temperature System 1
UINT16 (0,1)
1074
1
Temperature System 2 5V
UINT16 (0,1)
1075
1
Temperature System 3 Compute Module
UINT16 (0,1)
1080
20
Serial number
string
1100
20
System ID1
string
1120
20
System ID2
string
1150
1
Current 24V power supply
UINT16 (0.01)
1151
1
Voltage 24V power supply
UINT16 (0.01)
1152
1
Power 24V power supply
UINT16 (0.01)
1153
1
Voltage 5V power supply
UINT16 (0.01)
1154
1
Voltage 3.3V power supply
UINT16 (0.01)
1155
1
Voltage 3.3V Compute Module
UINT16 (0.01)
1156
1
Voltage 1.8V Compute Module
UINT16 (0.01)
1160
1
Fault current 24V power supply
UINT16
1161
1
Fault voltage 24V power supply
UINT16
1162
1
Fault power 24V power supply
UINT16
1163
1
Fault voltage 5V power supply
UINT16
1164
1
Fault voltage 3.3V power supply
UINT16
1165
1
Fault voltage 3.3V Compute Module
UINT16
1166
1
Fault voltage 1.8V Compute Module
UINT16
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
2025
1
Bus Port 5 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

