Hello,
When I try to write data to a tag I get the following error message.
Bad_NotWritable: The access level does not allow writing to the Node.
I have created a few API endpoints using Web Dev as follows:
createTags - doPost
basePath = request['data']['basePath']
tags = request['data']['tags']
collisionPolicy = request['data']['collisionPolicy']
result = system.tag.configure(basePath, tags, collisionPolicy)
return {'json': result}
tag - doPost
paths = request['data']['paths']
values = request['data']['values']
result = system.tag.writeBlocking(paths, values)
return {'json': result}
I create an additional tag in the Tag Provider [Sample_Tags]
by calling createTags - doPost
with the following body:
{
"basePath": "[Sample_Tags]/Writeable",
"tags": [
{
"name": "DeviceEUI",
"opcItemPath" : "ns=2;s=[Sample_Tags]_Meta:Writeable/DeviceEUI",
"opcServer": "Ignition OPC UA Server",
"valueSource": "opc"
}
],
"collisionPolicy": "o"
}
The tag is created with the following result: (192 = “good”)
[
{
"code": 192
}
]
If I want to write data to the tag using tag - doPost
with the following body:
{
"paths": ["[Sample_Tags]/Writeable/DeviceEUI", "[Sample_Tags]/Writeable/WriteableBoolean1"],
"values": [12345, false]
}
I get the following message:
[
{
"code": -2147483136,
"diagnosticMessage": "Bad_NotWritable: The access level does not allow writing to the Node."
},
{
"code": 192
}
]
So the predefined tag WriteableBoolean1 has a result of 192 = “good”. The other tag DeviceEUI that I defined myself gets an error message.
I suspect this is because I am trying to write to a tag which does not originates from a device that is defined in Ignition?
If so, how can I write to a tag which I have created dynamically from an external program (using the Web Dev API) and write to it? (using the same Web Dev API)
Thanks,
Simon.