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
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: 319
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: 518

Currently Online:
22 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

ibrahim: 75

rocket science: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 708

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