13:12, EET
December 13, 2016
Hi,
I am able to read the values from the server. am getting output like this
DataValue(value=780, statusCode=GOOD (0x00000000) “”, sourceTimestamp=12/16/16 10:34:02.1800000 GMT, sourcePicoseconds=0, serverTimestamp=12/16/16 10:34:02.1810000 GMT, serverPicoseconds=0)
My question is can we get like this “780” just the value. i am trying to implement read function in GUI, so i just need to read the value of tag.
Need your suggestion please!!
Thanks.
14:27, EET
April 17, 2013
15:54, EET
December 13, 2016
17:00, EET
April 17, 2013
13:05, EET
March 9, 2017
Hi Tony and Tahvanainen,
I am new to this stuffs, and not good in coding though, I have faced the same problem as you encountered did you get any solutions, I Can able to get the data values in normal way and I tried to use the variant method as Heikki mentioned and I have some error in that, I have posted my code and it has error
I tried like this also
DataValue value = client.readValue(NodeId.parseNodeId(“ns=5;s=Counter1”));
System.out.println(“DataValue object=” + value);
System.out.println(“value2=” + value.getValue().getValue());
I am trying to read the value from the counter1. Can you guys provide your information and this. it would be nice.
Thanks
13:35, EET
April 17, 2013
Hi,
Please explain the error that you receive. The posted code is fine.
Without knowing more about the situation, I would guess that the error message is Bad_NodeIdUnknown “The node id refers to a node that does not exist in the server address space.”
This means that the OPC UA server in question does not contain the Counter1 node.
15:49, EET
March 9, 2017
Hi Heikki,
It works fine now I think I made some changes in the code so that the error message came. Thanks for your feedback.
Now I have another task which is I need to print the serverTimestamp as a separate output. I tried the same procedure i.e
DataValue dv = client.readValue(NodeId.parseNodeId(“ns=5;s=Counter1”));
System.out.println(“DataValue object=” + dv);
System.out.println(“value=” + dv.getServerTimestamp().getServerTimestamp());
or
System.out.println(“value=” + dv.getvalue().getServerTimestamp());
client.disconnect();
I would like to kwon how to get this
Thanks.
Most Users Ever Online: 1919
Currently Online:
11 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: 735
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1