The ADS protocol has multiple read nodes, how can I merge these multiple nodes into a json object return?
[
{
"id": "290b97f1.b47728",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "553c6fb5d084219e",
"type": "ads-client-read-symbol",
"z": "290b97f1.b47728",
"name": "",
"connection": "82213e1dd369b8d5",
"variableName": "MES.DateYear",
"x": 430,
"y": 160,
"wires": [
[
"ebf575d1a911b1b6"
]
]
},
{
"id": "c3b697e74d69fef3",
"type": "inject",
"z": "290b97f1.b47728",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 170,
"y": 160,
"wires": [
[
"553c6fb5d084219e",
"3c80f9ed80acda4c",
"648b24b98561ef3e",
"de089b6ccb897f81",
"c0e1b939c166190c",
"5ed65f03582aab6c"
]
]
},
{
"id": "3c80f9ed80acda4c",
"type": "ads-client-read-symbol",
"z": "290b97f1.b47728",
"name": "",
"connection": "82213e1dd369b8d5",
"variableName": "MES.DateMonth",
"x": 430,
"y": 200,
"wires": [
[
"ebf575d1a911b1b6"
]
]
},
{
"id": "648b24b98561ef3e",
"type": "ads-client-read-symbol",
"z": "290b97f1.b47728",
"name": "",
"connection": "82213e1dd369b8d5",
"variableName": "MES.DateDay",
"x": 430,
"y": 240,
"wires": [
[
"ebf575d1a911b1b6"
]
]
},
{
"id": "de089b6ccb897f81",
"type": "ads-client-read-symbol",
"z": "290b97f1.b47728",
"name": "",
"connection": "82213e1dd369b8d5",
"variableName": "MES.DateHour",
"x": 430,
"y": 280,
"wires": [
[
"ebf575d1a911b1b6"
]
]
},
{
"id": "c0e1b939c166190c",
"type": "ads-client-read-symbol",
"z": "290b97f1.b47728",
"name": "",
"connection": "82213e1dd369b8d5",
"variableName": "MES.DateMinute",
"x": 440,
"y": 320,
"wires": [
[
"ebf575d1a911b1b6"
]
]
},
{
"id": "5ed65f03582aab6c",
"type": "ads-client-read-symbol",
"z": "290b97f1.b47728",
"name": "",
"connection": "82213e1dd369b8d5",
"variableName": "MES.DateSecond",
"x": 440,
"y": 360,
"wires": [
[
"ebf575d1a911b1b6"
]
]
},
{
"id": "8db6eca91159315f",
"type": "debug",
"z": "290b97f1.b47728",
"name": "debug 2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 920,
"y": 160,
"wires": []
},
{
"id": "ebf575d1a911b1b6",
"type": "function",
"z": "290b97f1.b47728",
"name": "function 1",
"func": "\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 720,
"y": 180,
"wires": [
[
"8db6eca91159315f"
]
]
},
{
"id": "82213e1dd369b8d5",
"type": "ads-client-connection",
"name": "",
"targetAmsNetId": "5.100.225.118.1.1",
"targetAdsPort": "851",
"objectifyEnumerations": true,
"convertDatesToJavascript": true,
"readAndCacheSymbols": false,
"readAndCacheDataTypes": false,
"disableSymbolVersionMonitoring": false,
"routerTcpPort": "",
"routerAddress": "",
"localAddress": "",
"localTcpPort": "",
"localAmsNetId": "",
"localAdsPort": "",
"timeoutDelay": "",
"hideConsoleWarnings": false,
"autoReconnect": true,
"reconnectInterval": "",
"checkStateInterval": "",
"connectionDownDelay": "",
"allowHalfOpen": false,
"disableBigInt": false,
"debuggingLevel": "",
"bareClient": false
}
]
Perhaps the join node?
See this article in the cookbook for an example of how to join messages into one object.
Okay, I'll see if it works
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.