10:53, EEST
July 4, 2014
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.
11:15, EEST
December 21, 2011
Most Users Ever Online: 1919
Currently Online:
62 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: 738
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1524
Posts: 6451
Newest Members:
jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettingerModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1