# Convert Modbus data to ACC64 (buffer-parser, Ohmpilot, SunSpec)

**URL:** https://discourse.nodered.org/t/convert-modbus-data-to-acc64-buffer-parser-ohmpilot-sunspec/89392
**Category:** General
**Created:** [10 July 2024 07:07 UTC](https://discourse.nodered.org/t/convert-modbus-data-to-acc64-buffer-parser-ohmpilot-sunspec/89392 "2024-07-10T07:07:35Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [10 July 2024 08:10 UTC](https://discourse.nodered.org/t/convert-modbus-data-to-acc64-buffer-parser-ohmpilot-sunspec/89392/2 "2024-07-10T08:10:59Z")

</div>

Hi, welcome to the forum.

I am unfamiliar with ACC64 but a quick search reveals it is a number format SunSpec uses - are you using SunSpec gear?

According to a [Sunspec PDF](https://sunspec.org/wp-content/uploads/2021/02/SunSpec-Device-Information-Model-Specificiation-V1-0-02-01-2021.pdf), ACC64 is essentially a smaller `uint64` with a range of `0 ... 9223372036854775807`

`9223372036854775807` is bigger than JavaScripts Number.MAX\_SAFE\_INTEGER so you likely need to use BigInt value (which is a true 64bit number)

Can you copy the output of the Modbus node and paste it in a reply. Also, tell us the value you expect the 4 UINT16 modbus values to be once converted.

e.g.

### Modbus node debug capture:

```auto
{ payload: [0,0,16,55432], xxx: {], yyy: {}, zzz:{} }

```

### Expected value:

`203685477`

  

* * *

### How to grab data from a node

There’s a great page in the docs ([Working with messages : Node-RED](https://nodered.org/docs/user-guide/messages)) that will explain how to use the debug panel to find the right path/value for any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

![BX00Cy7yHi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f333a9e043b061b39917c328b0094d3e52d30.gif)

### How to post data values

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote `````)

````auto
``` 
   code goes here 
```

````

You can edit and correct your post by clicking the pencil ✏ icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

_[View the full topic](https://discourse.nodered.org/t/convert-modbus-data-to-acc64-buffer-parser-ohmpilot-sunspec/89392)._
