Skip to content
JelinaJelina DocumentationTechnical documentation
Back to website

Acquire Modbus Slave data over Modbus TCP

Simulate a Modbus TCP slave with Modbus Slave. Acquire its data using Modbus Client (Master), process it, and display results in real time.

  • Simulator

Modbus Slave simulates slave devices, receiving master command packets and returning data packets.

Connection and point settings:

key name
Protocol (Connection) Modbus TCP/IP
IP address 0.0.0.0
Port 502
Slave ID 1
Register type Holding Registers
Data type Unsigned
  • Device

    RSB-3720

  • Plugins

    Modbus Client (Master), Data Processing, and MQTT Upload

(1) Simulate three points in Modbus Slave.

- Protocol: Modbus TCP.
- Register type: Holding Register.
- Data type: uint16.
- Byte order: big-endian (AB).
- Point addresses: 0, 1, and 2.

(2) Acquire three Modbus points over TCP as X, Y, and Z, using formulas {X}/10, {Y}**3, and {Z}*3.1412, respectively.

(3) The resulting connection scheme is:

Example data flow

(1) Configure Modbus Slave.

Modbus Slave simulator

1). Select Modbus Slave → File → New to create an Mbslave.

  • No Connection: no connected device.
  • ID=1: slave ID 1, configurable.
  • F=3: Function 03 Holding Registers (4x), matching the acquisition plugin’s register type.
  • Numbers 0–7 on the left are data addresses.

New simulated slave

2). Select Connection → Connect…, enter parameters, and select OK.

  • Connection: Modbus TCP/IP.
  • IP Address: simulated device IP, default 0.0.0.0. In the acquisition plugin, use the actual IP of the PC running the simulator.
  • Port: simulated device port, default 502.

TCP connection settings

3). Select SetUp → Slave Definition…, enter parameters, and select OK.

  • Slave ID: slave address ID, default 1.
  • Function: 03 Holding Register (4x).
  • Address: 0.
  • Quantity: 3 registers.

Slave register definition

4). Select the three points, then Display → Unsigned.

Unsigned data display

5). Double-click the first row, enter value 88, and select OK.

Set the first point

6). Set the second and third points to 12 and 35.

Three simulated values

(2) Configure acquisition in Modbus Client (Master).

1). Connection settings. Scheme name is required.

Match the simulator parameters:

  • Scheme name: Slave acquisition
  • Protocol: Modbus TCP
  • Synchronous acquisition: Yes
  • Acquisition interval (ms): 1000
  • Timeout: 500
  • Data freshness (ms): 500

TCP acquisition connection settings

2). Add a group.

Select Add group, enter these values, and select Finish:

  • Group name: Group 1
  • Slave ID: 1
  • IP: 172.21.78.157
  • Port: 502

Note: IP, port, and Slave ID must match the simulator; the IP is the address of the computer running it.

TCP acquisition group

3). Add points.

Select Add data, enter these values, and confirm:

  • Data alias: X
  • Address: 0
  • Register type: Holding Registers
  • Data type: uint16
  • Register count: 1
  • Byte order: AB
  • Read/write mode: r
  • Calculation: {X}/10

TCP point configuration Configured TCP points

(1) Select Deploy under Device Connectivity and wait for success.

Deploy the acquisition flow

(2) Switch to Digital Twin, hover over Modbus Client (Master), select Slave acquisition, and view acquired real-time data.

TCP acquisition scheme Raw TCP values

(3) Hover over Data Processing, select Slave acquisition, and view processed real-time data.

TCP processing scheme Processed TCP values