

17:29, EET

December 13, 2016

Hello,
Hi all,
I have to get the past(historic) data from the server. my program is running in client java sdk, and my server is prosys. I checked with prosys client to get the historical data from the server its working fine. i used the codes in the client document.
CODE:
1) HistoryReadDetails details = new ReadRawModifiedDetails(false,DateTime.MIN_VALUE, DateTime.currentTime(),UnsignedInteger.MAX_VALUE, true);
HistoryReadValueId nodesToRead = new HistoryReadValueId(new NodeId(5, “square1”), null,QualifiedName.DEFAULT_BINARY_ENCODING, null);
HistoryReadResult[] result = client.historyRead(details,TimestampsToReturn.Both, true, nodesToRead);
System.out.println(result);
2) DataValue[] result = client.historyReadRaw(new NodeId(5, “square1”),DateTime.MIN_VALUE, DateTime.currentTime(),UnsignedInteger.MAX_VALUE, true, null, TimestampsToReturn.Source);
System.out.println(result);
O/P: when i run this i am getting output as following
1) ” [Lorg.opcfoundation.ua.core.HistoryReadResult;@5609159b”
2) [Lorg.opcfoundation.ua.builtintypes.DataValue;@17a7f733
suggest me a right way to do!!
Thanks
17:55, EET

December 21, 2011

12:55, EET

December 13, 2016

14:26, EET

April 17, 2013

Hello,
You should specify the time period in the client application when reading history. For example, in your own example you are setting these values to DateTime.MIN_VALUE and DateTime.currentTime().
The Javadoc of UaClient.historyReadXxx convenience methods contains documentation about these parameters.
Most Users Ever Online: 1919
Currently Online:
22 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: 795
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1538
Posts: 6493
Newest Members:
lisa40301214436, AndrewLed, georgianaweis51, sophiadavis, Waynegalse, Phillipbus, Oscarsat, WilliamJer, WilliamTunse, mvsjonah79Moderators: Jouni Aro: 1027, Pyry: 1, Petri: 0, Bjarne Boström: 1037, Jimmy Ni: 26, Matti Siponen: 353, Lusetti: 0
Administrators: admin: 1