# OPC UA ExtensionObject Simatic S7-1500

**URL:** <https://discourse.nodered.org/t/opc-ua-extensionobject-simatic-s7-1500/70375>\
**Category:** General\
**Tags:** opcua\
**Created:** [10 November 2022 06:00 UTC](https://discourse.nodered.org/t/opc-ua-extensionobject-simatic-s7-1500/70375 "2022-11-10T06:00:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![uwe81nt](https://avatars.discourse-cdn.com/v4/letter/u/87869e/32.png) [@uwe81nt](https://discourse.nodered.org/u/uwe81nt)\
**Post date:** [10 November 2022 06:00 UTC](https://discourse.nodered.org/t/opc-ua-extensionobject-simatic-s7-1500/70375/1 "2022-11-10T06:00:12Z")

</div>

Hallo I have a problem and hope you can help me.  
I took the example of writing ExtensionObjects.  
After I deploy my flows I get following errors if I start the flow:

 ![Write ExtensionObject](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/dbe3cbe53c9895b715162baaf13514c8a37f73ce.png)

Maybe someone can help to fix my problem. Please ask if you need more information.

Here is my flow:

```auto
[
    {
        "id": "8fa81128505f4289",
        "type": "tab",
        "label": "Write UDT to PLC",
        "disabled": false,
        "info": ""
    },
    {
        "id": "ca77f5b419768afd",
        "type": "comment",
        "z": "8fa81128505f4289",
        "name": "Test Struktur schreiben",
        "info": "Type is stored ns=3;i=3010",
        "x": 140,
        "y": 80,
        "wires": []
    },
    {
        "id": "0835e18cc1d7b5b2",
        "type": "OpcUa-Client",
        "z": "8fa81128505f4289",
        "endpoint": "a5bf82989af42abf",
        "action": "build",
        "deadbandtype": "a",
        "deadbandvalue": 1,
        "time": 10,
        "timeUnit": "s",
        "certificate": "n",
        "localfile": "",
        "localkeyfile": "",
        "securitymode": "None",
        "securitypolicy": "None",
        "folderName4PKI": "",
        "name": "BUILD EXTENSION OBJ.",
        "x": 410,
        "y": 260,
        "wires": [
            [
                "16ae60b8ae0a7ad9",
                "dfd55d99b72414a2"
            ]
        ]
    },
    {
        "id": "3fc4976002f2623a",
        "type": "OpcUa-Item",
        "z": "8fa81128505f4289",
        "item": "ns=3;s=DT_\"udtMaterialIn\"",
        "datatype": "Extension Object",
        "value": "",
        "name": "ScanSettings type",
        "x": 170,
        "y": 260,
        "wires": [
            [
                "0835e18cc1d7b5b2"
            ]
        ]
    },
    {
        "id": "ee4f1853063073d7",
        "type": "inject",
        "z": "8fa81128505f4289",
        "name": "Client Get ExtensionObject",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 150,
        "y": 160,
        "wires": [
            [
                "3fc4976002f2623a"
            ]
        ]
    },
    {
        "id": "36e4395573ce3f98",
        "type": "function",
        "z": "8fa81128505f4289",
        "name": "Set values",
        "func": "var myvar = {\n \"szAuftragsnummer\": \"S7OpcUaTest\",\n \"szAuftragsnamen\" : \"S7OpcUaTest\",\n \"usiCnt\": \"1\",\n \"usiNo\": \"2\",\n \"rAbfuellgroeße\": \"3.1\",\n \"usiAbfuellmenge\": \"3\",\n \"rSpeedSwingArm\": \"3.3\",\n \"rSpeedMixingScrew\": \"3.4\",\n \"rMischzeit\": \"3.5\",\n \"szName\": \"3.56\",\n \"rMenge\": \"3.7\",\n \"rToleranzAbweichung\": \"3.9\",\n \"usiZufuehrung\": \"23\",\n \"rGrobdosierungSpeed\": \"4.3\",\n \"rUmschaltpunktInhaltsstoff\": \"4.4\",\n \"rFeindosierungSpeed\": \"4.5\",\n \"rRuettelzeitVibration\": \"4.6\",\n \"rRuettelzeitPauseVibration\": \"4.7\",\n \"rRuettelzeitStampfer\": \"4.8\",\n \"rRuettelzeitPauseStampfer\": \"4.9\",\n \"rSpeed22RV105\": \"5.5\",\n \"rSpeed23RV105S\": \"5.6\",\n \"rSpeed22M106\": \"5.7\",\n \"rSpeed22RV108\": \"5.8\",\n \"rSpeedBlower25M103\": \"5.85\",\n \"rSpeedBlower35M103\": \"8.9\"\n};\n\n\n//msg.dataType = \"ExtensionObject\";\n// Merge new values to payload\nObject.assign(msg.payload, myvar);\n\n// NOTE:\n// typeId need to constructExtensionObject\n//msg.topic = 'ns=3;s=DT_\"udtMaterialIn\"';\n//msg.datatype = \"ExtensionObject\";\n//return msg;\n\n//msg.topic = '\"ns=3;s=\"DB_TEST\".\"Inhaltstoff\";datatype=ExtensionObject;typeId=ns=3;s=DT_\"udtMaterialIn\"';\n\n\n// typeId need to constructExtensionObject\nmsg.topic = '\"ns=3;s=\"DB_TEST\".\"Inhaltstoff\";datatype=ExtensionObject;typeId=ns=3;s=DT_\"udtMaterialIn\"';\nreturn msg;\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 770,
        "y": 260,
        "wires": [
            [
                "9a244659fad10c15",
                "c53593d5da38a3ec"
            ]
        ]
    },
    {
        "id": "bf52ca3cb1b2b83d",
        "type": "debug",
        "z": "8fa81128505f4289",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "x": 1190,
        "y": 360,
        "wires": []
    },
    {
        "id": "9a244659fad10c15",
        "type": "debug",
        "z": "8fa81128505f4289",
        "name": "debug 23",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 840,
        "y": 360,
        "wires": []
    },
    {
        "id": "16ae60b8ae0a7ad9",
        "type": "debug",
        "z": "8fa81128505f4289",
        "name": "debug 28",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 480,
        "y": 360,
        "wires": []
    },
    {
        "id": "707e5677540ffd13",
        "type": "debug",
        "z": "8fa81128505f4289",
        "name": "debug 29",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 660,
        "y": 360,
        "wires": []
    },
    {
        "id": "ae695aff9dd5d64a",
        "type": "catch",
        "z": "8fa81128505f4289",
        "name": "",
        "scope": null,
        "uncaught": true,
        "x": 240,
        "y": 420,
        "wires": [
            [
                "145a72ed96ba6f41"
            ]
        ]
    },
    {
        "id": "47673455b4b5628d",
        "type": "OpcUa-Client",
        "z": "8fa81128505f4289",
        "endpoint": "a5bf82989af42abf",
        "action": "write",
        "deadbandtype": "a",
        "deadbandvalue": 1,
        "time": 10,
        "timeUnit": "s",
        "certificate": "n",
        "localfile": "",
        "localkeyfile": "",
        "securitymode": "None",
        "securitypolicy": "None",
        "folderName4PKI": "",
        "name": "",
        "x": 1160,
        "y": 260,
        "wires": [
            [
                "bf52ca3cb1b2b83d"
            ]
        ]
    },
    {
        "id": "dfd55d99b72414a2",
        "type": "json",
        "z": "8fa81128505f4289",
        "name": "",
        "property": "payload",
        "action": "obj",
        "pretty": true,
        "x": 610,
        "y": 260,
        "wires": [
            [
                "707e5677540ffd13",
                "36e4395573ce3f98"
            ]
        ]
    },
    {
        "id": "145a72ed96ba6f41",
        "type": "debug",
        "z": "8fa81128505f4289",
        "name": "debug 30",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 500,
        "y": 420,
        "wires": []
    },
    {
        "id": "c53593d5da38a3ec",
        "type": "OpcUa-Item",
        "z": "8fa81128505f4289",
        "item": "\"ns=3;s=\"DB_TEST\".\"Inhaltstoff\"",
        "datatype": "Extension Object",
        "value": "",
        "name": "",
        "x": 960,
        "y": 260,
        "wires": [
            [
                "47673455b4b5628d",
                "b4ebb219ef325aa3"
            ]
        ]
    },
    {
        "id": "b4ebb219ef325aa3",
        "type": "debug",
        "z": "8fa81128505f4289",
        "name": "debug 33",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1080,
        "y": 400,
        "wires": []
    },
    {
        "id": "a5bf82989af42abf",
        "type": "OpcUa-Endpoint",
        "endpoint": "opc.tcp://192.168.200.30:4840",
        "secpol": "None",
        "secmode": "None",
        "none": false,
        "login": false,
        "usercert": false,
        "usercertificate": "",
        "userprivatekey": ""
    }
]

```

Best regards Uwe

---

<div class="post-metadata">

**Author:** ![mikakaraila](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikakaraila/32/37496_2.png) [@mikakaraila](https://discourse.nodered.org/u/mikakaraila)\
**Post date:** [10 November 2022 18:26 UTC](https://discourse.nodered.org/t/opc-ua-extensionobject-simatic-s7-1500/70375/2 "2022-11-10T18:26:03Z")

</div>

Error is inside node-opcua, look this link:

> <https://github.com/node-opcua/node-opcua/issues/1199>
>
> \<!--
> IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION, WE MIGHT CLOSE YOUR ISSUE… WITHOUT INVESTIGATING
> 
> Note: Github issues are intended to be handled by the community. You may want to consider professional support provided by the author and sterfive.com instead (see below)
> 
> !! Please do not submit support requests here. !!
> 
> 
> Support requests are handled exclusively through the NodeOPCUA Membership program on a dedicated forum.
> 
> Please subscribe to the \*\*\[NODE-OPCUA membership program\](https://support.sterfive.com)\*\*
>      
> https://support.sterfive.com
>                  
> Professional support ensures the following:
> 
> \- 🚀 Fast reply and resolution
> \- 🔐 confidentiality & privacy
> \- 🔍 dedicated investigation for your issue
> \- 🐛 prompt resolution of bugs or issues
> \- 📖 free access to the most up to date and online version of \[node-opcua by example\](https://leanpub.com/node-opcuabyexample)
> 
> 
> You may also \[contact Sterfive\](https://www.sterfive.com) for dedicated professional support: mailto:contact@sterfive.com
> 
> 
> \*\*Consider backing or sponsoring the node-opcua initiative\*\* 
> 
> Node-opcua is an initiative of sterfive.com.
> Sterfive is an independent company and not affiliated with any industrial or software vendors.
> Sterfive is a corporate member of the OPC Foundation.
> Sterfive needs the support of the node-opcua users to maintain a high quality level and always up-to-date technology. 
> 
> Once you have evaluated node-opcua and prove it useful to your company, please consider backing us and sponsoring us.
> 
> https://github.com/sponsors/node-opcua 
> or 
> https://opencollective.com/node-opcua 
> or
> contact us directly mailto:contact@sterfive.com
>                  
> Grants ensure the following:
> 
> 🔨 Long term maintenance of the project
> ⚙️ maintain the website and continuous integration platform
> 🛣 Progress on the road-map
> 🐛 Quick responses to bug reports
> 🚀 New features & enhancements
> ⚖️ representing the node-opcua user community at the OPC Foundation
> 
> 
> \*\*for community support\*\*
> - use \[gitter\](https://gitter.im/node-opcua/node-opcua)
> - use \[stackoverflow\](https://stackoverflow.com/questions/tagged/node-opcua)
> - access the "NodeOPCUA by example" book at https://leanpub.com/node-opcuabyexample
> 
> \--\>
> 
> I am using node-opcua version :"^2.53.0" if I install latest version below error showing on service at first time only(time of node service start)
> 
> \<!-- 
> Describe how the bug manifests. 
> \--\>
> 
> 10:54:18.883Z :populate\_data\_type\_manager\_104:67 Error Error: Cannot find dataType Definition ! with nodeId =ns=2;i=6522
> ... at C:\\Users\\web\\web-service-nodejs\\node\_modules\\node-opcua-client-dynamic-extension-object\\source\\private\\populate\_data\_type\_manager\_104.ts:46:19
> ... at Generator.next (\<anonymous\>)
> ... at fulfilled (C:\\Users\\web\\web-service-nodejs\\node\_modules\\node-opcua-client-dynamic-extension-object\\dist\\private\\populate\_data\_type\_manager\_104.js:5:58)
> ... at processTicksAndRejections (internal/process/task\_queues.js:95:5)
> 10:54:19.265Z :populate\_data\_type\_manager\_104:67 Error Error: Cannot find dataType Definition ! with nodeId =ns=2;i=6525
> ... at C:\\Users\\web\\web-service-nodejs\\node\_modules\\node-opcua-client-dynamic-extension-object\\source\\private\\populate\_data\_type\_manager\_104.ts:46:19
> ... at Generator.next (\<anonymous\>)
> ... at fulfilled (C:\\Users\\web\\web-service-nodejs\\node\_modules\\node-opcua-client-dynamic-extension-object\\dist\\private\\populate\_data\_type\_manager\_104.js:5:58)
> ... at processTicksAndRejections (internal/process/task\_queues.js:95:5)
> 10:54:19.673Z :populate\_data\_type\_manager\_104:67 Error Error: Cannot find dataType Definition ! with nodeId =ns=3;i=3400
> ... at C:\\Users\\web\\web-service-nodejs\\node\_modules\\node-opcua-client-dynamic-extension-object\\source\\private\\populate\_data\_type\_manager\_104.ts:46:19
> ... at Generator.next (\<anonymous\>)
> ... at fulfilled (C:\\Users\\web\\web-service-nodejs\\node\_modules\\node-opcua-client-dynamic-extension-object\\dist\\private\\populate\_data\_type\_manager\_104.js:5:58)
> ... at processTicksAndRejections (internal/process/task\_queues.js:95:5)
> 10:54:20.085Z :populate\_data\_type\_manager\_104:67 Error Error: Cannot find dataType Definition ! with nodeId =ns=3;i=3500
> ... at C:\\Users\\web\\web-service-nodejs\\node\_modules\\node-opcua-client-dynamic-extension-object\\source\\private\\populate\_data\_type\_manager\_104.ts:46:19
> ... at Generator.next (\<anonymous\>)
> ... at fulfilled (C:\\Users\\web\\web-service-nodejs\\node\_modules\\node-opcua-client-dynamic-extension-object\\dist\\private\\populate\_data\_type\_manager\_104.js:5:58)
> ... at processTicksAndRejections (internal/process/task\_queues.js:95:5)
> 10:54:21.312Z :populate\_data\_type\_manager\_104:67 Error Error: Cannot find dataType Definition ! with nodeId =ns=2;i=15889
> ... at C:\\Users\\web\\web-service-nodejs\\node\_modules\\node-opcua-client-dynamic-extension-object\\source\\private\\populate\_data\_type\_manager\_104.ts:46:19
> ... at Generator.next (\<anonymous\>)
> ... at fulfilled (C:\\Users\\web\\web-service-nodejs\\node\_modules\\node-opcua-client-dynamic-extension-object\\dist\\private\\populate\_data\_type\_manager\_104.js:5:58)
> ... at processTicksAndRejections (internal/process/task\_queues.js:95:5)
> =15888
> ... at C:\\Users\\web\\web-service-nodejs\\node\_modules\\node-opcua-client-dynamic-extension-object\\source\\private\\populate\_data\_type\_manager\_104.ts:46:19
> ... at Generator.next (\<anonymous\>)
> ... at fulfilled (C:\\Users\\web\\web-service-nodejs\\node\_modules\\node-opcua-client-dynamic-extension-object\\dist\\private\\populate\_data\_type\_manager\_104.js:5:58)
> ... at processTicksAndRejections (internal/process/task\_queues.js:95:5)
>  
> 
> 
> 
> 
> 
> \- \*\*node-opcua version:\*\* :"2.53.0" working but if I use "^2.53.0" then it showing this isssue and also if I install latest version that time also showing this issues
> 
>   
>   
> 
> \- \*\*Node:\*\*
> 
> \`node --version\` =v14.17.3
> 
> appreciate your help .
> Thanks

---

<div class="post-metadata">

**Author:** ![mikakaraila](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikakaraila/32/37496_2.png) [@mikakaraila](https://discourse.nodered.org/u/mikakaraila)\
**Post date:** [14 November 2022 19:05 UTC](https://discourse.nodered.org/t/opc-ua-extensionobject-simatic-s7-1500/70375/3 "2022-11-14T19:05:26Z")

</div>

I added some more error checking and in your case it can be wrong nodeId for the Extension object type.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/7/075e9819a5aebd378ce778944a0032c8e057fbe0.png)

I will do some more studies so this code is not yet published.

Error is reported with description (I don´t have your DT\_udtMatrialIn of course, but in your case there can be typo):  
"Client node error on: BUILD EXTENSION OBJ. error: ["Failed to find extension type for nodeId: ns=3;s=DT\_udtMaterialIn error: The node id refers to a node that does not exist in the server address space."]"

---

<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:** [13 January 2023 19:05 UTC](https://discourse.nodered.org/t/opc-ua-extensionobject-simatic-s7-1500/70375/4 "2023-01-13T19:05:31Z")

</div>

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