Hi.
We are having a problem that is getting us mad.
We already made a connection with an OPC UA server that is supposed to be the same! But with this new one it is not working.
The OPC UA tag is an array.
The NodeID is exactly the same that we can see in the UA Expert.
We can write it going directly using UA Expert but we cannot read/write using our application because it gives BadNodeidUnknown.
The id is:
ns=6;s=::AsGlobalPV:OPCServerTag.Box_Code[0]
Any idea? Could it be a server's problem? And how can we find it out?
Other tags of the same OPC UA server are working, the only difference is that they are not arrays.
Thanks for your help.
badnodeidunknown error even if the NodeId is correct
Moderator: Support Team
-
- Full Member
- Posts: 5
- Joined: 02 Feb 2023, 10:00
- Support Team
- Hero Member
- Posts: 3277
- Joined: 18 Mar 2011, 15:09
Re: badnodeidunknown error even if the NodeId is correct
Hi,
no, it can not be a server problem, if UaExpert can read/write it, it will be all fine in the Server. It sounds like a client problem.
You should check the NodeID again, it is most probably wrong. My educated guess is "...[0]" is probably indicating the first element within the array, but not the array. Therefore I doubt that the NodeID is displayed like that in UaExpert. You must browse to the Node in the tree, click it, and check the "AttributeWindow" for NodeID and other attributes (specially ValueRank) details.
no, it can not be a server problem, if UaExpert can read/write it, it will be all fine in the Server. It sounds like a client problem.
You should check the NodeID again, it is most probably wrong. My educated guess is "...[0]" is probably indicating the first element within the array, but not the array. Therefore I doubt that the NodeID is displayed like that in UaExpert. You must browse to the Node in the tree, click it, and check the "AttributeWindow" for NodeID and other attributes (specially ValueRank) details.
Best regards
Unified Automation Support Team
Unified Automation Support Team
-
- Full Member
- Posts: 5
- Joined: 02 Feb 2023, 10:00
Re: badnodeidunknown error even if the NodeId is correct
Hi Support Team,
thanks for your reply.
I can't understand why.
With the other OPC UA server it work, referring to the Node as
ns=6;s=::AsGlobalPV:OPCServerTag.Box_Code[0]
And they are supposed to be the same.
An apparently looking both with UA Expert they are exactly the same.
I didn't check ValueRank. But I will.
Thanks for the while. I'll be back soon
thanks for your reply.
I can't understand why.
With the other OPC UA server it work, referring to the Node as
ns=6;s=::AsGlobalPV:OPCServerTag.Box_Code[0]
And they are supposed to be the same.
An apparently looking both with UA Expert they are exactly the same.
I didn't check ValueRank. But I will.
Thanks for the while. I'll be back soon
- Support Team
- Hero Member
- Posts: 3277
- Joined: 18 Mar 2011, 15:09
Re: badnodeidunknown error even if the NodeId is correct
Hi,
the UaExpert can write to an array, and UaExpert will obtain array dimensions on first receive of data for this array (typically when first time subscribing for the data) or by reading the attributes of the variable.
However, the NodeID (a tripple of information: Namespace, IdentifierType, Identifyer) does not give you the data type of the value. Your assumption that extending the string identifier by square brackets with "[123]" will give you the individual element of that array, is just an assumption, but has nothing to do with the OPC UA standard. Some servers may allow such (non-standard) textual extension for "read-only" operation on an individual array element, but that is serverspecific (old style) register addressing logic and definately does NOT work for writing.
In OPC UA the variable value is consistent over the type, hence you "must" write the whole array (or parts thereof via IndexRange, in case the server supports the IndexRange).
the UaExpert can write to an array, and UaExpert will obtain array dimensions on first receive of data for this array (typically when first time subscribing for the data) or by reading the attributes of the variable.
However, the NodeID (a tripple of information: Namespace, IdentifierType, Identifyer) does not give you the data type of the value. Your assumption that extending the string identifier by square brackets with "[123]" will give you the individual element of that array, is just an assumption, but has nothing to do with the OPC UA standard. Some servers may allow such (non-standard) textual extension for "read-only" operation on an individual array element, but that is serverspecific (old style) register addressing logic and definately does NOT work for writing.
In OPC UA the variable value is consistent over the type, hence you "must" write the whole array (or parts thereof via IndexRange, in case the server supports the IndexRange).
Best regards
Unified Automation Support Team
Unified Automation Support Team