# Modbus-tcp object convert to readable value

**URL:** https://discourse.nodered.org/t/modbus-tcp-object-convert-to-readable-value/57436
**Category:** Industrial
**Created:** [29 January 2022 03:26 UTC](https://discourse.nodered.org/t/modbus-tcp-object-convert-to-readable-value/57436 "2022-01-29T03:26:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![VinistoisR](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vinistoisr/32/5778_2.png) [@VinistoisR](https://discourse.nodered.org/u/VinistoisR)
#### Post date: [29 January 2022 03:26 UTC](https://discourse.nodered.org/t/modbus-tcp-object-convert-to-readable-value/57436/1 "2022-01-29T03:26:46Z")

</div>

Hey all,

I am using modbus-tcp and am getting a register that looks like this:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/2/023b968f6ac11b560b6402590d632ea8b103b8ce.png)

this represents a number that should look roughly like 122.xxx My documentation says it's a 32 bit float.

I'm using the buffer-parser node to try to do this, as it is working for some string data that comes out of the same modbus slave, but I can't seem to find settings that give me a reasonable result.

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

I'd like to get out a json object like { van: "122.435" }

Thank you!

---

<div class="post-metadata">

### Author: ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)
#### Post date: [29 January 2022 03:55 UTC](https://discourse.nodered.org/t/modbus-tcp-object-convert-to-readable-value/57436/2 "2022-01-29T03:55:31Z")

</div>

Hello ..

I notice that you have the Buffer parser node connected to the top output of the Modbus node.  
The buffer data, in this case, should be in `msg.responseBuffer.buffer`  
( the structure of messages for the two outputs in different )  
So set your Buffer-parser node to read it from the correct path.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/a/0accf6510afbd552e92071a26f8027c93d4f0f81.png)

Also since its a 32bit Float set the Type to be float(be) instead of int16

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

---

<div class="post-metadata">

### Author: ![VinistoisR](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vinistoisr/32/5778_2.png) [@VinistoisR](https://discourse.nodered.org/u/VinistoisR)
#### Post date: [29 January 2022 05:33 UTC](https://discourse.nodered.org/t/modbus-tcp-object-convert-to-readable-value/57436/3 "2022-01-29T05:33:00Z")

</div>

Ok so I sorted out what I was doing wrong thanks to this video

[Modbus RTU TCP/IP on Node-Red (16bit, 32bit and floating data) - YouTube](https://www.youtube.com/watch?v=uillyhwBoEU)

this is all that was required:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/3/93670042b10e053a84c869b4622886830ea201b6.png)

---

<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: [30 March 2022 05:33 UTC](https://discourse.nodered.org/t/modbus-tcp-object-convert-to-readable-value/57436/4 "2022-03-30T05:33:32Z")

</div>

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