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
Moderators
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: 518
Currently Online: Matti Siponen, atdemir
17 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
hbrackel: 135
pramanj: 86
Francesco Zambon: 81
rocket science: 77
ibrahim: 75
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
fred: 41
Member Stats:
Guest Posters: 0
Members: 679
Moderators: 16
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1467
Posts: 6259
Newest Members:
elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytuleModerators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5
Administrators: admin: 1