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
Difference between errorcode and statuscode when subscribing to OPC UA
September 14, 2021
13:54, EEST
Avatar
amj005
Member
Members
Forum Posts: 33
Member Since:
July 27, 2021
sp_UserOfflineSmall Offline

Hi,

I am using subscription to OPC UA and reading values from onDataChange call back method.

I want to understand difference between the status codes under MonitoredDataItem and DataValue.

1. Are monitoredDataItem.errorCode and dataValue.getStatusCode both same?

2. And where can we get the error code when we call client.readValue, because here we do get only DataValue response?

Thanks!

September 14, 2021
14:45, EEST
Avatar
Matti Siponen
Moderator
Members

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

Hello,

1. The StatusCode provided by MonitoredDataItem.getErrorCode() contains error codes related to creation of the MonitoredItem and the StatusCode provided by DataValue.getStatusCode() describes the “quality” of the value.

2. The response of a Read operation doesn’t include separate error codes, but you can check the StatusCodes of the returned DataValues for errors related to Reading the values.

September 15, 2021
16:33, EEST
Avatar
amj005
Member
Members
Forum Posts: 33
Member Since:
July 27, 2021
sp_UserOfflineSmall Offline

Thank you!
So, If I am just focusing on the error of that particular dataValue, I should be just using StatusCode and ignore MonitoredItem altogether right?

September 16, 2021
7:52, EEST
Avatar
Matti Siponen
Moderator
Members

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

Correct, to detect errors in the Value of a Variable, it is sufficient to check the StatusCode provided by the DataValue.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
27 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 681

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com

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

Administrators: admin: 1