Skip to content

OPC UA Structs Reading

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.


Any ideas? Thank you in advance.

Comments

  • Complex data types like structures are not currently supported as single OPC UA server variables on PLCnext Control devices. This is a popular and long-standing feature request that is currently scheduled for firmware version 2025.6.

  • Hi Martin,

    do you have a release plan (date) when this new feature is implemented into the new plcnext firmware? Right now we have a new product line where we need this feature to do the switch from the ilc controller to the plcnext framework.

    Greetings

    Stephan

  • Hi dimitri,

    this feature is still scheduled for 2025.6.

    As soon as the FW 2025.0 (end of April) is done, we will fix the time schedule.

    BR,

    Frank

Sign In or Register to comment.