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
StatusException : Bad_NotReadable while trying to write value(s)
July 4, 2014
10:53, EEST
Avatar
sami.rantamaki
New Member
Members
Forum Posts: 2
Member Since:
July 4, 2014
sp_UserOfflineSmall Offline

Hi!

Here’s the thing; I’m developing a Java software that reads (and writes) values to Beckhoff-logic with OPC UA. Person responsible for the automation programming started his summer vacation this week. But, he insists that everything is ok with Beckhoff and I’m inclined to believe him since he knows what he’s doing.

So far, there are only 3 values that I’d like to write via OPC UA; outside temperature and 2 pump speeds. Have had no issues, whatsoever, with writing the outside temperature (it’s Double in Beckhoff, I use float), but I just can’t write those pump control-values (percentage, Integer on Beckhoff, int(eger) on java).

Here’s a simple debug, containing the value, type, namespace and nodeId (some names have been changed to protect the innocent)

GOING TO WRITE –> value: 15.8 , type : float , namespace: 4 , nodeId: GVL.XXXXXX_Out_Temp
System write successful: true

GOING TO WRITE –> value: 72 , type : int , namespace: 4 , nodeId: GVL.PU1_1.Pos_XXXXXX
Error while printing! StatusException: com.prosysopc.ua.StatusException: Bad_NotReadable (0x803A0000) “The access level does not allow reading or subscribing to the Node.” StatusCode=Bad_NotReadable (0x803A0000) “The access level does not allow reading or subscribing to the Node.”

GOING TO WRITE –> value: 66 , type : int , namespace: 4 , nodeId: GVL.PU1_2.Pos_XXXXXX
Error while printing! StatusException: com.prosysopc.ua.StatusException: Bad_NotReadable (0x803A0000) “The access level does not allow reading or subscribing to the Node.” StatusCode=Bad_NotReadable (0x803A0000) “The access level does not allow reading or subscribing to the Node.”

So, based on those StatusExceptions, I’m somewhat sceptical that is there truly something wrong with the SDK, with my code or are the values somehow locked on logic’s side?

Here’s some ripped-of, modified (only for clarity) code that shows what is done:

int externalValueToWriteInt = 0;
// boolean, int, float, double… own method for each, based on unitType
// all data from external objects, here declared static for simplicity
String externalValueToWrite = “10”;
String unitType = “int”;
int nameSpaceIndexToWrite = 4;
String channelNodeIdToWrite = GVL.PU1_1.Pos_XXXXXX;
NodeId noodi = new NodeId(nameSpaceIndexToWrite,channelNodeIdToWrite);
System.out.println(“GOING TO WRITE –> value: “+externalValueToWrite+ ” , type : “+unitType+” , namespace: “+nameSpaceIndexToWrite+” , nodeId: “+channelNodeIdToWrite);
try{
externalValueToWriteInt = Integer.parseInt(externalValueToWrite);
boolean status = client.writeValue(noodi, externalValueToWriteInt);
System.out.println(“System write successful: “+status);
} catch( ServiceException e ) {
System.out.println(“Error while printing! ServiceException: “+e);
} catch( StatusException se ) {
System.out.println(“Error while printing! StatusException: “+se);
}

Operation is exactly the same when trying to write/writing float-values. Only the unitType and unit conversion ( Integer.parseInt() vs Float.parseFloat() ) differ. Is this problem on my software side or on the automation side?

Thank you.

July 4, 2014
11:15, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

The Bad_NotReadable comes from the server. The SDK does not do anything except for calling the Write method in the server.

Oddly enough, the expected error should be Bad_NotWritable, if the write fails (due to AccessLevel restrictions, for example), not Bad_NotReadable.

July 4, 2014
11:29, EEST
Avatar
sami.rantamaki
New Member
Members
Forum Posts: 2
Member Since:
July 4, 2014
sp_UserOfflineSmall Offline

Ok, so I’ll just wait until my colleague comes back to work then. Thank you for the fast reply!

July 4, 2014
12:33, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

You can of course verify this with another cline as wellt, for example with UaExpert.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
23 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

fred: 41

Member Stats:

Guest Posters: 0

Members: 685

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

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

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