Open luisfmelo opened 4 years ago
Great you are having a look! I am not using history myself
I'm seeing a lot of inconsistencies. But how can I help?
Look at code and try to understand? Then fix things and make a pull request. The history code is quite simple
I know but the result that it is giving me it's strange
Experiencing the same issue
Read History method is returning the wrong values. In this example, I'm trying to get values that may not be stored (server only stores 20 minutes or so):
tools/uahistoryread -u "opc.tcp://opcuaserver.com:48010" -n "ns=2;s=Demo.History.ByteWithHistory" --starttime "2020-02-20 11:04:00" --endtime "2020-02-20 11:06:00"
Returns:We can see that the result returned is not in the provided range.
If we go to the last year:
tools/uahistoryread -u "opc.tcp://opcuaserver.com:48010" -n "ns=2;s=Demo.History.ByteWithHistory" --starttime "2019-02-20 11:04:00" --endtime "2019-02-20 11:06:00
The response:What I think is happening is that when no value is in the provided range, the return value is always the oldest data point.
Now, let's try to get 2 seconds of data:
tools/uahistoryread -u "opc.tcp://opcuaserver.com:48010" -n "ns=2;s=Demo.History.ByteWithHistory" --starttime "2020-02-20 12:08:58" --endtime "2020-02-20 12:09:00"
The resolution is not correct, as we can see, the first and last value are not in the provided range.