8:35, EET
January 16, 2020
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..?
10:56, EET
April 3, 2012
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).
Most Users Ever Online: 1919
Currently Online:
14 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: 736
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1524
Posts: 6450
Newest Members:
kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, ThomassnismModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1