Why is StatusCode 'Good' when writing to non-existing node? #1373
jmass172023
started this conversation in
General
Replies: 1 comment 1 reply
-
The return code is send by the server and we check for every result. So either the node exists or the server does send a StatusCode Good. Best way to check this is to make a wireshark trace. There you can see the Statuscodes send by the server. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a python script that loads multiple node ids from a config file and writes values to them. I was checking the returned status code to see if the write operation was successful but it doesn't seem to catch if a tag name is invalid. One of the tag names was misspelled but the returned status code after the write says it was 'Good'. Why is that?
#sample write of multiple values
nodes =[]
values=[]
nodes.append(client.get_node('ns=2;s=Test1'))
nodes.append(client.get_node('ns=2;s=Test2'))
nodes.append(client.get_node('ns=2;s=Test3'))
nodes.append(client.get_node('ns=2;s=X')) # This node name is invalid but get Good status on write
values.append(ua.DataValue(ua.Variant('One11', ua.VariantType.String)))
values.append(ua.DataValue(ua.Variant('Two22', ua.VariantType.String)))
values.append(ua.DataValue(ua.Variant('Three33', ua.VariantType.String)))
values.append(ua.DataValue(ua.Variant('Four44', ua.VariantType.String)))
Beta Was this translation helpful? Give feedback.
All reactions