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:
Maybe someone can help to fix my problem. Please ask if you need more information.
Here is my flow:
[
{
"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