# Reading multiple addresses from MC Protocol (Mitsubishi FX PLC)

**URL:** <https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340>\
**Category:** Industrial\
**Created:** [12 October 2024 11:32 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340 "2024-10-12T11:32:11Z")\
**Posts on this page:** 20\
**Page:** 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:** [13 October 2024 06:20 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/21 "2024-10-13T06:20:04Z")

</div>

1. Show a small screenshot of how you configured the MC READ
2. Try reading `D990` - does that timeout or does it return a value?

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [13 October 2024 06:24 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/22 "2024-10-13T06:24:04Z")

</div>

@Steve-Mcl  
i set MC protocol node to D990,99 and it give me timeout error as a result it did  
not worked  
and the code i mention about is i removed ,99 from it and it worked for MC Protocol node but for buffer it say "Error: data is not an array or a buffer"

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

---

<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:** [13 October 2024 06:29 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/23 "2024-10-13T06:29:57Z")

</div>

> [@Steve-Mcl](#):
>
> Show a small screenshot of how you configured the MC READ

I need to see a small screenshot of how you configured the MC READ for `D990,99`

Please set it again & operate it.

Also set the debug node to show the complete message. Include that in your screenshot.

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [13 October 2024 06:31 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/24 "2024-10-13T06:31:18Z")

</div>

@Steve-Mcl

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/6/565af109b09b37f09513a64bf3b27b0844915758.png)  
This is the image

---

<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:** [13 October 2024 06:33 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/25 "2024-10-13T06:33:21Z")

</div>

Please clear the debug output

Please set the "Output Format" to `Array` on the MC READ

Please set the `debug` node to "show complete message"

Please press the inject again

Please send another screenshot with the debug msg expanded

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [13 October 2024 06:36 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/26 "2024-10-13T06:36:55Z")

</div>

After Doing it it still shows me Timeout error

```auto
[
    {
        "id": "e95a7b2e1151c8ce",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "a3d02109deacdab5",
        "type": "group",
        "z": "e95a7b2e1151c8ce",
        "name": "FAKE: Read D990,99 \\n (99 Words starting from D990) \\n Replace me with MC READ Node",
        "style": {
            "label": true
        },
        "nodes": [
            "354fb8229f36ba34"
        ],
        "x": 474,
        "y": 27,
        "w": 217,
        "h": 114
    },
    {
        "id": "9d5fe86ef9060dfc",
        "type": "buffer-parser",
        "z": "e95a7b2e1151c8ce",
        "name": "Convert array ro named values",
        "data": "payload",
        "dataType": "msg",
        "specification": "spec",
        "specificationType": "ui",
        "items": [
            {
                "type": "int16le",
                "name": "extrusionRodNumber",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "extrusionTime",
                "offset": 2,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "temperatureGiven",
                "offset": 4,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "temperatureSetting",
                "offset": 6,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "rapida",
                "offset": 28,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "chamdaDe",
                "offset": 30,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "protecaob",
                "offset": 32,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "protecaoa",
                "offset": 34,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "freagem",
                "offset": 36,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "limitPressureOfMasterCylinder",
                "offset": 42,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "veloc4",
                "offset": 44,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "veloc3",
                "offset": 46,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "veloc2",
                "offset": 48,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "rapida",
                "offset": 50,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "fillingPressureGiven",
                "offset": 52,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "slopeGivenOfBreakthroughPressure",
                "offset": 54,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "velocityAttenuationRatio",
                "offset": 58,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "velocityAttenuationStroke",
                "offset": 60,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "maximumStrokeGiven",
                "offset": 68,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "actualValueOfCoil",
                "offset": 136,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "breakthroughPressure",
                "offset": 160,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "residualPosition",
                "offset": 172,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "masterCylinderPosition",
                "offset": 174,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "rateOfDecay",
                "offset": 176,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "pressureOfMainCylinder",
                "offset": 182,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "speedGiven",
                "offset": 184,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "settingPointOfCoil",
                "offset": 186,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "pressureOfSideCylinder",
                "offset": 188,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "coilCurrent",
                "offset": 190,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "int16le",
                "name": "masterCylinderSpeed",
                "offset": 192,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            }
        ],
        "swap1": "swap16",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "str",
        "resultType": "value",
        "resultTypeType": "return",
        "multipleResult": true,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 430,
        "y": 240,
        "wires": [
            [
                "f2595a732b6b660f"
            ]
        ]
    },
    {
        "id": "69fd61c05090c7fa",
        "type": "inject",
        "z": "e95a7b2e1151c8ce",
        "name": "",
        "props": [
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "D990,99",
        "x": 140,
        "y": 140,
        "wires": [
            [
                "9fac3f141851276c"
            ]
        ]
    },
    {
        "id": "f2595a732b6b660f",
        "type": "debug",
        "z": "e95a7b2e1151c8ce",
        "name": "debug 390",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 490,
        "y": 320,
        "wires": []
    },
    {
        "id": "354fb8229f36ba34",
        "type": "debug",
        "z": "e95a7b2e1151c8ce",
        "g": "a3d02109deacdab5",
        "name": "PLC Data",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 560,
        "y": 100,
        "wires": []
    },
    {
        "id": "9fac3f141851276c",
        "type": "MC Read",
        "z": "e95a7b2e1151c8ce",
        "name": "",
        "topic": "",
        "connection": "68f68eb02a618617",
        "address": "D990,99",
        "addressType": "str",
        "outputFormat": "1",
        "errorHandling": "throw",
        "outputs": 1,
        "x": 340,
        "y": 140,
        "wires": [
            [
                "354fb8229f36ba34",
                "9d5fe86ef9060dfc"
            ]
        ]
    },
    {
        "id": "68f68eb02a618617",
        "type": "MC Protocol Connection",
        "name": "",
        "host": "192.168.2.20",
        "port": "5001",
        "protocol": "TCP",
        "frame": "1E",
        "plcType": "Q",
        "ascii": false,
        "PLCStation": "2",
        "PCStation": "255",
        "PLCModuleNo": "2",
        "network": "2",
        "octalInputOutput": false,
        "timeout": "1000"
    }
]

```

