Hello,
I am trying to connect to a PLCnext Controller which is set up as an OPC UA server and has several nodes.
I have tried to connect using 3 different libraries (QuickOPC, UAfx, OPCfoundation) in my C# code, but the problem is that when I try to browse a variable which is of type „Struct“ in my PLCnext Engineer, then I get the following error:
{Code=[2150891520]: BadNodeIdUnknown - The node id refers to a node that does not exist in the server address space.}
This is the way that I create structs in my C# Library which I use in my PLCnext Engineer Project:
[Structure]
public struct Position
{
// the fields must be public as well as the struct itself
[DataType(„DINT“)]
public int x;
[DataType(„DINT“)]
public int y;
}
What is really weird is that when I use the program „UAexpert“ as suggested in your documentation, then when I connect to my PLCnext Controller, the program successfully depicts the whole tree structure with the so called structs that I have correctly.
I also noticed that my structs in „UAexpert“ appear as a folder, whereas the built-in objects have a different icon before them.
image.png
Any ideas? Thank you in advance.