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:
52 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: 726
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_galleryModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1