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
Unable to perform write operation
January 17, 2020
8:35, EET
Avatar
prasha173
Member
Members
Forum Posts: 9
Member Since:
January 16, 2020
sp_UserOfflineSmall Offline

Hi ,
I am trying to write value on server but I am getting following exception.

Exception in thread “main” com.prosysopc.ua.StatusException: Bad_NotWritable (0x803B0000) “The access level does not allow writing to the Node.” StatusCode=Bad_NotWritable (0x803B0000) “The access level does not allow writing to the Node.”

Getting exception on following line –

client.writeValue(Identifiers.Server_ServerStatus_State,25);

As i can see error is related to access level then how can i change that access level and where on server side or at client side..?

January 17, 2020
10:56, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Well you are trying to write to a node which I have not seen _any_ server to allow writing. That node exposes the current internal state of the server, you cannot write to it as that is controlled by the server, which is why you see the standard error code that this is not allowed. The node which you want to write must have Attributes AccesssLevel and UserAccessLevel having the CurrentWrite bit set (tough technically it is still allowed to fail, but the UserAccessLevel doesn’t have that then it wont allow at all). These are handled by the server.

Per you previous post I would recommend first trying to learn OPC UA by using grapchical clients and tools, such as: https://www.prosysopc.com/products/opc-ua-simulation-server/, https://www.prosysopc.com/products/opc-ua-browser/, https://www.unified-automation.com/products/development-tools/uaexpert.html plus maybe demo servers (https://www.unified-automation.com/downloads/opc-ua-servers.html).

Some good nodes to practice writing on is e.g. on Simulation Server’s (see link above) Objects/StaticData/StaticVariables/* or SampleConsoleServer equivalent Objects/ComplianceNodes/StaticVariables/*. Additionally for creating them see com.prosysopc.ua.samples.server.compliancenodes.ComplianceNodeManager in the SampleConsoleServer example.

P.S.
If you instead meant how to actually e.g. try to shutdown the server or change it to another state, then that would need to be done via RequestServerStateChange Method on the Server Object node. And in the case of our Java SDK, in order for that to be enabled in an application additionally an UaServerListener would have been have to set for the UaServer object in order to handle/allow that Call (the listener would do e.g. user authorization and any application specific logic).

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 677

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule, rashadbrownrigg, christi10l, ahamad1

Moderators: Jouni Aro: 1009, 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