# DEC to ASCII characters display

**URL:** <https://discourse.nodered.org/t/dec-to-ascii-characters-display/100309>\
**Category:** General\
**Created:** [4 February 2026 17:09 UTC](https://discourse.nodered.org/t/dec-to-ascii-characters-display/100309 "2026-02-04T17:09:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nearbyatom](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@nearbyatom](https://discourse.nodered.org/u/nearbyatom)\
**Post date:** [4 February 2026 17:09 UTC](https://discourse.nodered.org/t/dec-to-ascii-characters-display/100309/1 "2026-02-04T17:09:11Z")

</div>

I'm pulling in data 1 character per register over modbus. And it looks like this

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

How do i combine these decimals together, and spit out the message in ASCII? And then I need to display it on the dashboard.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [4 February 2026 17:27 UTC](https://discourse.nodered.org/t/dec-to-ascii-characters-display/100309/2 "2026-02-04T17:27:32Z")

</div>

Look very ambiguous as to what you have is it an array or buffer?

From array using JS in function node.

```auto
msg.payload = String.fromCharCode.apply(null, msg.payload);

```

returns `HILSCHYW`

When supplying data it is best to supply text. You can gain this by using the copy value in the debug sidebar

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)

Then paste in thread using

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)

Or have a look at [node-red-contrib-buffer-parser (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-buffer-parser)

---

<div class="post-metadata">

**Author:** ![nearbyatom](https://avatars.discourse-cdn.com/v4/letter/n/ec9cab/32.png) [@nearbyatom](https://discourse.nodered.org/u/nearbyatom)\
**Post date:** [4 February 2026 17:47 UTC](https://discourse.nodered.org/t/dec-to-ascii-characters-display/100309/3 "2026-02-04T17:47:45Z")

</div>

Thanks. This is what I have so far.

```auto
[
    {
        "id": "b9d76657be281509",
        "type": "function",
        "z": "6a32a593.d9b52c",
        "name": "function 7",
        "func": "msg.payload = String.fromCharCode.apply(null, msg.payload);\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1160,
        "y": 400,
        "wires": [
            [
                "8c98c667f6facbbb",
                "0998a5d4af6ea6ef"
            ]
        ]
    },
    {
        "id": "8c98c667f6facbbb",
        "type": "debug",
        "z": "6a32a593.d9b52c",
        "name": "debug 20",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "jsonata",
        "statusVal": "",
        "statusType": "auto",
        "x": 1320,
        "y": 420,
        "wires": []
    },
    {
        "id": "0998a5d4af6ea6ef",
        "type": "ui-text",
        "z": "6a32a593.d9b52c",
        "group": "48c8e79a24d4f0fd",
        "order": 0,
        "width": 0,
        "height": 0,
        "name": "",
        "label": "",
        "format": "{{msg.payload}}",
        "layout": "row-spread",
        "style": false,
        "font": "",
        "fontSize": 16,
        "color": "#717171",
        "wrapText": false,
        "className": "",
        "value": "payloads",
        "valueType": "msg",
        "x": 1310,
        "y": 360,
        "wires": []
    },
    {
        "id": "5f0dee67d36441cb",
        "type": "modbus-read",
        "z": "6a32a593.d9b52c",
        "name": "PLC-READ",
        "topic": "PLC",
        "showStatusActivities": false,
        "logIOActivities": false,
        "showErrors": false,
        "showWarnings": true,
        "unitid": "1",
        "dataType": "InputRegister",
        "adr": "222",
        "quantity": "3",
        "rate": "1",
        "rateUnit": "s",
        "delayOnStart": false,
        "enableDeformedMessages": false,
        "startDelayTime": "",
        "server": "bf81420f.323c4",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "x": 950,
        "y": 420,
        "wires": [
            [
                "b173d0bf6cc20683",
                "b9d76657be281509"
            ],
            []
        ]
    },
    {
        "id": "b173d0bf6cc20683",
        "type": "debug",
        "z": "6a32a593.d9b52c",
        "name": "debug 21",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1100,
        "y": 340,
        "wires": []
    },
    {
        "id": "48c8e79a24d4f0fd",
        "type": "ui-group",
        "name": "STATUS",
        "page": "8b20a6d5d1ae7cd3",
        "width": "12",
        "height": 1,
        "order": 4,
        "showTitle": true,
        "className": "",
        "visible": "true",
        "disabled": false,
        "groupType": "default"
    },
    {
        "id": "bf81420f.323c4",
        "type": "modbus-client",
        "name": "PLC",
        "clienttype": "tcp",
        "bufferCommands": true,
        "stateLogEnabled": false,
        "queueLogEnabled": false,
        "failureLogEnabled": false,
        "tcpHost": "192.168.0.10",
        "tcpPort": "502",
        "tcpType": "DEFAULT",
        "serialPort": "/dev/ttyUSB",
        "serialType": "RTU-BUFFERD",
        "serialBaudrate": "9600",
        "serialDatabits": "8",
        "serialStopbits": "1",
        "serialParity": "none",
        "serialConnectionDelay": "100",
        "serialAsciiResponseStartDelimiter": "",
        "unit_id": 1,
        "commandDelay": 1,
        "clientTimeout": 1000,
        "reconnectOnTimeout": true,
        "reconnectTimeout": 2000,
        "parallelUnitIdsAllowed": true,
        "showErrors": false,
        "showWarnings": true,
        "showLogs": true
    },
    {
        "id": "8b20a6d5d1ae7cd3",
        "type": "ui-page",
        "name": "Page 1",
        "ui": "ff48cd83ca1ae463",
        "path": "/page1",
        "icon": "home",
        "layout": "grid",
        "theme": "f7b447c2f12c78b5",
        "breakpoints": [
            {
                "name": "Default",
                "px": "0",
                "cols": "3"
            },
            {
                "name": "Tablet",
                "px": "576",
                "cols": "6"
            },
            {
                "name": "Small Desktop",
                "px": "800",
                "cols": "3"
            },
            {
                "name": "Desktop",
                "px": "1024",
                "cols": "12"
            },
            {
                "name": "",
                "px": "",
                "cols": ""
            }
        ],
        "order": 1,
        "className": "",
        "visible": true,
        "disabled": false
    },
    {
        "id": "ff48cd83ca1ae463",
        "type": "ui-base",
        "name": "My Dashboard",
        "path": "/dashboard",
        "appIcon": "",
        "includeClientData": true,
        "acceptsClientConfig": [
            "ui-notification",
            "ui-control"
        ],
        "showPathInSidebar": false,
        "headerContent": "page",
        "navigationStyle": "default",
        "titleBarStyle": "default",
        "showReconnectNotification": true,
        "notificationDisplayTime": 1,
        "showDisconnectNotification": true,
        "allowInstall": false
    },
    {
        "id": "f7b447c2f12c78b5",
        "type": "ui-theme",
        "name": "Default Theme",
        "colors": {
            "surface": "#ffffff",
            "primary": "#0094CE",
            "bgPage": "#eeeeee",
            "groupBg": "#ffffff",
            "groupOutline": "#cccccc"
        },
        "sizes": {
            "density": "default",
            "pagePadding": "12px",
            "groupGap": "12px",
            "groupBorderRadius": "4px",
            "widgetGap": "12px"
        }
    },
    {
        "id": "6937d8b37ae8dbe4",
        "type": "global-config",
        "env": [],
        "modules": {
            "@flowfuse/node-red-dashboard": "1.29.0",
            "node-red-contrib-modbus": "5.45.2"
        }
    }
]

```

So I'm reading modbus into the function block, I can see the return message is correct via the debug node. But my display text is just blank. I think it just wants to display what's in the label field. I want to display that returned message.

Thoughts?

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [4 February 2026 18:00 UTC](https://discourse.nodered.org/t/dec-to-ascii-characters-display/100309/4 "2026-02-04T18:00:47Z")

</div>

It is still ambiguous as to what your msg.payload is, you still have not supplied it.

---

<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 February 2026 19:07 UTC](https://discourse.nodered.org/t/dec-to-ascii-characters-display/100309/5 "2026-02-04T19:07:54Z")

</div>

> [@nearbyatom](#):
>
> How do i combine these decimals together, and spit out the message in ASCII?

You might want to try `node-red-contrib-buffer-parser`. It is designed for PLC type data conversions.

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

Demo flow (import it using `CTRL-I`)

```auto
[{"id":"78c86fd55843c975","type":"buffer-maker","z":"8ed63487b1358a63","name":"fake modbus read","specification":"spec","specificationType":"ui","items":[{"name":"item1","type":"uint8","length":1,"dataType":"num","data":"72"},{"name":"item2","type":"uint8","length":1,"dataType":"num","data":"73"},{"name":"item3","type":"uint8","length":1,"dataType":"num","data":"76"},{"name":"item4","type":"uint8","length":1,"dataType":"num","data":"83"},{"name":"item5","type":"uint8","length":1,"dataType":"num","data":"67"},{"name":"item6","type":"uint8","length":1,"dataType":"num","data":"72"},{"name":"item7","type":"uint8","length":1,"dataType":"num","data":"69"},{"name":"item8","type":"uint8","length":1,"dataType":"num","data":"82"},{"name":"item6","type":"uint16be","length":1,"dataType":"num","data":"32770"}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","x":1570,"y":160,"wires":[["830662bcf54ddd0c","e0df0f9abec67347"]]},{"id":"3fbccca92dd566f2","type":"inject","z":"8ed63487b1358a63","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1380,"y":160,"wires":[["78c86fd55843c975"]]},{"id":"830662bcf54ddd0c","type":"debug","z":"8ed63487b1358a63","name":"debug 16","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1780,"y":160,"wires":[]},{"id":"e0df0f9abec67347","type":"buffer-parser","z":"8ed63487b1358a63","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"ascii","name":"state","offset":0,"length":6,"offsetbit":0,"scale":"1","mask":""},{"type":"bool","name":"auto","offset":7,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"bool","name":"manual","offset":7,"length":1,"offsetbit":1,"scale":"1","mask":""},{"type":"bool","name":"running","offset":7,"length":1,"offsetbit":10,"scale":"1","mask":""},{"type":"bool","name":"fault","offset":7,"length":1,"offsetbit":15,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":1550,"y":220,"wires":[["5b8739e0b6ce98e7"]]},{"id":"5b8739e0b6ce98e7","type":"debug","z":"8ed63487b1358a63","name":"parsed","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1770,"y":220,"wires":[]},{"id":"c95f7b6b775da3eb","type":"global-config","env":[],"modules":{"node-red-contrib-buffer-parser":"3.2.2"}}]

```

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [5 February 2026 06:14 UTC](https://discourse.nodered.org/t/dec-to-ascii-characters-display/100309/6 "2026-02-05T06:14:12Z")

</div>

Couldn't you use the `join` 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:** [6 May 2026 06:14 UTC](https://discourse.nodered.org/t/dec-to-ascii-characters-display/100309/7 "2026-05-06T06:14:20Z")

</div>

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