Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
User Defined Structured Data Type could not autoupdate in client(UaExpert)
January 16, 2023
12:04, EET
Avatar
Jupiter
New Member
Members
Forum Posts: 2
Member Since:
January 16, 2023
sp_UserOfflineSmall Offline

Hi! I am currently using prosysopcua 4.2.0 SDK. In my project, I defined a table structure which includes 6 variables via uaModeler. In practice, the display in the uaExpert is correct and all the value I get is as expected. The problem is, when I changed the value in the server side, using the {uadevice.setTable()} method, the values won’t auto update in the uaExpert. The Source and Server Timestamp also stay the same. Both the Data Access View and the Attribute View have this issue. The problem could be solved by dragging the attribute to Data Access View again or clicking the Refresh Button above the Attributes window. For other basic data types, those values could auto update in the Data Access View together with updated Source and Server Timestamp. Any suggestion in this issue?

January 16, 2023
14:01, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 982
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

That SDK version is old; the latest is 4.10.2 (https://downloads.prosysopc.com/opcua/Prosys_OPC_UA_SDK_for_Java_4_Release_Notes.html), I would recommend updating.

It is not 100% clear what you did code-wise, but I’m going to assume things, let us know if it was this case:

Since you say “using the {uadevice.setTable()}”, I assume here “uadevice” is instance of the (generated) custom structure?
In short, please think of Structures as immutable objects. Technically due to historical reasons they are not (maybe someday they really are, but this is a bit complicated as it would break things), so SDK will have to make a “defensive copy” of the data, thus any update it after giving it to e.g. UaVariable.setValue(DataValue/Variant) wont update the value in the node (since it is not the same structure instance). There are some more details that I skipped, but this should somewhat explain this (assuming it was this case).

January 20, 2023
4:54, EET
Avatar
Jupiter
New Member
Members
Forum Posts: 2
Member Since:
January 16, 2023
sp_UserOfflineSmall Offline

Bjarne Boström said
Since you say “using the {uadevice.setTable()}”, I assume here “uadevice” is instance of the (generated) custom structure?
 

Thanks for the help! Let me briefly explain my OPCUA structure first.
The uadevice is a certain TypeNode. That node contains an attribute named Table, and the corresponding data type is my custom structure. For similar node, assuming there is an attribute named Num, and the data type is Int32, I would use TypeNode.SetNum(). So for this Table attribute, I also using TypeNode.SetTable(). I kind of understand your idea of ‘defensive copy’. Still, I am wondering, isnt OPCUA using the ‘onChange’ idea to update value? And also, if the value in the node is not updated, how come I could get the new value by refreshing? Is there a different layer structure or other mechanism in thisSurprised?
Thanks a lot!

January 20, 2023
11:56, EET
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 319
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

Hello,

Updating to the new version of the SDK is highly recommended due to various security issues that have been fixed between versions 4.2.0 and 4.10.2. Please, update to the latest version of the SDK and let us know if doing that has fixed your issue.

We’re having a bit of trouble understanding your problem. Could you send us screenshots from a generic OPC UA Client application such as Prosys OPC UA Browser or UaExpert that demonstrate the problem and show the relevant part of the AddressSpace of your OPC UA Server? You could also send some snippets of your code if you can show it. That could also help us understand what you’re attempting to do.

You can send the screenshots and the code snippets to uajava-support@prosysopc.com .

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 75

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 709

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1465

Posts: 6252

Newest Members:

christi10l, ahamad1, Flores Frederick, ellenmoss, harriettscherer, shanonhumphreys, KupimotoblokfuB, tamhollander5, paulinafcf, bridgette18l

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 982, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 319, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1