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
Error with try write val of node Bad_UserAccessDenied
October 23, 2019
12:52, EEST
Avatar
Fervic1991
New Member
Members
Forum Posts: 2
Member Since:
October 23, 2019
sp_UserOfflineSmall Offline

Hi everyone
i’m trying to modified the value of node but every time the compiler say the next error : Bad_UserAccessDenied (0x801F0000) “User does not have permission to perform the requested operation.”
the authentication is Anonymus.
I’m create the next method :

public void setNodeId(ExpandedNodeId node , Object val)
{
try
{
UaNode mt = client.getAddressSpace().getNode(node);
if(mt instanceof UaVariable)
{
boolean status = client.writeValue(node.ID, val);
}
}
catch( Exception e )
{
System.out.println(e.getMessage())
}
}

Thanks

October 23, 2019
15:25, EEST
Avatar
Teppo Uimonen
Moderator
Members

Moderators
Forum Posts: 21
Member Since:
November 28, 2018
sp_UserOfflineSmall Offline

Hi,

when you’re trying to write the values, you’re using parameter ‘node.ID’. However, this refers to the NodeId of type ‘ExpandedNodeId’. Since ExpandedNodeId is an OPC UA specific type, you don’t have access to change its attributes.

I suppose, you would want to write to the same node that you’re getting as an ExpandedNodeId object in your function. There are some ways to get the corresponding NodeId object but in your case you should just be able to use your UaNode object mt and write as follows:

boolean status = client.writeValue(mt.getNodeId(), val);

Hope this helps 🙂

October 24, 2019
11:15, EEST
Avatar
Fervic1991
New Member
Members
Forum Posts: 2
Member Since:
October 23, 2019
sp_UserOfflineSmall Offline

Thanks It’swork
you’re the best

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
18 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 75

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 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