Avatar
Please consider registering
guest
sp_LogInOut Log Insp_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 RSSsp_TopicIcon
Best way to update the status code
August 12, 2020
11:41, EEST
Avatar
VeroB
New Member
Members
Forum Posts: 1
Member Since:
August 12, 2020
sp_UserOfflineSmall Offline

Hello,

I’m using the 3.2.0-690 version of prosys SDK for my OPC server and I use the following method to update the status code of an UaVariable ‘UaVariableNode.setStatus(StatusCode newStatus)’.

However, the status update seems not detected by my connected uaClient (uaExpert or the ProsysSampleClient) (using a subscription on Value attribute). And if the new status is BAD, the value seems not be reset to null (unlike said in the setStatus method javadoc).

All work well if I use the method ‘UaVariableNode.setValue(DataValue newDataValue)’ but i’m not sure is it the right way…

So what is the best way to update the StatusCode of an UaVariable and ensure it is well detected by the Uaclient ?

August 17, 2020
8:48, EEST
Avatar
Matti Siponen
Moderator
Members

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

Hello,

UaVariableNode.setStatus(StatusCode newStatus) is a convenience method that calls UaVariableNode.setValue(DataValue newDataValue) with a new DataValue based on the current DataValue. While this isn’t mentioned in the Javadoc, setStatus method does nothing if the current DataValue is null. The logging output of the method could be improved to inform the user when this happens.

setStatus method isn’t tested in integration tests, which means that there might be conditions that cause it to not work as intended. In the meantime, I would recommend using UaVariableNode.setValue(DataValue newDataValue) method instead as that method has been tested in multiple integration tests.

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 76
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 100
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 773
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1558
Posts: 6567
Newest Members:
aracelyhaley4, raphaelschonell, Ashmag, kathyreimann56, brittanylemos, dorthycundiff76, PromotionToold, CHHinrichs, rodricklienhop, jose_Wanderlei
Moderators: Jouni Aro: 1039, Pyry: 1, Petri: 1, Bjarne Boström: 1054, Jimmy Ni: 26, Matti Siponen: 359, Lusetti: 0
Administrators: admin: 1