@Steve-Mcl  
above code has the changes you showed me please refer

---

<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:** [13 October 2024 06:37 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/27 "2024-10-13T06:37:47Z")

</div>

Sorry, but if you are not going to do what I ask, I cannot help you any more.

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [13 October 2024 06:41 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/28 "2024-10-13T06:41:19Z")

</div>

@Steve-Mcl  
i did it

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

---

<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:** [13 October 2024 06:43 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/29 "2024-10-13T06:43:52Z")

</div>

Now try adjusting the count.

Try `D990,50` - does that work?

Try `D990,30` - does that work?

Try `D990,9` - does that work?

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [13 October 2024 06:46 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/30 "2024-10-13T06:46:14Z")

</div>

@Steve-Mcl  
It worked For D990,30

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/7/c77b97e1c3186ebfeac06c5e2aeda5fcbcb5d2e7.png)  
But the problem is for Buffer

---

<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:** [13 October 2024 06:53 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/31 "2024-10-13T06:53:07Z")

</div>

> [@Jayeshpitale1](#):
>
> But the problem is for Buffer

Yes, that is expected because of small data READ size!  
Lets figure out READing the higher addresses first.

  

> [@Jayeshpitale1](#):
>
> It worked For D990,30

Good. Now lets try reading a single D from higher up.

For now, until we understand what is happening, DELETE the wire from MC READ ---x---\> Buffer Parser node

Next, please answer every question...

1. What do you get for address `D1023`
2. What do you get for address `D1024`
3. What do you get for address `D1025`
4. What do you get for address `D1086`
5. What do you get for address `D1087`
6. What do you get for address `D1088`

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [13 October 2024 07:13 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/32 "2024-10-13T07:13:13Z")

</div>

> 1. What do you get for address `D1023`
> 2. What do you get for address `D1024`
> 3. What do you get for address `D1025`
> 4. What do you get for address `D1086`
> 5. What do you get for address `D1087`
> 6. What do you get for address `D1088`

@Steve-Mcl

```auto
[0,2,420,194,146,487,0,0,0,0,0,200,128,6000,5000,4000,3000,2000,1000,0,3,280,400,400,400,400,100,10,30,0,0,128,300,400,15653,50,10,6,0,200,280,230,3,3,800,120,32,0,2,0]

```

Where to find it in this message

---

<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:** [13 October 2024 07:16 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/33 "2024-10-13T07:16:47Z")

</div>

No, please do what I asked.

1. What do you get when you set MC READ to READ ONLY 1 address - `D1023`
2. What do you get when you set MC READ to READ ONLY 1 address - `D1024`
3. What do you get when you set MC READ to READ ONLY 1 address - `D1025`
4. What do you get when you set MC READ to READ ONLY 1 address - `D1086`
5. What do you get when you set MC READ to READ ONLY 1 address - `D1087`
6. What do you get when you set MC READ to READ ONLY 1 address - `D1088`

---

<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:** [13 October 2024 07:19 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/34 "2024-10-13T07:19:24Z")

</div>

> [@Jayeshpitale1](#):
>
> ```auto
> 0,400,100,10,30,0,0,128,300,400,15653,50,10,6,0,200,280,230,3,3,800,120,32,0,2,0]
> 
> ```
> 
> Where to find it in this message

By the way, that data HAS 50 elements but you said...

> [@Jayeshpitale1](#):
>
> It worked For D990,30

So did `D990,50` actually work OK?

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [13 October 2024 07:29 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/35 "2024-10-13T07:29:14Z")

</div>

@Steve-Mcl What are you trying to do

> So did D990,50 actually work OK?

YES

> 1. What do you get when you set MC READ to READ ONLY 1 address - `D1023`

400

> 1. What do you get when you set MC READ to READ ONLY 1 address - `D1024`

15653

> 1. What do you get when you set MC READ to READ ONLY 1 address - `D1025`

50

> 1. What do you get when you set MC READ to READ ONLY 1 address - `D1086`

0

> 1. What do you get when you set MC READ to READ ONLY 1 address - `D1087`

0

> 1. What do you get when you set MC READ to READ ONLY 1 address - `D1088`

930

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [13 October 2024 07:35 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/36 "2024-10-13T07:35:48Z")

</div>

@Steve-Mcl  
As we are discussing on D tag Address  
i still dont under stand how we would get D\_bit and M and Y in this or would i have to create a different node for them

---

<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:** [13 October 2024 07:39 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/37 "2024-10-13T07:39:30Z")

</div>

> [@Jayeshpitale1](#):
>
> > So did D990,50 actually work OK?
> 
> YES

Good.

Now, we need to find the max read size. 99 should work but as it doesnt, try lowering it until it works.

1. Try setting MC READ to D990,98 - does it work?
2. Try setting MC READ to D990,97 - does it work?
3. Try setting MC READ to D990,96 - does it work?
4. etc etc etc

Tell me the highest `,nn` count number that works.

* * *

To make this easier - use this flow:

![chrome_I2wEiJz7Xj](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/f/cfcbeed8a6d28a7bd47168e8de1f9528f04e22f7.gif)

```auto
[{"id":"fd3e1507fad47c81","type":"MC Read","z":"99321f37fd961305","name":"","topic":"","connection":"8c926f873226d344","address":"topic","addressType":"msg","outputFormat":"1","errorHandling":"throw","outputs":1,"x":640,"y":540,"wires":[["6548196310afdda8"]]},{"id":"8d08c518904584a4","type":"inject","z":"99321f37fd961305","name":"read next address","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":540,"wires":[["46bbd1491909db56"]]},{"id":"6548196310afdda8","type":"debug","z":"99321f37fd961305","name":"PLC Data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":640,"y":620,"wires":[]},{"id":"46bbd1491909db56","type":"function","z":"99321f37fd961305","name":"address maker","func":"\nif (msg.topic === 'set-count') {\n context.set('count', msg.payload)\n node.status({fill:\"green\",shape:\"ring\",text:\"Set count to \" + msg.payload});\n return\n}\n\nlet count = context.get('count') ?? 98\nnode.status({ fill: \"green\", shape: \"ring\", text: \"Sending address D990,\" + count });\nmsg.topic = \"D990,\" + count\ndelete msg.payload\n\nif (count > 1) count--\ncontext.set('count', count)\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":540,"wires":[["fd3e1507fad47c81"]]},{"id":"76ad3972c996b4e0","type":"inject","z":"99321f37fd961305","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"set-count","payload":"98","payloadType":"num","x":210,"y":500,"wires":[["46bbd1491909db56"]]},{"id":"8c926f873226d344","type":"MC Protocol Connection","name":"","host":"192.168.2.20","port":"5001","protocol":"TCP","frame":"1E","plcType":"Q","ascii":false,"PLCStation":"2","PCStation":"255","PLCModuleNo":"2","network":"2","octalInputOutput":false,"timeout":"1000"}]

```

---

<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:** [13 October 2024 07:40 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/38 "2024-10-13T07:40:40Z")

</div>

> [@Jayeshpitale1](#):
>
> i still dont under stand how we would get D\_bit and M and Y in this or would i have to create a different node for them

I have explained that before here:

> [@Steve-Mcl](#):
>
> So for the example I did earlier, to get bits from a D register, just chose BOOL and a byte and bit offset in the buffer parser.
> 
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/2/e21966731b1e195ac79afaed8a713104410bc56a.png)
> 
> Its all detailed and explained in the built-in help (node-red side bar) and the built in examples for buffer-parser (examples are access via `CTRL-I` -\> examples
> 
> there are also LOTS of examples and demos in the forum (search buffer parser).
> 
> For reading Y / M / X, you can request them from the MC READ node as a word (or multiple words) with a digit specifier like `K4` e.g. `K4Y0,10` should read 10 16bit WORDSs starting from Y0 - then you pick out the bits using buffer parser

#### and i WILL explain it again - AFTER we get reliable data for the "D" area working

---

<div class="post-metadata">

**Author:** ![Jayeshpitale1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jayeshpitale1/32/70216_2.png) [@Jayeshpitale1](https://discourse.nodered.org/u/Jayeshpitale1)\
**Post date:** [13 October 2024 07:44 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/39 "2024-10-13T07:44:34Z")

</div>

@Steve-Mcl  
Now i gave you the answer of the question you asked before can you please tell what next to do  
Means i need the data in the form of  
for example  
address D990  
topic Extrusion  
Payload 300  
address D992  
topic : temp  
Payload 450

---

<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:** [13 October 2024 07:45 UTC](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340/40 "2024-10-13T07:45:36Z")

</div>

Yes, I will tell you how to acheive that but you are jumping ahead.

please answer

> [@Steve-Mcl](#):
>
> Tell me the highest `,nn` count number that works.
> 
> * * *
> 
> To make this easier - use this flow:

[Previous page](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340.md?page=1)

[Next page](https://discourse.nodered.org/t/reading-multiple-addresses-from-mc-protocol-mitsubishi-fx-plc/92340.md?page=3)
