# How to read data from gateway connected to MODBUS device using nodered

**URL:** <https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474>\
**Category:** General\
**Created:** [19 August 2019 07:50 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474 "2019-08-19T07:50:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![VIKRAMAS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikramas/32/3955_2.png) [@VIKRAMAS](https://discourse.nodered.org/u/VIKRAMAS)\
**Post date:** [19 August 2019 07:50 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/1 "2019-08-19T07:50:55Z")

</div>

I am having a dell edge 5000 gateway, how can I read the data from gateway which is connected with a modbus device(Connected with RS485 port ).  
I am new to modbus protocol so, I'm not getting how to integrate with noce-red. Below is the snap of dell gateway 5000 connected to RS485 port.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/3/3e84813fa4ad2917e146d5a392edc35cf6ccb72e.jpeg)  
Below is the snapshot of node-red modbus node, how to fill the configurations.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/ede001fdf2c11bd91f55f5cfa8fb7dbd27d9fd58.jpeg)

---

<div class="post-metadata">

**Author:** ![iungo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iungo/32/8099_2.png) [@iungo](https://discourse.nodered.org/u/iungo)\
**Post date:** [19 August 2019 13:01 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/2 "2019-08-19T13:01:59Z")

</div>

Basically, to read data you will need to fill:

unit-id (1-247 range, you will need to know your edge5000 id)  
FC (which type of register you want to read)  
Address (register start address)  
Quantity (how many registers you want to read, start from start address)  
Poll rate (interval between readings)

Also, you will need to configure connection:  
baud rate,  
stop bits,  
parity  
(Server tab).

---

<div class="post-metadata">

**Author:** ![petrdolejs](https://avatars.discourse-cdn.com/v4/letter/p/eada6e/32.png) [@petrdolejs](https://discourse.nodered.org/u/petrdolejs)\
**Post date:** [19 August 2019 13:09 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/3 "2019-08-19T13:09:42Z")

</div>

Hello, do you have some experience with modbus flex getter (node-red-contrib-modbus) ?  
When I fill everything correctly(I hope), it just show me two errors. But when I use Modbus serial node (node-red-contrib-serial-modbus) it works fine. Do you have some ideas what should be wrong?

---

<div class="post-metadata">

**Author:** ![VIKRAMAS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikramas/32/3955_2.png) [@VIKRAMAS](https://discourse.nodered.org/u/VIKRAMAS)\
**Post date:** [19 August 2019 14:15 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/5 "2019-08-19T14:15:43Z")

</div>

unit-id of modbus device id I have to fill right?? as it is having slave id. Master is the dell gateway right??

---

<div class="post-metadata">

**Author:** ![iungo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iungo/32/8099_2.png) [@iungo](https://discourse.nodered.org/u/iungo)\
**Post date:** [19 August 2019 14:35 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/6 "2019-08-19T14:35:41Z")

</div>

I don't think node red Modbus node can work as slave. The device where node-red installed is modbus master. In modbus grid you can use only one master, because of topology.

It will be better to understand, which modbus devices you use, and how you connect it.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 August 2019 14:48 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/7 "2019-08-19T14:48:44Z")

</div>

> [@VIKRAMAS](#):
>
> dell edge 5000 gateway

Are you planning to run node-red in the gateway?

---

<div class="post-metadata">

**Author:** ![VIKRAMAS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikramas/32/3955_2.png) [@VIKRAMAS](https://discourse.nodered.org/u/VIKRAMAS)\
**Post date:** [20 August 2019 07:32 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/8 "2019-08-20T07:32:17Z")

</div>

The device which I am using as a MODBUS device is [https://www.alibaba.com/product-detail/Parking-Lot-Tenet-TUS-202-Ultrasonic\_60504372178.html](https://www.alibaba.com/product-detail/Parking-Lot-Tenet-TUS-202-Ultrasonic_60504372178.html).

This device is connected to dell gateway 5000 series. So I am planning to use the node-red in gateway to read data from modbus device(Parking sensor TUS-202-Ultrasonic). How can I read the data from modbus device whether node-red which is running in the gateway should work as master right.

---

<div class="post-metadata">

**Author:** ![VIKRAMAS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikramas/32/3955_2.png) [@VIKRAMAS](https://discourse.nodered.org/u/VIKRAMAS)\
**Post date:** [20 August 2019 07:34 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/9 "2019-08-20T07:34:16Z")

</div>

Yeah I am planning to run node-red in gateway.

---

<div class="post-metadata">

**Author:** ![iungo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iungo/32/8099_2.png) [@iungo](https://discourse.nodered.org/u/iungo)\
**Post date:** [20 August 2019 07:40 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/10 "2019-08-20T07:40:43Z")

</div>

Are you shure your sensor use Modbus protocol for communication? I dont find any info about it in the description.

I think it's not modbus device.

---

<div class="post-metadata">

**Author:** ![VIKRAMAS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikramas/32/3955_2.png) [@VIKRAMAS](https://discourse.nodered.org/u/VIKRAMAS)\
**Post date:** [20 August 2019 07:51 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/11 "2019-08-20T07:51:30Z")

</div>

This is the specification document but they have not mentioned MODBUS. They have mentioned as it will communicate through RS485.

 ![Sensor%20Specifications_page-0001](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/f6298b36a35eb1867cea97ff707a41b4b80f72a7.jpeg) ![Sensor%20Specifications_page-0002](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/dd8ba83d0a3b4ccdd9c0b8357bac947f2192b994.jpeg)

---

<div class="post-metadata">

**Author:** ![iungo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iungo/32/8099_2.png) [@iungo](https://discourse.nodered.org/u/iungo)\
**Post date:** [20 August 2019 07:59 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/12 "2019-08-20T07:59:44Z")

</div>

It's absolutely another thing. RS485 is only PHY.

You can try to read those sensors thru the serial request node.

---

<div class="post-metadata">

**Author:** ![Iliyas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iliyas/32/19045_2.png) [@Iliyas](https://discourse.nodered.org/u/Iliyas)\
**Post date:** [20 August 2019 08:08 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/13 "2019-08-20T08:08:46Z")

</div>

How to configure serial request can u briefly explain me?

---

<div class="post-metadata">

**Author:** ![iungo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iungo/32/8099_2.png) [@iungo](https://discourse.nodered.org/u/iungo)\
**Post date:** [20 August 2019 08:23 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/14 "2019-08-20T08:23:29Z")

</div>

Just add Serial request node, configure communication parameters and connect device you need to the serial port. Than send request to the input, and after timeout you will receive an answer from the device on the node output.

---

<div class="post-metadata">

**Author:** ![Iliyas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iliyas/32/19045_2.png) [@Iliyas](https://discourse.nodered.org/u/Iliyas)\
**Post date:** [20 August 2019 08:46 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/15 "2019-08-20T08:46:10Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/5c4314a92a34c726b8c99454d662dcf2aff84321.jpeg)

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [20 August 2019 08:50 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/16 "2019-08-20T08:50:10Z")

</div>

Are you working with @VIKRAMAS or is yours a different issue?

---

<div class="post-metadata">

**Author:** ![Iliyas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iliyas/32/19045_2.png) [@Iliyas](https://discourse.nodered.org/u/Iliyas)\
**Post date:** [20 August 2019 08:51 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/17 "2019-08-20T08:51:06Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/fed230d281806691ca32c24b035340d099fe4000.jpeg)

---

<div class="post-metadata">

**Author:** ![Iliyas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iliyas/32/19045_2.png) [@Iliyas](https://discourse.nodered.org/u/Iliyas)\
**Post date:** [20 August 2019 08:51 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/18 "2019-08-20T08:51:38Z")

</div>

I am working with vikram

---

<div class="post-metadata">

**Author:** ![Iliyas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iliyas/32/19045_2.png) [@Iliyas](https://discourse.nodered.org/u/Iliyas)\
**Post date:** [20 August 2019 08:53 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/19 "2019-08-20T08:53:04Z")

</div>

How to convert this data into normal readable form??I have attached the photo above of the data reading....How to convert it can u give me solution?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [20 August 2019 08:57 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/20 "2019-08-20T08:57:18Z")

</div>

The first step would be to send it a query (as stated in page 2 of the docs you posted) rather than a timestamp.

---

<div class="post-metadata">

**Author:** ![Iliyas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iliyas/32/19045_2.png) [@Iliyas](https://discourse.nodered.org/u/Iliyas)\
**Post date:** [20 August 2019 09:41 UTC](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474/21 "2019-08-20T09:41:14Z")

</div>

In inject I have to select string and what else I have to give?

[Next page](https://discourse.nodered.org/t/how-to-read-data-from-gateway-connected-to-modbus-device-using-nodered/14474.md?page=2)
