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: 1032
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: 1919

Currently Online:
25 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: 728

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1