# Node-Red Modbus RTU

**URL:** <https://discourse.nodered.org/t/node-red-modbus-rtu/23453>\
**Category:** General\
**Created:** [22 March 2020 12:52 UTC](https://discourse.nodered.org/t/node-red-modbus-rtu/23453 "2020-03-22T12:52:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kareemwaheed94](https://avatars.discourse-cdn.com/v4/letter/k/898d66/32.png) [@kareemwaheed94](https://discourse.nodered.org/u/kareemwaheed94)\
**Post date:** [22 March 2020 12:52 UTC](https://discourse.nodered.org/t/node-red-modbus-rtu/23453/1 "2020-03-22T12:52:08Z")

</div>

Hi,

I have gateway with node-red installed  
and i need to make a flow that should send a HEX data frame to a sensor via RS485  
this is the frame i should send to the sensor,

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/e/3ea298c9227088a7fec8462fa8ef7a47ccec5b38.png)

and i should receive

 ![Capture1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/86c1513aa053feaf09081de4c300563c8b6119f3.png)

this is my first node-red project , so how to accomplish this

Thank you

---

<div class="post-metadata">

**Author:** ![mtoko](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mtoko/32/138_2.png) [@mtoko](https://discourse.nodered.org/u/mtoko)\
**Post date:** [22 March 2020 13:59 UTC](https://discourse.nodered.org/t/node-red-modbus-rtu/23453/2 "2020-03-22T13:59:47Z")

</div>

Hi

What hardware have you installed Node Red?  
Have a look at this node

> **[node-red-contrib-modbus](https://flows.nodered.org/node/node-red-contrib-modbus)**
>
> The all in one Modbus TCP and Serial contribution package for Node-RED.

---

<div class="post-metadata">

**Author:** ![kareemwaheed94](https://avatars.discourse-cdn.com/v4/letter/k/898d66/32.png) [@kareemwaheed94](https://discourse.nodered.org/u/kareemwaheed94)\
**Post date:** [22 March 2020 14:11 UTC](https://discourse.nodered.org/t/node-red-modbus-rtu/23453/3 "2020-03-22T14:11:45Z")

</div>

> [@mtoko](#):
>
> Have a look at this node

it's an IoT gateway that support node-red with RS485 ports built in

---

<div class="post-metadata">

**Author:** ![mtoko](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mtoko/32/138_2.png) [@mtoko](https://discourse.nodered.org/u/mtoko)\
**Post date:** [22 March 2020 14:48 UTC](https://discourse.nodered.org/t/node-red-modbus-rtu/23453/4 "2020-03-22T14:48:05Z")

</div>

If the gateway has RS485 ports then you should(?) be able to identify the ports using the modbus node I suggested. I think it would be difficult to configure the communications using a serial node.on your first project. Use a Modbus-Read node with Function Code 3 to read from your sensor. You will need to know serial communication settings for your sensor (Baud rate, stop bits etc)

---

<div class="post-metadata">

**Author:** ![rromele](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rromele/32/18431_2.png) [@rromele](https://discourse.nodered.org/u/rromele)\
**Post date:** [23 March 2020 16:46 UTC](https://discourse.nodered.org/t/node-red-modbus-rtu/23453/5 "2020-03-23T16:46:24Z")

</div>

Hi,  
To write you can start taking inspiration from the attached code, clearly you have to adjust the configurations of your serial port and be sure of the hardware wiring (A-B).

Are you sure that to query the tool you only have to send the CRC?

To simplify your work, also try to see if it is possible to configure your instrument for the continuous sending of the data string without having to request it via message.

[23032020.json](https://discourse.nodered.org/uploads/short-url/qN9VLWuWTNBHquov5UIngB1Hna0.json) (1.4 KB)

---

<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:** [22 May 2020 16:46 UTC](https://discourse.nodered.org/t/node-red-modbus-rtu/23453/6 "2020-05-22T16:46:27Z")

</div>

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