Reading model results in StatusResult BadNoMatch

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
bwilli
Jr. Member
Jr. Member
Posts: 3
Joined: 14 Dec 2017, 17:33

Reading model results in StatusResult BadNoMatch

Post by bwilli »

I'm trying to read a very simple struct provided within a control's OPC UA server (the control itself is a B&R controller)

The struct on the server side looks like this:

Code: Select all

JogAchseX_type : 	STRUCT 
    Links : BOOL;
    Rechts : BOOL;
END_STRUCT;
When browsing the type with UAExpert, it's NodeId looks like (sorry, I'm unable to post screenshots, as the forum's attachement quota seems to be reached...):

Code: Select all

NodeId
   NamespaceIndex: 6
   IdentifierType: String
   Identifier: VT$::In_Out:JogAchseX_type
In my C# code the model is defined like this:

Code: Select all

[UaTypeDefinition(NodeId = "JogAchseX_type", NamespaceUri = "VT$::In_Out")]
internal class JogAchseX
{
    [UaInstanceDeclaration()]
    public bool Links { get; set; }
    [UaInstanceDeclaration()]
    public bool Rechts { get; set; }
}
When reading the values with session.Model.Read(nodeId, obj) the modelHandle's LastResult shows 4 StatusCodes:
LastResult[0], LastResult[1] are both 'BadNoMatch',
whereas
LastResult[2], LastResult[3] are both 'Good'.

The Mappings property contains two mappings, each with StatusCode = 'Good'.

The values aren't read successfully. So does someone have an idea what I'm doing wrong?
The struct I'm trying to read is a sub node of another struct, maybe it has something to do with the structure of the model itself?

Thanks,
Bruno

bwilli
Jr. Member
Jr. Member
Posts: 3
Joined: 14 Dec 2017, 17:33

Re: Reading model results in StatusResult BadNoMatch

Post by bwilli »

As I mentioned in my previous post I'm trying to read structs from B&R control OPC-UA server.

The reason for that error was, that the version of the OPC-UA used before was not up to date. After upgrade of the IDE and the runtime to the latest version, one can select the option "Informationmodel 2.0" and after doing so, I'm able to read structs.

Post Reply