# Node-red modbus

**URL:** https://discourse.nodered.org/t/node-red-modbus/6689
**Category:** General
**Created:** [11 January 2019 10:22 UTC](https://discourse.nodered.org/t/node-red-modbus/6689 "2019-01-11T10:22:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![noobPLC](https://avatars.discourse-cdn.com/v4/letter/n/b5e925/32.png) [@noobPLC](https://discourse.nodered.org/u/noobPLC)
#### Post date: [11 January 2019 10:22 UTC](https://discourse.nodered.org/t/node-red-modbus/6689/1 "2019-01-11T10:22:38Z")

</div>

I am trying to turn on a LED using node-red.  
I have attached a LED to a PIN in PLC ( %Q0.0) .  
I have made the configuration in modbus-write node accordingly as shown in screenshots below. but Its not working for some reason.  
any help is appreciated.

with warm regards

This is the flow.  
I have used a trigger node for sending high for 3 seconds.

 ![Screenshot%20from%202019-01-11%2005-19-49](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/3/38a69e19e3d6a409836426cbaec5df7d67fde677.png)

This is the configuration for modbus-write node. ( Address 1 corresponds to %Qx0.0 in my openPLC )  
 ![Screenshot%20from%202019-01-11%2005-19-58](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/91b9eb061775bb2964b2631e57856d2f8c1c388c.png)

---

<div class="post-metadata">

### Author: ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)
#### Post date: [11 January 2019 11:31 UTC](https://discourse.nodered.org/t/node-red-modbus/6689/2 "2019-01-11T11:31:53Z")

</div>

I see that you asked the same question in OpenPLC forum a couple of days ago.

> **[Addressing Scheme in openPLC](https://openplc.discussion.community/post/addressing-scheme-in-openplc-9994150?pid=1307057875)**
>
> I don't know much about nodeRED, but the modbus address you need to use to access QX0.0 is 0, not 0.0. Modbus addresses don't have the dot notation. You can find the modbus address correlation table here: openplcproject.com/scada

Your statement that "Address 1 corresponds to %Qx0.0 in my openPLC" conflicts with the reply you received.

Did you try changing your Modbus address in Node-RED contrib node for testing ?

%Qx0.0 in OpenPLC = Modbus address 0 in modbus contrib node.

Or perhaps trying to use for instnace %Qx0.3 in OpenPLC and Modbus address 3 in modbus contrib node ?

There are many other posts in OpenPLC forum explaining config , using pins in raspberry pi , priority of ladder logic over Modbus, etc...

---

<div class="post-metadata">

### Author: ![noobPLC](https://avatars.discourse-cdn.com/v4/letter/n/b5e925/32.png) [@noobPLC](https://discourse.nodered.org/u/noobPLC)
#### Post date: [11 January 2019 11:54 UTC](https://discourse.nodered.org/t/node-red-modbus/6689/3 "2019-01-11T11:54:25Z")

</div>

Thanks it worked. 😉
