12:04, EET
January 16, 2023
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?
14:01, EET
April 3, 2012
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).
4:54, EET
January 16, 2023
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 this?
Thanks a lot!
11:56, EET
Moderators
February 11, 2020
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 .
Most Users Ever Online: 1919
Currently Online:
49 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 726
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_galleryModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1