Hello,
I'm developing an OPC UA server based on open62541 stack. I have implemented several structure types without any problem, but now UAExpert has started behaving in a strange way.
I'm using version 1.7.1.540 of UAExpert.
My structure data type is named "PrintJob" and is made up of 9 fields.
In my C++ code "PrintJob" data is internally mapped to the following structure:
typedef struct
{
UA_Guid uuid;
UA_String displayName;
UA_String productionOrder;
UA_UInt16 imagesCount;
UA_String printMode;
UA_String printMedium;
UA_String printFormat;
UA_DateTime creationTimestamp;
UA_Boolean belongsToPrintQueue;
} PrintJob;
If I browse to "Types/DataTypes/BaseDataType/Structure/PrintJob" the correct data type definition is shown in the Attributes window. The definition of each structure field is interpreted correctly by UAExpert.
I have added a data variable whose value must be an array of PrintJob structures.
The browse to this node works perfectly and in the Attributes window I see all the elements of the array correctly.
Unfortunately, if I drag the node onto the Data Access View I cannot see the elements of the array by clicking on "Value".
Where could I go wrong? Any help would be appreciated.
Thanks,
Carlotta Patrucco
Problem With Arrays of Structures
Moderator: uaexpert
-
- Jr. Member
- Posts: 3
- Joined: 19 Dec 2023, 17:56
- Support Team
- Hero Member
- Posts: 3078
- Joined: 18 Mar 2011, 15:09
Re: Problem With Arrays of Structures
Hi,
your open server is probably not delivering any useful data for the structures you have created.
Note: the UaExpert "Attribute-Window" is doing a rather expensive individual ReadCall on all the available attributes of one individuall node. In contrast thereto the "DA-View" is just "subscribing" for value change of one (or many) nodes. As long as there is nothing sent (no value changed) by the server, or everything is initially empty or null, there is no usefull value to be displayed in DA-View.
That said, I can see no issue in UaExpert here. You may need to implement the data source and provide real data with your server.
your open server is probably not delivering any useful data for the structures you have created.
Note: the UaExpert "Attribute-Window" is doing a rather expensive individual ReadCall on all the available attributes of one individuall node. In contrast thereto the "DA-View" is just "subscribing" for value change of one (or many) nodes. As long as there is nothing sent (no value changed) by the server, or everything is initially empty or null, there is no usefull value to be displayed in DA-View.
That said, I can see no issue in UaExpert here. You may need to implement the data source and provide real data with your server.
Best regards
Unified Automation Support Team
Unified Automation Support Team
-
- Jr. Member
- Posts: 3
- Joined: 19 Dec 2023, 17:56
Re: Problem With Arrays of Structures
Thanks for the answer, but I would like to point out that the server is actually valuing the variable with an array of 5 elements that can be correctly read in the Attributes window, as you can easily understand from this image below.
In the Attributes window I see the 5 elements that make up the array, but these elements are not displayed in the Edit Value dialog
In the Attributes window I see the 5 elements that make up the array, but these elements are not displayed in the Edit Value dialog
-
- Jr. Member
- Posts: 3
- Joined: 19 Dec 2023, 17:56
Re: Problem With Arrays of Structures
Hi,
I no longer received any replies and I wanted to say that I have developed my own test client and that I have absolutely no problems seeing the definition and interpreting the value of my structured data.
I reinsert accidentally deleted images here:
I no longer received any replies and I wanted to say that I have developed my own test client and that I have absolutely no problems seeing the definition and interpreting the value of my structured data.
I reinsert accidentally deleted images here:
- Support Team
- Hero Member
- Posts: 3078
- Joined: 18 Mar 2011, 15:09
Re: Problem With Arrays of Structures
Hi,
the log window of UaExpert may give a hint. There seems to be an encoding error because of exceeded length, and the publish does not work, but is required for the DA-View (because DA-View is creating subscription and monitored item).
To get more information, you additionally can enable trace functionality in UaExpert (and increase trace level) to get more details.
the log window of UaExpert may give a hint. There seems to be an encoding error because of exceeded length, and the publish does not work, but is required for the DA-View (because DA-View is creating subscription and monitored item).
To get more information, you additionally can enable trace functionality in UaExpert (and increase trace level) to get more details.
Best regards
Unified Automation Support Team
Unified Automation Support Team