# Modbus TCP using Node-Red

**URL:** <https://discourse.nodered.org/t/modbus-tcp-using-node-red/46354>\
**Category:** General\
**Created:** [27 May 2021 15:55 UTC](https://discourse.nodered.org/t/modbus-tcp-using-node-red/46354 "2021-05-27T15:55:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dpatel2016](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dpatel2016/32/33730_2.png) [@dpatel2016](https://discourse.nodered.org/u/dpatel2016)\
**Post date:** [27 May 2021 15:55 UTC](https://discourse.nodered.org/t/modbus-tcp-using-node-red/46354/1 "2021-05-27T15:55:42Z")

</div>

Hi,  
I have a machine that talks Modbus TCP and I want to communicate to it using node-red on raspberry pi.  
Is it possible to do what is shown in the picture? The register address is 40001. I have modbus TCP node installed, but mot sure how to include the bits in it to control the following.

 ![Word](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/f/ff1d60b768ec24de0686ca09eedcb135f622d297.png)

---

<div class="post-metadata">

**Author:** ![Ranki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ranki/32/41282_2.png) [@Ranki](https://discourse.nodered.org/u/Ranki)\
**Post date:** [27 May 2021 17:30 UTC](https://discourse.nodered.org/t/modbus-tcp-using-node-red/46354/2 "2021-05-27T17:30:28Z")

</div>

Hello @dpatel2016 ,

Which node do you have installed? There are a lot of them dealing with modbus:  
[https://flows.nodered.org/search?term=modbus&type=node](https://flows.nodered.org/search?term=modbus&type=node)

I implemented also some readings with modbus. I started also with a modbus-tcp node, but was not able to get it running. Then I changed to this node [node-red-contrib-modbus](https://flows.nodered.org/node/node-red-contrib-modbus) and now it's working (But currently I do only readings).

Did you check already the documentation of the node you are using? I found quite often also some example flows to see how it is working.

Cheers  
Ranki

---

<div class="post-metadata">

**Author:** ![dpatel2016](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dpatel2016/32/33730_2.png) [@dpatel2016](https://discourse.nodered.org/u/dpatel2016)\
**Post date:** [28 May 2021 15:46 UTC](https://discourse.nodered.org/t/modbus-tcp-using-node-red/46354/3 "2021-05-28T15:46:16Z")

</div>

Hi @Ranki,  
I am using the node-red-contrib-modbus, but I am not sure how to include the bits with the addresses in this module.

---

<div class="post-metadata">

**Author:** ![Ranki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ranki/32/41282_2.png) [@Ranki](https://discourse.nodered.org/u/Ranki)\
**Post date:** [28 May 2021 16:00 UTC](https://discourse.nodered.org/t/modbus-tcp-using-node-red/46354/4 "2021-05-28T16:00:02Z")

</div>

Hello @dpatel2016 ,

it would help, if you show your configuration. I will post mine; maybe this helps you:

 ![2021-05-28 17_57_31-Node-RED](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/9/f9470697f6f0dff948db4428d65ff29360acf195.png)

Cheers  
Ranki

---

<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:** [27 July 2021 16:00 UTC](https://discourse.nodered.org/t/modbus-tcp-using-node-red/46354/5 "2021-07-27T16:00:48Z")

</div>

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