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: 1015
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: 1015
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:
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 142

pramanj: 86

Francesco Zambon: 83

rocket science: 82

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 704

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1482

Posts: 6316

Newest Members:

samui, TommyDab, wross, Jeremyknock, Pedromon, DonaldEdism, Miguelplese, Scotanine, katesalas95, Petertum

Moderators: Jouni Aro: 1015, Pyry: 1, Petri: 0, Bjarne Boström: 994, Jimmy Ni: 26, Matti Siponen: 330, Lusetti: 0

Administrators: admin: 1