I am getting Failed to read object - Rows By Entry Error if data is not present using com_readRowsByRange function
Case 1 :
Start Time : 15-11-2019 10:00:00
End Time : 19-11-2019 10:00:00
Data Available Between 17-11-2019 to 19-11-2019
In above case I am getting error
Case 2 :
Start Time : 17-11-2019 10:00:00
End Time : 19-11-2019 10:00:00
Data Available Between 17-11-2019 to 19-11-2019
In above case I am not getting any error; Data is getting retrieved
How can I handle this for case 1, If data is present from 17-11-2019 then also case 1 should return data instead of error ?
Yes, some of the older meters are returning an error if there is no data in the giving range.
You just need to read the data from the meter and if error is returned expect that there is no data available. Returned error code is depending on the meter. New meters usually returns empty buffer and not an error.
GXDLMSDirector hides this error. Try to read the same profile generic with GXDMSDirector.
Before that select "PDU" and "Comments" from "View" and "Trace".
Now when you read that you should see error message in the trace view. If you are not seeing it, let me know and let's continue checking after that.
Hi,
Hi,
Yes, some of the older meters are returning an error if there is no data in the giving range.
You just need to read the data from the meter and if error is returned expect that there is no data available. Returned error code is depending on the meter. New meters usually returns empty buffer and not an error.
There is nothing that you can do for this. :-)
BR,
Mikko
But with same meter DLMS
But with same meter DLMS Director works well. Whereas in ANSI C I am getting that error.
Hi,
Hi,
GXDLMSDirector hides this error. Try to read the same profile generic with GXDMSDirector.
Before that select "PDU" and "Comments" from "View" and "Trace".
Now when you read that you should see error message in the trace view. If you are not seeing it, let me know and let's continue checking after that.
BR,
Mikko
In DLMS Director I am not
In DLMS Director I am not getting error.
Whereas In ANSCI C code I am getting error if start time and end time is like say 20 days
if ((ret = cl_readRowsByRange(&connection->settings, object, start, end, &data)) != 0 ||
(ret = com_readDataBlock(connection, &data, &reply)) != 0 ||
(ret = cl_updateValue(&connection->settings, (gxObject*)object, 2, &reply.dataValue)) != 0)
{
printf("ReadObject failed %s\r\n", hlp_getErrorMessage(ret));
}
In this case ret returns 258 ReadObject failed Invalid Parameter and because of this Rows By Entry Failed error