# Unsure how to deal with a JOIN node that doesnt receive all its data

**URL:** <https://discourse.nodered.org/t/unsure-how-to-deal-with-a-join-node-that-doesnt-receive-all-its-data/78650>\
**Category:** General\
**Tags:** node-red-dashboard, database, opcua\
**Created:** [24 May 2023 05:49 UTC](https://discourse.nodered.org/t/unsure-how-to-deal-with-a-join-node-that-doesnt-receive-all-its-data/78650 "2023-05-24T05:49:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aqueousdan](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@aqueousdan](https://discourse.nodered.org/u/aqueousdan)\
**Post date:** [24 May 2023 05:49 UTC](https://discourse.nodered.org/t/unsure-how-to-deal-with-a-join-node-that-doesnt-receive-all-its-data/78650/1 "2023-05-24T05:49:15Z")

</div>

Can anyone think of a way I can deal with this? Every 5 seconds, i am taking an integer from KepserverEX using OPCUA. This value comes from a machine in a factory but when any one machine is turned off the whole thing fails. Nothing is sent through the JOIN node.  
I think a way of dealing with this would be to set a time delay and read the values from the OPCUA node. Then have a function node that somehow looks at the values and inserts a 0 if nothing is received from that particular machine. I have no idea how do do that though.

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

```auto
[
    {
        "id": "ef0ed424a004a410",
        "type": "inject",
        "z": "ea7010c55ceba8e3",
        "name": "1 Min Timer",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "1",
        "payload": "",
        "payloadType": "date",
        "x": 310,
        "y": 260,
        "wires": [
            [
                "ebc495b1ad475a53",
                "e96f3624fd9b39c7",
                "37137f37348b62b1"
            ]
        ]
    },
    {
        "id": "882e1eb4745b401f",
        "type": "OpcUa-Client",
        "z": "ea7010c55ceba8e3",
        "endpoint": "7290d8b0.f713d8",
        "action": "read",
        "deadbandvalue": "",
        "time": "10",
        "timeUnit": "s",
        "localfile": "",
        "localkeyfile": "",
        "folderName4PKI": "",
        "maxChunkCount": "",
        "maxMessageSize": "",
        "receiveBufferSize": "",
        "sendBufferSize": "",
        "name": "Test server (subscribe items)",
        "x": 860,
        "y": 200,
        "wires": [
            [
                "e45a38d6fe39b386"
            ]
        ]
    },
    {
        "id": "e45a38d6fe39b386",
        "type": "join",
        "z": "ea7010c55ceba8e3",
        "name": "Join",
        "mode": "custom",
        "build": "object",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": false,
        "timeout": "",
        "count": "3",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 1090,
        "y": 200,
        "wires": [
            [
                "50e9e02ebe503bde"
            ]
        ]
    },
    {
        "id": "50e9e02ebe503bde",
        "type": "function",
        "z": "ea7010c55ceba8e3",
        "name": "Rename Keys",
        "func": "msg.payload = {\n BoardCount1: msg.payload[\"ns=2;s=BAR-GAL-AND1.PLC.BoardCount\"],\n BoardCount2: msg.payload[\"ns=2;s=BAR-GAL-AND2.PLC.BoardCount\"],\n BoardCount3: msg.payload[\"ns=2;s=BAR-GAL-AND3.PLC.BoardCount\"],\n \n};\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1260,
        "y": 200,
        "wires": [
            [
                "84b35168f1946a50"
            ]
        ]
    },
    {
        "id": "ebc495b1ad475a53",
        "type": "OpcUa-Item",
        "z": "ea7010c55ceba8e3",
        "item": "ns=2;s=BAR-GAL-AND1.PLC.BoardCount",
        "datatype": "Int32",
        "value": "",
        "name": "Anderson 1 Board Count",
        "x": 550,
        "y": 200,
        "wires": [
            [
                "882e1eb4745b401f"
            ]
        ]
    },
    {
        "id": "37137f37348b62b1",
        "type": "OpcUa-Item",
        "z": "ea7010c55ceba8e3",
        "item": "ns=2;s=BAR-GAL-AND2.PLC.BoardCount",
        "datatype": "Int32",
        "value": "",
        "name": "Anderson 2 Board Count",
        "x": 550,
        "y": 260,
        "wires": [
            [
                "882e1eb4745b401f"
            ]
        ]
    },
    {
        "id": "e96f3624fd9b39c7",
        "type": "OpcUa-Item",
        "z": "ea7010c55ceba8e3",
        "item": "ns=2;s=BAR-GAL-AND3.PLC.BoardCount",
        "datatype": "Int32",
        "value": "",
        "name": "Anderson 3 Board Count",
        "x": 550,
        "y": 320,
        "wires": [
            [
                "882e1eb4745b401f"
            ]
        ]
    },
    {
        "id": "84b35168f1946a50",
        "type": "debug",
        "z": "ea7010c55ceba8e3",
        "name": "debug 251",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1430,
        "y": 340,
        "wires": []
    },
    {
        "id": "7290d8b0.f713d8",
        "type": "OpcUa-Endpoint",
        "endpoint": "opc.tcp://10.50.66.175:49320",
        "secpol": "None",
        "secmode": "None",
        "none": false,
        "login": false,
        "usercert": false,
        "usercertificate": "",
        "userprivatekey": ""
    }
]

```

---

<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:** [24 May 2023 07:33 UTC](https://discourse.nodered.org/t/unsure-how-to-deal-with-a-join-node-that-doesnt-receive-all-its-data/78650/2 "2023-05-24T07:33:44Z")

</div>

You can put a timeout in the join node, or after inject add a delay/trigger node and send msg.complete to the join node.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 May 2023 08:57 UTC](https://discourse.nodered.org/t/unsure-how-to-deal-with-a-join-node-that-doesnt-receive-all-its-data/78650/3 "2023-05-24T08:57:16Z")

</div>

Why do you need to join them?

---

<div class="post-metadata">

**Author:** ![aqueousdan](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@aqueousdan](https://discourse.nodered.org/u/aqueousdan)\
**Post date:** [24 May 2023 09:11 UTC](https://discourse.nodered.org/t/unsure-how-to-deal-with-a-join-node-that-doesnt-receive-all-its-data/78650/5 "2023-05-24T09:11:14Z")

</div>

I'm not sure, im pretty new to this.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 May 2023 09:24 UTC](https://discourse.nodered.org/t/unsure-how-to-deal-with-a-join-node-that-doesnt-receive-all-its-data/78650/6 "2023-05-24T09:24:36Z")

</div>

What do you want to do with the data?

---

<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:** [23 July 2023 09:25 UTC](https://discourse.nodered.org/t/unsure-how-to-deal-with-a-join-node-that-doesnt-receive-all-its-data/78650/7 "2023-07-23T09:25:02Z")

</div>

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