Question On Accessing Structures

Questions regarding the use of UaModeler

Moderator: uamodeler

Post Reply
bradleyward
Sr. Member
Sr. Member
Posts: 11
Joined: 25 Nov 2013, 21:38

Question On Accessing Structures

Post by bradleyward »

Yesterday I spent time using UaModeler for the first time. I was working through the example on how to us UaModeler to create code that will access structured data in the device.

I got stuff running, but never did quite get structure to successfully work. But I've come to the conclusion that the reason that my code was not able to read the structure may well have more to do with the capabilities of the OPC Server I was hitting than it does anything related to my client side OPC-UA code.

So let me ask a few general questions about how accessing structures is supposed to work and see if any of you can help me.

In my particular case, the device I'm communicating with is an Allen Bradley Control Logic device. At the current time, I'm using the demo version of the Kepware OPC Server as my server. In my troubleshooting, I finally discovered some documentation in the Kepware driver for the AB Control Logic that said that the only addressing syntax supported by that particular drive was "atomic", i.e. the addressing of individual tags. It seemed to say that the addressing of a complete data structure was not supported.

Am I correct that the "complete picture" must also include the capabilities of not only the OPC Server but also the driver level of that OPC Server?

As a follow on question, does anyone off the top of their head know of a OPC server/driver side solution that would support me doing data structure reads/writes using OPC-UA?

Thanks,

Brad

User avatar
Support Team
Hero Member
Hero Member
Posts: 3069
Joined: 18 Mar 2011, 15:09

Re: Question On Accessing Structures

Post by Support Team »

Hi Brad,

There are some general clarifications necessary
- The information available for communication (objects, variables, object types, data types including structure data types) is defined by the OPC UA server. Types and instances defined in one namespace are also called information model.
- The OPC UA server does typically encapsulate an existing system (Allen Bradley Control Logic device in your case)
- The available functionality is defined by the OPC UA Server and it's communication to the existing system. For the Kepware server it is the general OPC UA server functionality available and the driver you want to use.
- The client can only consume what the server provides

The UaModeler is a tool used to design 'static' information models including structure data types and to either create code for the model or to store the model in an UANodeSet XML file. In both cases the main use case is to provide this information model in a server application by either compiling the generated code into the server or by loading the UANodeSet XML file in the server. For the client side it is possible to generate also classes / code for handling 'static' structure data types known at compile time. The new UaModeler version 1.3.1 (available later this week) will support this now also for the new C++ SDK version 1.4.

In your application the structure data types are typically not 'static' and are typically not known at compile time of the client application since they are defined by the PLC programmer (programmer of the Allen Bradley Control Logic device). OPC UA is also able to handle dynamic structure data types defined during runtime or changed during runtime. The OPC UA server must provide a data type description and the client is able to read this data type description. But it is difficult to use this functionality if there is no simplification provided by the client side SDK.

The new C++ SDK version 1.4 provide such support for dynamic structure data types. The other client side SDKs will follow soon.
You can find sample code already in the C++ Client SDK example. See the following link as starting point:
http://documentation.unified-automation ... ample.html
client_cpp_sdk.cpp -> Read and the DataChange contains sample code for accessing a unknown structure delivered by the server.

Online Development Inc. (OLDI) announced an OPC UA server module for ControlLogix that supports structure data types. They demonstrated the structure access through OPC UA at the Rockwell event end of 2013. If you go to there website and search for OPC UA you will find the product announcement.

Best Regards,
Unified Automation Support Team

bradleyward
Sr. Member
Sr. Member
Posts: 11
Joined: 25 Nov 2013, 21:38

Re: Question On Accessing Structures

Post by bradleyward »

Excellent, informative reply. Many thanks!

Post Reply