i am getting this error while reading Billing profile for selective read

9 posts / 0 new
Last post
erdeepakcs
i am getting this error while reading Billing profile for selective read

Hi Sir,

Request: 20-06-2017 PM 04:01:13.83564 (+6.3064 seconds)

7E A0 2C 03 41 54 AF 99 E6 E6 00 C0 01 C1 00 07
01 00 62 01 00 FF 02 01 02 02 04 06 00 00 00 01
06 00 00 00 01 12 00 01 12 00 00 36 D2 7E

Answer: 20-06-2017 PM 04:01:13.88664 (+0.0510 seconds)

7E A0 07 41 03 1F 26 EC 7E

i am sending this command to reading billing profile for selective read by Entry. please can you explain why this error is coming.

kurumi
kurumi's picture
Billing profile

Hi,

Message is correct:
http://www.gurux.fi/GuruxDLMSTranslator?pdu=C001C100070100620100FF020102...

You was not saying what meter you try to read. All meters don't implement read by entry(index and count). Try with read by range(between start and end date).

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org

Binu S Pillai
How to get PROFILE GENERIC values in android DLMS

Hi,

I am reading the data from meter using optical probe. How can i read the Profile Generic values for selective read like in gurux director in android. When i read the profile generic values(Obis codes of profile generic: 1.0.98.1.0.255) in the gurux director with read all option it was returning a list. Like wise how can i read profile generic obis codes in android. Please help me with this.

kurumi
kurumi's picture
How to get PROFILE GENERIC values in android DLMS

Hi,

You have to modify source code. Our example reads all data at the moment and there are no start and end time on UI.
You can modify read method and check is object profile generic.

/**
* Reads profile generic using start and end time.
*
* @param item
* @param attributeIndex
* @return
* @throws Exception
*/
public void readRowsByRange(final GXDLMSProfileGeneric pg,
final Date start, final Date end) throws Exception {
GXReplyData reply = new GXReplyData();
byte[][] data = mClient.readRowsByRange(pg, start, end);
readDataBlock(data, reply);
mClient.updateValue(pg, 2, reply.getValue());
}

public void read(GXDLMSObject obj) throws Exception {
if (obj instanceof GXDLMSProfileGeneric)
{
readRowsByRange((GXDLMSProfileGeneric)obj, start time, end time) ;
}
else{
for (int it : ((IGXDLMSBase) obj).getAttributeIndexToRead()) {
readObject(obj, it);
}
}
}

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org

Binu S Pillai
How to get PROFILE GENERIC values in android DLMS

I got it, Will you send me some example code with profile generic data reading.

Binu S Pillai
How to get PROFILE GENERIC values in android DLMS

Hai,

I tried your code thank you for saving me, Sorry to disturbing you again and again I want to read ALL the profile generic values insted of from date, to date how can i do that

Thank you,

kurumi
kurumi's picture
How to get PROFILE GENERIC values in android DLMS

Hi.
Read buffer using read-method. That reads all data from the DB.
Like this:
//Read capture objects.
Read(pg, 3);
//Read ALL data.
Read(pg, 2);

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org

Binu S Pillai
How to get PROFILE GENERIC values in android DLMS

Hai,

I had wrote the code like this but it wasn't returning any values for profile generic can you tell me why.
Please correct me if i am wrong

public void read(GXDLMSObject obj) throws Exception {
GXReplyData reply_data = new GXReplyData();
if(obj instanceof GXDLMSProfileGeneric){
byte[][]temp;
CurrentProfileGeneric = (GXDLMSProfileGeneric) obj ;
temp = mClient.read(CurrentProfileGeneric,2);
readDataBlock(temp,reply_data);
}else {
for (int it : ((IGXDLMSBase) obj).getAttributeIndexToRead()) {
readObject(obj, it);
}
}
}

kurumi
kurumi's picture
How to get PROFILE GENERIC values in android DLMS

Hi,

Read captured columns first. Something like:

readObject(pg, 3);
temp = mClient.read(CurrentProfileGeneric,2);
readDataBlock(temp,reply_data);

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org