# Modbus node output data not as expected

**URL:** <https://discourse.nodered.org/t/modbus-node-output-data-not-as-expected/59353>\
**Category:** Industrial\
**Created:** [4 March 2022 11:27 UTC](https://discourse.nodered.org/t/modbus-node-output-data-not-as-expected/59353 "2022-03-04T11:27:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![naveenpnk6](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/naveenpnk6/32/57842_2.png) [@naveenpnk6](https://discourse.nodered.org/u/naveenpnk6)\
**Post date:** [4 March 2022 11:27 UTC](https://discourse.nodered.org/t/modbus-node-output-data-not-as-expected/59353/1 "2022-03-04T11:27:49Z")

</div>

Hello Guys, This my first experience with Node red. My project aim is to collect data from Schneider PLC using Modbus node. Whenever I connect my plc with Node red, Only I got wrong data from modbus. Like if my plc data is 52 modbus output is 43445 in array.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [4 March 2022 11:43 UTC](https://discourse.nodered.org/t/modbus-node-output-data-not-as-expected/59353/2 "2022-03-04T11:43:26Z")

</div>

What data are you expecting?

What is the PLC data type you are requesting?

* * *

NOTE: Modbus is a 16 bit Integer based protocol. The answer will likely be to use the `buffer` it outputs and do byte conversions. There is a helper node build for this: node-red-contrib-buffer-parser

Here are some examples of use: [Search results for 'modbus node-red-contrib-buffer-parser' - Node-RED Forum](https://discourse.nodered.org/search?q=modbus%20node-red-contrib-buffer-parser)

---

<div class="post-metadata">

**Author:** ![naveenpnk6](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/naveenpnk6/32/57842_2.png) [@naveenpnk6](https://discourse.nodered.org/u/naveenpnk6)\
**Post date:** [4 March 2022 12:09 UTC](https://discourse.nodered.org/t/modbus-node-output-data-not-as-expected/59353/3 "2022-03-04T12:09:15Z")

</div>

I need to collect data from LVDT.  
PLC data type is real.

I don't know how to do a byte conversion.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [4 March 2022 12:12 UTC](https://discourse.nodered.org/t/modbus-node-output-data-not-as-expected/59353/4 "2022-03-04T12:12:46Z")

</div>

That does not answer the questions I asked...

> [@Steve-Mcl](#):
>
> What data are you expecting?
> 
> What is the PLC data type you are requesting?

  

Did you review the search results?

Have you installed `node-red-contrib-buffer-parser`

Have you tried anything?

  

Also, there are built in demos in the `node-red-contrib-buffer-parser` (Use CTRL+I \> examples \> node-red-contrib-buffer-parser) to import them

Also, the [node-red-contrib-buffer-parser README](https://flows.nodered.org/node/node-red-contrib-buffer-parser) has good details

Lastly, the built in help for node-red-contrib-buffer-parser is quite extensive.

---

<div class="post-metadata">

**Author:** ![naveenpnk6](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/naveenpnk6/32/57842_2.png) [@naveenpnk6](https://discourse.nodered.org/u/naveenpnk6)\
**Post date:** [4 March 2022 13:37 UTC](https://discourse.nodered.org/t/modbus-node-output-data-not-as-expected/59353/5 "2022-03-04T13:37:00Z")

</div>

Thank you Steve. Now I can read data from PLC using that buffer parser node... 🙂

---

<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:** [3 May 2022 13:37 UTC](https://discourse.nodered.org/t/modbus-node-output-data-not-as-expected/59353/6 "2022-05-03T13:37:58Z")

</div>

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