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 Read Value
March 28, 2014
8:16, EET
Avatar
bernd.parchmann
Member
Members
Forum Posts: 7
Member Since:
March 27, 2014
sp_UserOfflineSmall Offline

hi,

i am testing to connect with java to a beckhoff plc over the beckhoff opc ua/da server.

i connected to the server and i created one node. now i want to read the value. but i got errors:
error1:
com.prosysopc.ua.StatusException: (0x80000000) “” StatusCode= (0x80000000) “”
at com.prosysopc.ua.client.UaClient.a(Unknown Source)
at com.prosysopc.ua.client.UAClient.readAttribute(Unknown Source)
at com.prosysopc.ua.client.UAClient.readValue(Unknown Source)
at ClassName.main(ClassName.java:88)

error2:
com.prosysopc.ua.StatusException: Bad_DeviceFailure (0x808B0000) “There has been a failure in the device/data source that generates the value that has affected the value.”
at com.prosysopc.ua.client.UaClient.a(Unknown Source)
at com.prosysopc.ua.client.UAClient.readAttribute(Unknown Source)
at ClassName.main(ClassName.java:88)

My Code:


UaClient client;
String serverUri = “opc.tcp://localhost:4840”;
try
{
NodeId node = new NodeId(4, “GVL_Write.testBool”);

client = new UaClient(serverUri);
client.setSecurityMode(SecurityMode.NONE);
client.connect();

DataValue valueBrowseName = client.readAttribute(node, Attributes.BrowseName); // works
DataValue valueDataType = client.readAttribute(node, Attributes.DataType); // works
DataValue value1 = client.readValue(node); // error2
DataValue value2 = client.readAttribute(node, Attributes.Value); // error1

can anyone help me?

thx!

March 28, 2014
9:20, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Sounds like there is a problem in the PLC / server. Use the Java Client to verify what data is valid and ensure that the PLC is providing the data correctly. The same data should work with your own application.

March 28, 2014
9:51, EET
Avatar
bernd.parchmann
Member
Members
Forum Posts: 7
Member Since:
March 27, 2014
sp_UserOfflineSmall Offline

thx for your reply.

i checked to connect to the opc server. i can connect to it and can see the nodes.
but in an opc ua client i get an error: the values are not readable.
in an opc da client i can read and write the values.

i think, there is an configuration error at the beckhoff plc site…

i try to find the issue!

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
9 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, dalenegettinger

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

Administrators: admin: 1