# How to get data from Modbus-TCP device?

**URL:** <https://discourse.nodered.org/t/how-to-get-data-from-modbus-tcp-device/88651>\
**Category:** General\
**Tags:** modbus\
**Created:** [13 June 2024 06:17 UTC](https://discourse.nodered.org/t/how-to-get-data-from-modbus-tcp-device/88651 "2024-06-13T06:17:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattbue](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@mattbue](https://discourse.nodered.org/u/mattbue)\
**Post date:** [13 June 2024 06:17 UTC](https://discourse.nodered.org/t/how-to-get-data-from-modbus-tcp-device/88651/1 "2024-06-13T06:17:20Z")

</div>

Hi  
I'm new to Node-RED and I'm trying to get data from a Modbus-TCP device.

This Modbus-TCP device is a Janitza UMG 509 energy meter. It is directly connected to the network.  
I tried to use the 'Modbus-Read' node of node-red-contrib-modbus (5.31.0).

So I created a server with the following data:

- Type: TCP
- Host: IP of the device
- Port: 502
- TCP Type: DEFAULT
- Unit-Id: 0
- Timeout (ms): 1000

On the settings itself I tried the following data:

- Unit-Id: 0
- FC: FC3: Read Holding Registers
- Address: 19000
- Quantity: 2
- Poll Rate: 5 seconds
- Server: the server I have describe above

From the node I get the following debug message:

```auto
msg : error
"Error: Modbus exception 4: Slave device failure (device reports internal error)"

```

This Janitza device acts also as TCP-RS485-gateway. On the RS485 bus other Janitza devices are connected. Every of these devices has its own unit id. Reading data from these devices is working.  
Based on that I can say that the general server and network configuration is fine.

Can someone help me?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 September 2024 06:17 UTC](https://discourse.nodered.org/t/how-to-get-data-from-modbus-tcp-device/88651/2 "2024-09-11T06:17:29Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
