Hi, I'm newby with meters. Im tryng reading a meter Itron ACE6000. I can read an OBI CODE in this way:
GXCommunicate com = null;
com = getManufactureSettings(args);
GXDLMSRegister it = new GXDLMSRegister("1.1.32.7.0.255");
com.initializeConnection();
Object val= com.readObject(it, 3);
val= com.readObject(it, 2);
But I have problems reading Load Profile:
GXDateTime date1 = new GXDateTime(2016,7,15,6,0,0,0);
GXDateTime date2 = new GXDateTime(2016,7,15,7,0,0,0);
GXDLMSObject clock = new GXDLMSObject();
clock.setLogicalName("0.0.1.0.0.255");
GXDLMSProfileGeneric pg = new GXDLMSProfileGeneric("1.0.99.1.0.255");
pg.setSortObject(clock);
Object[] vals = com.readRowsByRange(pg, date1.getValue(), date2.getValue());
The meter response is:
Frame ID do not match.
gurux.dlms.GXDLMSException: Access Error : Device reports scope of access violated.
DisconnectRequest
After execute
byte [][] val = null;
val = com.read(pg,2);
val contains the following:
[126][-96][25][1][1][50][-28][78][-26][-26][0][-64][1][-127][0][7][1][0][99][1][0][-1][2][0][81][68][126]
This is:
7E A0 19 01 01 32 E4 4E E6 E6 00 C0 01 81 00 07 01 00 63 01 00 FF 02 00 51 44 7E
Is this response fine? It's necesary set objects to read with Generic Profile:
o = new GXDLMSObject();
o.setLogicalName("1.1.5.29.0.255");
o.setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o, 2, 2)
Hi, I tried what you said but the meter response is the same:
when I execute val = cl.read(pg, 3);
Val --> 7E A0 19 01 01 32 E4 4E E6 E6 00 C0 01 81 00 07 01 00 63 01 00 FF 03 00 89 5D 7E
after that, I execute val = cl.read(pg, 2);
Val --> 7E A0 19 01 01 54 D4 48 E6 E6 00 C0 01 81 00 07 01 00 63 01 00 FF 02 00 51 44 7E
My code is:
public static void main(String[] args) {
GXDLMSClient cl = null;
GXCommunicate com = null;
PrintWriter logFile = null;
byte[][] val;
GXDLMSObject it = null;
try {
logFile = new PrintWriter(new BufferedWriter(new FileWriter("logFile.txt")));
cl = createClient(args);
cl.setUseLogicalNameReferencing(true);
if (cl == null) {
return;
}
GXDLMSProfileGeneric pg = new GXDLMSProfileGeneric("1.0.99.1.0.255");
pg.setCapturePeriod(15);
pg.setProfileEntries(100);
pg.setSortMethod(SortMethod.FIFO);
GXDLMSObject[] o = new GXDLMSObject[8];
o[0] = new GXDLMSObject();
o[0].setLogicalName("0.0.1.0.0.255");
o[0].setObjectType(ObjectType.CLOCK);
pg.setSortObject(o[0]);
/*
//Add Columns to ProfileGeneric. It's not necesary
pg.addCaptureObject(o[0], 2, 0);
o[1] = new GXDLMSObject();
o[1].setLogicalName("1.1.1.29.0.255");
o[1].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[1], 2, 1);
o[2] = new GXDLMSObject();
o[2].setLogicalName("1.1.5.29.0.255");
o[2].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[2], 2, 2);
o[3] = new GXDLMSObject();
o[3].setLogicalName("1.1.8.29.0.255");
o[3].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[3], 2, 3);
o[4] = new GXDLMSObject();
o[4].setLogicalName("1.1.13.27.0.255");
o[4].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[4], 2, 4);
o[5] = new GXDLMSObject();
o[5].setLogicalName("1.1.32.27.0.255");
o[5].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[5], 2, 5);
o[6] = new GXDLMSObject();
o[6].setLogicalName("1.1.52.27.0.255");
o[6].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[6], 2, 6);
o[7] = new GXDLMSObject();
o[7].setLogicalName("1.1.72.27.0.255");
o[7].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[7], 2, 7);
*/
//ACE6000 is not fully support DLMS. Reading profile generics is made in custom way.
//Easiest way is if you read all data from the buffer
val = cl.read(pg, 3);
convertToString(val[0]);
for (int i = 0; i<val.length;i++) {
convertToString(val[i]);
System.out.println( " Value of index "+i+": " + convertToString(val[i]));
}
val = cl.read(pg, 2);
convertToString(val[0]);
for (int i = 0; i<val.length;i++) {
convertToString(val[i]);
System.out.println( " Value of index "+i+": " + convertToString(val[i]));
}
} catch (Exception e) {
System.out.println(e.toString());
} finally {
if (logFile != null) {
logFile.close();
}
try {
// Disconnect.
if (com != null) {
com.close();
}
} catch (Exception Ex2) {
System.out.println(Ex2.toString());
}
}
System.out.println("Done!");
}
Can not read Load Profile from ACE6000
Hi,
ACE6000 is not fully support DLMS. Reading profile generics is made in custom way.
Easiest way is if you read all data from the buffer
com.read(pg, 2);
BR,
Mikko
Thanks. But in the example
Thanks. But in the example you posted:
com.read(pg, 2);
pg is an object of class GXDLMSProfileGeneric?
Or you mean I have to read every column of the Profile Generic in this way?
After execute
After execute
byte [][] val = null;
val = com.read(pg,2);
val contains the following:
[126][-96][25][1][1][50][-28][78][-26][-26][0][-64][1][-127][0][7][1][0][99][1][0][-1][2][0][81][68][126]
This is:
7E A0 19 01 01 32 E4 4E E6 E6 00 C0 01 81 00 07 01 00 63 01 00 FF 02 00 51 44 7E
Is this response fine? It's necesary set objects to read with Generic Profile:
o = new GXDLMSObject();
o.setLogicalName("1.1.5.29.0.255");
o.setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o, 2, 2)
Thanks
Profile Generic
Hi Carlos,
I used your example above. pg is:
GXDLMSProfileGeneric pg = new GXDLMSProfileGeneric("1.0.99.1.0.255");
pg.setSortObject(clock);
Read is call only for the profile generic object, not each column.
BR,
Mikko
Profile Generic
Hi Carlos,
Your data seems to be ok. You should read attribute index 3 to get columns before this.
com.read(pg,3);
BR,
Mikko
Problems to get Load Profile
Hi, I tried what you said but the meter response is the same:
when I execute val = cl.read(pg, 3);
Val --> 7E A0 19 01 01 32 E4 4E E6 E6 00 C0 01 81 00 07 01 00 63 01 00 FF 03 00 89 5D 7E
after that, I execute val = cl.read(pg, 2);
Val --> 7E A0 19 01 01 54 D4 48 E6 E6 00 C0 01 81 00 07 01 00 63 01 00 FF 02 00 51 44 7E
My code is:
public static void main(String[] args) {
GXDLMSClient cl = null;
GXCommunicate com = null;
PrintWriter logFile = null;
byte[][] val;
GXDLMSObject it = null;
try {
logFile = new PrintWriter(new BufferedWriter(new FileWriter("logFile.txt")));
cl = createClient(args);
cl.setUseLogicalNameReferencing(true);
if (cl == null) {
return;
}
GXDLMSProfileGeneric pg = new GXDLMSProfileGeneric("1.0.99.1.0.255");
pg.setCapturePeriod(15);
pg.setProfileEntries(100);
pg.setSortMethod(SortMethod.FIFO);
GXDLMSObject[] o = new GXDLMSObject[8];
o[0] = new GXDLMSObject();
o[0].setLogicalName("0.0.1.0.0.255");
o[0].setObjectType(ObjectType.CLOCK);
pg.setSortObject(o[0]);
/*
//Add Columns to ProfileGeneric. It's not necesary
pg.addCaptureObject(o[0], 2, 0);
o[1] = new GXDLMSObject();
o[1].setLogicalName("1.1.1.29.0.255");
o[1].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[1], 2, 1);
o[2] = new GXDLMSObject();
o[2].setLogicalName("1.1.5.29.0.255");
o[2].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[2], 2, 2);
o[3] = new GXDLMSObject();
o[3].setLogicalName("1.1.8.29.0.255");
o[3].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[3], 2, 3);
o[4] = new GXDLMSObject();
o[4].setLogicalName("1.1.13.27.0.255");
o[4].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[4], 2, 4);
o[5] = new GXDLMSObject();
o[5].setLogicalName("1.1.32.27.0.255");
o[5].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[5], 2, 5);
o[6] = new GXDLMSObject();
o[6].setLogicalName("1.1.52.27.0.255");
o[6].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[6], 2, 6);
o[7] = new GXDLMSObject();
o[7].setLogicalName("1.1.72.27.0.255");
o[7].setObjectType(ObjectType.REGISTER);
pg.addCaptureObject(o[7], 2, 7);
*/
//ACE6000 is not fully support DLMS. Reading profile generics is made in custom way.
//Easiest way is if you read all data from the buffer
val = cl.read(pg, 3);
convertToString(val[0]);
for (int i = 0; i<val.length;i++) {
convertToString(val[i]);
System.out.println( " Value of index "+i+": " + convertToString(val[i]));
}
val = cl.read(pg, 2);
convertToString(val[0]);
for (int i = 0; i<val.length;i++) {
convertToString(val[i]);
System.out.println( " Value of index "+i+": " + convertToString(val[i]));
}
} catch (Exception e) {
System.out.println(e.toString());
} finally {
if (logFile != null) {
logFile.close();
}
try {
// Disconnect.
if (com != null) {
com.close();
}
} catch (Exception Ex2) {
System.out.println(Ex2.toString());
}
}
System.out.println("Done!");
}