# Problem sending FLOAT data and DW with MCprotocol

**URL:** https://discourse.nodered.org/t/problem-sending-float-data-and-dw-with-mcprotocol/75807
**Category:** General
**Created:** [27 February 2023 11:40 UTC](https://discourse.nodered.org/t/problem-sending-float-data-and-dw-with-mcprotocol/75807 "2023-02-27T11:40:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Seadiver](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@Seadiver](https://discourse.nodered.org/u/Seadiver)
#### Post date: [27 February 2023 11:40 UTC](https://discourse.nodered.org/t/problem-sending-float-data-and-dw-with-mcprotocol/75807/1 "2023-02-27T11:40:11Z")

</div>

Hi  
I'm setting up a Node-red project were I need to be able to send and receive data from a Mitsubishi FX5 CPU.  
Reading data is not an issue but I am struggling with writing data. I can not figure out how to write to a double word. I have tried to use the buffer maker but when I do it only uses 8bits in the first D100 then start to write values in the first 8bits in the following D101

When I tried to write to DFLOAT100 I only get error massage that FLOAT is an unknown data type.  
Reading DFLOAT100 is not an issue.

Also I get an error message that I am not able to solve

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

Any suggestions?

---

<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: [27 February 2023 12:47 UTC](https://discourse.nodered.org/t/problem-sending-float-data-and-dw-with-mcprotocol/75807/2 "2023-02-27T12:47:56Z")

</div>

Can you share a minimal flow that demonstrates reading & writing (even if it doesnt work)

Use CTRL-E to export & paste exported JSON into a code block

`````  
`like this (with three backticks above and below)`  
`````

---

<div class="post-metadata">

### Author: ![Seadiver](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@Seadiver](https://discourse.nodered.org/u/Seadiver)
#### Post date: [27 February 2023 13:18 UTC](https://discourse.nodered.org/t/problem-sending-float-data-and-dw-with-mcprotocol/75807/3 "2023-02-27T13:18:48Z")

</div>

```auto
[
    {
        "id": "76ed1cc676370a68",
        "type": "ui_text_input",
        "z": "4f2d5c1695e19232",
        "name": "",
        "label": "Skalfaktor längsmätning",
        "tooltip": "",
        "group": "b6a6a1b52b807232",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "mode": "number",
        "delay": "300",
        "topic": "topic",
        "sendOnBlur": false,
        "className": "",
        "topicType": "msg",
        "x": 1270,
        "y": 1540,
        "wires": [
            [
                "767ea1365f589945"
            ]
        ]
    },
    {
        "id": "7e496d8df19b85e1",
        "type": "ui_text_input",
        "z": "4f2d5c1695e19232",
        "name": "",
        "label": "Kalibreringslängd",
        "tooltip": "",
        "group": "24850439ce118377",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "mode": "number",
        "delay": 300,
        "topic": "topic",
        "sendOnBlur": true,
        "className": "",
        "topicType": "msg",
        "x": 1210,
        "y": 1620,
        "wires": [
            [
                "f39ceb74ceda6797"
            ]
        ]
    },
    {
        "id": "767ea1365f589945",
        "type": "range",
        "z": "4f2d5c1695e19232",
        "minin": "0",
        "maxin": "1",
        "minout": "0",
        "maxout": "10000",
        "action": "scale",
        "round": false,
        "property": "payload",
        "name": "",
        "x": 1520,
        "y": 1540,
        "wires": [
            [
                "9efb8842c99c0a8a"
            ]
        ]
    },
    {
        "id": "9efb8842c99c0a8a",
        "type": "MC Write",
        "z": "4f2d5c1695e19232",
        "name": "Skicka D110",
        "topic": "",
        "connection": "426b02f1df50ef3c",
        "data": "payload",
        "address": "D110",
        "addressType": "str",
        "dataType": "msg",
        "errorHandling": "throw",
        "outputs": 1,
        "x": 1730,
        "y": 1540,
        "wires": [
            []
        ]
    },
    {
        "id": "0624efac02bb32ef",
        "type": "MC Write",
        "z": "4f2d5c1695e19232",
        "name": "Skicka DFLOAT125",
        "topic": "",
        "connection": "426b02f1df50ef3c",
        "data": "payload",
        "address": "DFLOAT125",
        "addressType": "str",
        "dataType": "msg",
        "errorHandling": "throw",
        "outputs": 1,
        "x": 1750,
        "y": 1620,
        "wires": [
            [
                "f0e49ca02da29e83"
            ]
        ]
    },
    {
        "id": "4d6e9aaa2d757a67",
        "type": "buffer-maker",
        "z": "4f2d5c1695e19232",
        "name": "",
        "specification": "spec",
        "specificationType": "ui",
        "items": [
            {
                "name": "D125",
                "type": "floatle",
                "length": 2,
                "dataType": "msg",
                "data": "D125"
            }
        ],
        "swap1": "",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "str",
        "x": 1510,
        "y": 1620,
        "wires": [
            [
                "0624efac02bb32ef",
                "5f315c4fc789063c"
            ]
        ]
    },
    {
        "id": "f0e49ca02da29e83",
        "type": "debug",
        "z": "4f2d5c1695e19232",
        "name": "debug 148",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1950,
        "y": 1620,
        "wires": []
    },
    {
        "id": "5f315c4fc789063c",
        "type": "debug",
        "z": "4f2d5c1695e19232",
        "name": "debug 149",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1750,
        "y": 1700,
        "wires": []
    },
    {
        "id": "f39ceb74ceda6797",
        "type": "change",
        "z": "4f2d5c1695e19232",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "D125",
                "pt": "msg",
                "to": "payload",
                "tot": "msg",
                "dc": true
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1440,
        "y": 1720,
        "wires": [
            [
                "4d6e9aaa2d757a67"
            ]
        ]
    },
    {
        "id": "b6a6a1b52b807232",
        "type": "ui_group",
        "name": "Extra",
        "tab": "89790f01f5014aca",
        "order": 4,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "24850439ce118377",
        "type": "ui_group",
        "name": "Kalibrering",
        "tab": "89790f01f5014aca",
        "order": 4,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "426b02f1df50ef3c",
        "type": "MC Protocol Connection",
        "name": "PLC",
        "host": "192.168.246.12",
        "port": "1025",
        "protocol": "UDP",
        "frame": "4E",
        "plcType": "QnA",
        "ascii": false,
        "PLCStation": "",
        "PCStation": "",
        "PLCModuleNo": "",
        "network": "",
        "octalInputOutput": false,
        "timeout": "10000"
    },
    {
        "id": "89790f01f5014aca",
        "type": "ui_tab",
        "name": "Inställningar",
        "icon": "settings",
        "order": 2,
        "disabled": false,
        "hidden": false
    }
]

```

Like this?

---

<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: [28 April 2023 13:19 UTC](https://discourse.nodered.org/t/problem-sending-float-data-and-dw-with-mcprotocol/75807/4 "2023-04-28T13:19:40Z")

</div>

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