# Modbustcp-read Function Script

**URL:** https://discourse.nodered.org/t/modbustcp-read-function-script/71034
**Category:** General
**Tags:** function-node
**Created:** [22 November 2022 08:00 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034 "2022-11-22T08:00:48Z")
**Posts on this page:** 6
**Page:** 5

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [28 November 2022 10:51 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/81 "2022-11-28T10:51:24Z")

</div>

> [@Steve-Mcl](#):
>
> `*1` Provide "Copy Value" data from modbus  
> `**2` Provide REAL values from the Pool Meter - written down at the exact moment that `*1` was done

I gave you this information.

---

<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: [28 November 2022 13:07 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/82 "2022-11-28T13:07:20Z")

</div>

> [@Cupra85](#):
>
> I gave you this information

What you provided was a screenshot with some numbers on saying `setpoint ?.??`. Which exact registers were these? What was the exact values of registers 100, 115,145, 175 at the moment you captured the CopyValue data?

Sorry, but I have spent enough time guessing and would prefer to spend my time other ways. _(You do realise I do this in my spare time, for free right?)_

If you want further help, then the least you can do is provide the information I need in the format I requested.

> [@Steve-Mcl](#):
>
> ### You need to provide something like ...
> 
> ## Snapshot of data taken at 15:22:37 `<insert time>`
> 
> ```auto
> *1 [the captured data "Copy Value" output of top + bottom]
> 
> ```
> 
> ## Actual values on the device when above snapshot was taken at 15:22:37 `<insert same time>`
> 
> | Item | Register | Value on the pool meter when the snapshot was taken |
> | --- | --- | --- |
> | Chlor Measure Value | 100 | 0.512 `**2` |
> | Chlor Setpoint | 111 | 0.500 `**2` |
> | pH Measure Value | 115 | 6.8 `**2` |
> | pH Setpoint | 126 | 7.2 `**2` |
> | Total chlorine Measure Value | 145 | 0.999 `**2` |
> | Total chlorine Setpoint | 156 | 0.789 `**2` |
> | Temperature Measure Value | 175 | 21.2 `**2` |
> | Temperature Lower range | 182 | 19.5 `**2` |
> | Temperature Upper range | 184 | 24.5 `**2` |
> 
> `*1` Provide "Copy Value" data from modbus  
> `**2` Provide REAL values from the Pool Meter - written down at the exact moment that `*1` was done

---

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [28 November 2022 16:01 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/83 "2022-11-28T16:01:49Z")

</div>

> [@Cupra85](#):
>
> ![Unbenannt-2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/7/d7faeb284e0059a1dd93d8bb512141604952efeb.jpeg)
> 
> ```auto
> {"topic":"read","messageId":"63826cfb1445cdc448be33d3","payload":{"data":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"buffer":[61,35,103,109,108,47,0,0,0,0,0,0,0,0,0,0,0,0,63,128,51,51,63,51,0,0,0,0,245,195,64,216,72,112,0,0,0,0,0,0,0,0,0,0,64,128,0,0,65,16,51,51,64,227,0,0,0,0,64,0,68,91,86,109,0,0,0,0,0,0,0,0,0,0,67,200,0,0,68,97,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,0,70,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,0,70,28,0,0,0,0,0,0,0,0,153,154,64,233,67,176]},"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1,"modbusRequest":{"value":"true","unitid":"1","fc":3,"address":"100","quantity":"77","messageId":"63826cfb1445cdc448be33d3"},"values":[15651,26477,27695,0,0,0,0,0,0,16256,13107,16179,0,0,62915,16600,18544,0,0,0,0,0,16512,0,16656,13107,16611,0,0,16384,17499,22125,0,0,0,0,0,17352,0,17505,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,0,0,0,0,0,0,0,0,0,15360,17948,0,0,0,0,39322,16617,17328],"_msgid":"f8fc404e.664e4"}
> 
> ```
> 
> ```auto
> {"topic":"read","messageId":"63826cfb1445cdc448be33d3","payload":[15651,26477,27695,0,
> 
> ```

these are the data outputs from top and bottom.

The values drawn in red are the current values (from above resistor 100, 115, 130,175) at the time of debugging top and bottom.  
He must show these values, under the debug are the values that he shows instead.

---

<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: [28 November 2022 20:38 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/84 "2022-11-28T20:38:29Z")

</div>

> [@Cupra85](#):
>
> The values drawn in red are the current values

If the red text items on the image are "current values", then why do they have the comment "setpoint"?

Where are the actual setpoint values for registers 111, 126, 156?

Do you see the confusion and why I am reluctant to spend time figuring out the necessary parsing of your data? There are hundreds of possible combinations (int32 /10, uint16 shifted 8 bits, float32 double, byteswap16 / byteswap32 etc etc etc) - so I need good quality, accurate and detailed information.

Sorry, but unless you make the effort to provide the information I need, in the format I have requested, I will not spend any more valuable time "guessing" or "figuring out" what you mean.

---

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [17 December 2022 11:31 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/85 "2022-12-17T11:31:11Z")

</div>

Solved

 ![700P flow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/5/151faf58f424d7b776d532c787d31fe3985a046f.jpeg)  
close topic

---

<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: [31 December 2022 11:31 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/86 "2022-12-31T11:31:25Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/modbustcp-read-function-script/71034.md?page=4)
