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: 1026
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: 1026
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: 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: 731

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

inilarythikibia, rickykennion, PromotionToold, HypromeImpupe, toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466

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

Administrators: admin: 1