Hi All,
I am new to node-red and I am developing a simulation environment for a PLC using OPC-UA. I added some values to the OPCUA server in the PLC, and tested them in UAExpert Client:
One of them is a boolean, to enable the simulation
Other are boolean arrays of elements, for the simulated inputs and outputs
The problem comes in the web environment, when I try to simulate a fault in the system by toggling an element on the array (I have tried the Boolean and it works fine).
In OpcUa-Item node, I added:
For the Simulation boolean:
Item: "ns=4;s=Root.SimulationON"
Type: "Boolean"
Name: "SimON"
For the Fault bit into the Array
Item: "ns=4;s=Root.DIArraySim[17]"
Type: "Boolean"
Name: "109U01_Fault"
After Deploying , I flicked the a switch and only the simulation boolean works, but the element in the array cannot be found. It shows error The node id refers to a node that does not exist in the server address space
I could not find any reference to this in any forum. I have been trying different things but nothing worked. Perhaps I am missing something simple.
I attach the nodes so you can have a look.
[
{
"id": "54b85cea1233730f",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "921f7afec8789911",
"type": "OpcUa-Item",
"z": "54b85cea1233730f",
"item": "ns=4;s=Root.SimulationON",
"datatype": "Boolean",
"value": "",
"name": "SimON",
"x": 560,
"y": 200,
"wires": [
[
"e3c148c343a44193"
]
]
},
{
"id": "d6bf2d5d03473384",
"type": "OpcUa-Item",
"z": "54b85cea1233730f",
"item": "ns=4;s=Root.DIArraySim[17]",
"datatype": "Boolean",
"value": "",
"name": "109U01_Fault",
"x": 580,
"y": 260,
"wires": [
[
"e3c148c343a44193"
]
]
},
{
"id": "e3c148c343a44193",
"type": "OpcUa-Client",
"z": "54b85cea1233730f",
"endpoint": "e49ccceb2c1debc5",
"action": "write",
"deadbandtype": "a",
"deadbandvalue": 1,
"time": "1",
"timeUnit": "s",
"certificate": "n",
"localfile": "",
"localkeyfile": "",
"securitymode": "None",
"securitypolicy": "None",
"useTransport": false,
"maxChunkCount": "",
"maxMessageSize": "",
"receiveBufferSize": "",
"sendBufferSize": "",
"setstatusandtime": false,
"keepsessionalive": false,
"name": "OPCUA_WRITE",
"x": 800,
"y": 200,
"wires": [
[],
[],
[]
]
},
{
"id": "5dc7af7298669d90",
"type": "ui_switch",
"z": "54b85cea1233730f",
"name": "",
"label": "SimulationON",
"tooltip": "",
"group": "212183c70d99713f",
"order": 1,
"width": 0,
"height": 0,
"passthru": false,
"decouple": "false",
"topic": "topic",
"topicType": "msg",
"style": "",
"onvalue": "true",
"onvalueType": "bool",
"onicon": "",
"oncolor": "",
"offvalue": "false",
"offvalueType": "bool",
"officon": "",
"offcolor": "",
"animate": false,
"className": "",
"x": 360,
"y": 200,
"wires": [
[
"921f7afec8789911"
]
]
},
{
"id": "92bf8898f2056fbc",
"type": "ui_switch",
"z": "54b85cea1233730f",
"name": "",
"label": "109U01_Fault",
"tooltip": "",
"group": "212183c70d99713f",
"order": 1,
"width": 0,
"height": 0,
"passthru": true,
"decouple": "false",
"topic": "topic",
"topicType": "msg",
"style": "",
"onvalue": "true",
"onvalueType": "bool",
"onicon": "",
"oncolor": "",
"offvalue": "false",
"offvalueType": "bool",
"officon": "",
"offcolor": "",
"animate": false,
"className": "",
"x": 360,
"y": 260,
"wires": [
[
"d6bf2d5d03473384"
]
]
},
{
"id": "e49ccceb2c1debc5",
"type": "OpcUa-Endpoint",
"endpoint": "opc.tcp://192.168.147.4:48020",
"secpol": "None",
"secmode": "None",
"none": true,
"login": false,
"usercert": false,
"usercertificate": "",
"userprivatekey": ""
},
{
"id": "212183c70d99713f",
"type": "ui_group",
"name": "DevBox01",
"tab": "2d0adb55be7122fc",
"order": 1,
"disp": true,
"width": 6,
"collapse": false,
"className": ""
},
{
"id": "2d0adb55be7122fc",
"type": "ui_tab",
"name": "Profelis",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
}
]
Kind regards