Hi All,
Been developing a Node-red flow as a client to commission one of my power supplies. the PSU control has an OPCUA Server.
I have quite a few variables, but not what I would say excessive at this point, but I'm getting some issues, when I deploy the flow after making a change to it, that are unexpected... I'm thinking that it could be that it is putting a heavy load on the server, but I have no experience on this.
I would be interesting to find out,
if this is a valid way of doing this or will it put a large data load on the server, specially at deploy.
I also used the subscribe function instead, with similar results.
What I notice on the node-red side is, as I keep on deploying without restarting the server, the amount of failed to connect, closed connections and attempts to reconnect increase. I even get bad node for nodes that were working fine until then.
to write I used Multiple write and this for each variable:
[
{
"id": "3be572c2353429f9",
"type": "function",
"z": "124ddb04fdd67a5f",
"name": "T0_init",
"func": "//let rampUpTime = 100;\nmsg.payload = 0;\n\n\nreturn msg;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 120,
"wires": [
[
"9e4372c7da854cf9"
]
]
},
{
"id": "9e4372c7da854cf9",
"type": "ui_text_input",
"z": "124ddb04fdd67a5f",
"name": "",
"label": "T0 (uS)",
"tooltip": "",
"group": "c6eb6a77f74a11c6",
"order": 1,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": "100",
"topic": "topic",
"sendOnBlur": true,
"className": "",
"topicType": "msg",
"x": 580,
"y": 120,
"wires": [
[
"b3c125afc973d6fa"
]
]
},
{
"id": "b3c125afc973d6fa",
"type": "OpcUa-Item",
"z": "124ddb04fdd67a5f",
"item": "ns=2;s=l_setpoint_T0",
"datatype": "Float",
"value": "",
"name": "l_setpoint_T0_item",
"x": 870,
"y": 120,
"wires": [
[
"d4759c17cd85df63",
"8118a0797d9381bc"
]
]
},
{
"id": "c6eb6a77f74a11c6",
"type": "ui_group",
"name": "Group 6",
"tab": "13bb6c04f22ad796",
"order": 6,
"disp": true,
"width": 6
},
{
"id": "13bb6c04f22ad796",
"type": "ui_tab",
"name": "Commisioning",
"icon": "dashboard",
"order": 15,
"disabled": false,
"hidden": false
}
]
To Read Data I used this for each variable shoud I use the read multiple instead?
[
{
"id": "0bc4ad0e4dae671e",
"type": "OpcUa-Client",
"z": "124ddb04fdd67a5f",
"endpoint": "8c3cfb1c3a6bfcba",
"action": "subscribe",
"deadbandtype": "a",
"deadbandvalue": 1,
"time": "200",
"timeUnit": "ms",
"certificate": "n",
"localfile": "",
"localkeyfile": "",
"securitymode": "None",
"securitypolicy": "None",
"useTransport": false,
"maxChunkCount": 1,
"maxMessageSize": 8192,
"receiveBufferSize": 8192,
"sendBufferSize": 8192,
"setstatusandtime": false,
"keepsessionalive": false,
"name": "IX_OPCUA",
"x": 650,
"y": 840,
"wires": [
[
"aa8bd2ba77365fb8"
],
[],
[]
]
},
{
"id": "1119b5fc1689d885",
"type": "OpcUa-Item",
"z": "124ddb04fdd67a5f",
"item": "ns=2;s=d_setpoint_T0",
"datatype": "Float",
"value": "",
"name": "d_setpoint_T0_item",
"x": 350,
"y": 840,
"wires": [
[
"0bc4ad0e4dae671e"
]
]
},
{
"id": "8c3cfb1c3a6bfcba",
"type": "OpcUa-Endpoint",
"endpoint": "opc.tcp://128.178.126.43:4840/Anonymous",
"secpol": "None",
"secmode": "None",
"none": true,
"login": false,
"usercert": false,
"usercertificate": "",
"userprivatekey": ""
}
]
So I guess what I'm asking is:
- Will the subscribe function on the OpcUa-Client be a better option?
- Is the register node a better option?
- if you subcribe, at re-deploy, do I need to unsubscribe first?
- I'm I doing this the wrong way.
- what is the way will put the lowest load on the server.
Hope this makes sense, let me know if you need further info.
Kind regards
Luis