Hi Mikko,
Long time no see. How are you?
We want to add capture objects energy profile. The profile already contains 8 objects. That's why we're adding new object from index 9. We also tried adding all the objects but got the same error.
Here is the Java code we're trying to use for this. But we're getting Access Error : Data Block Unavailable.
Any idea what we're doing wrong?
try {
GXDLMSProfileGeneric profile = new GXDLMSProfileGeneric("1.0.99.1.0.255");
// Capture L1 instantaneous current
profile.addCaptureObject(new GXDLMSRegister("1.0.31.7.0.255"), 2, 9);
// Capture L2 instantaneous current
profile.addCaptureObject(new GXDLMSRegister("1.0.51.7.0.255"), 2, 10);
// Capture L3 instantaneous current
profile.addCaptureObject(new GXDLMSRegister("1.0.71.7.0.255"), 2, 11);
// Capture Neutral current
profile.addCaptureObject(new GXDLMSRegister("1.0.91.7.0.255"), 2, 12);
// Capture Frequence
//profile.addCaptureObject(new GXDLMSRegister("1.0.14.7.0.255"), 2, 13);
// Capture L1 instantaneous voltage
profile.addCaptureObject(new GXDLMSRegister("1.0.32.7.0.255"), 2, 13);
// Capture L2 instantaneous voltage
profile.addCaptureObject(new GXDLMSRegister("1.0.52.7.0.255"), 2, 14);
// Capture L3 instantaneous voltage
profile.addCaptureObject(new GXDLMSRegister("1.0.72.7.0.255"), 2, 15);
// Capture L1 instantaneous power factor
profile.addCaptureObject(new GXDLMSRegister("1.0.33.7.0.255"), 2, 16);
// Capture L2 instantaneous power factor
profile.addCaptureObject(new GXDLMSRegister("1.0.53.7.0.255"), 2, 17);
// Capture L3 instantaneous power factor
profile.addCaptureObject(new GXDLMSRegister("1.0.73.7.0.255"), 2, 18);
// Capture Total instantaneous power factor
//profile.addCaptureObject(new GXDLMSRegister("1.0.13.7.0.255"), 2, 20);
// Capture cumulative import active energy
profile.addCaptureObject(new GXDLMSRegister("1.0.1.8.0.255"), 2, 19);
// Capture cumulative export active energy
profile.addCaptureObject(new GXDLMSRegister("1.0.2.8.0.255"), 2, 20);
// Capture cumulative import apparent energy
//profile.addCaptureObject(new GXDLMSRegister("1.0.9.8.0.255"), 2, 23);
// Capture cumulative export apparent energy
//profile.addCaptureObject(new GXDLMSRegister("1.0.10.8.0.255"), 2, 24);
GXReplyData reply = new GXReplyData();
// Write the profile
byte[][] dataList = dlms.write(profile, 3);
readDataBlock(dataList, reply);
/*for(byte[] it : dataList) {
readDLMSPacket(it, reply);
}*/
System.out.println("Load profile configured!");
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
Thanks,
Dayah
Hi, You must write all…
Hi,
You must write all capture objects to the meter. You can't append only the new ones.
Your data index is invalid.
Try like this:
profile.addCaptureObject(new GXDLMSRegister("1.0.31.7.0.255"), 2, 0);
BR,
Mikko
Hi Mikko, Thanks for the…
Hi Mikko,
Thanks for the feedback.
I understand that the data index should start at 0.
But didn't understand you mean by your data type is invalid. Can you please elaborate ?
Dayah
Hi, In addCaptureObject you…
Hi,
In addCaptureObject you are using data index #9 and that is wrong.
It should be zero.
profile.addCaptureObject(new GXDLMSRegister("1.0.31.7.0.255"), 2, 9);
BR,
Mikko
Hi Mikko, I'm starting the…
Hi Mikko,
I'm starting the data index at 0. But still getting the same error. Here are the traces and error.
[Trace removed]
Hi, The data index is zero…
Hi,
The data index is zero for all objects. It's not an order index.
profile.addCaptureObject(new GXDLMSRegister("1.0.31.7.0.255"), 2, 0);
// Capture L2 instantaneous current
profile.addCaptureObject(new GXDLMSRegister("1.0.51.7.0.255"), 2, 0)
BR,
Mikko
Hi Mikko, Appreciated your…
Hi Mikko,
Appreciated your time.
I changed data indices to 0s. But still same error.
TX: 11:23:24.398 00 01 00 01 00 01 00 C0 C1 02 C1 00 07 01 00 63 01 00 FF 03 00 00 00 00 00 01 81 AC 01 16 02 04 12 00 03 09 06 00 00 01 00 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 00 00 60 0A 01 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 01 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 02 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 03 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 04 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 09 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 0A 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 1F 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01
RX: 11:23:25.132 C5 02 C1 00 00 00 01
TX: 11:23:25.133 00 01 00 01 00 01 00 C0 C1 03 C1 00 00 00 00 02 81 B6 00 33 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 47 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 5B 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 20 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 34 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 48 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 21 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 35 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 49 07 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 01 08 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 02
RX: 11:23:25.873 C5 02 C1 00 00 00 02
TX: 11:23:25.874 00 01 00 01 00 01 00 35 C1 03 C1 01 00 00 00 03 2C 08 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 09 08 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 0A 08 00 FF 0F 02 12 00 00
RX: 11:23:26.312 C5 03 C1 0E 00 00 00 00
TX: 11:23:26.320 00 01 00 01 00 01 00 11 C1 01 C1 00 1D 00 01 02 01 00 FF 06 00 01 01 09 00
RX: 11:23:26.834 C5 01 C1 00
gurux.dlms.GXDLMSException: Access Error : Data Block Unavailable.
at safariami.hes.dlms.Communication.readDLMSPacket(Communication.java:183)
at safariami.hes.dlms.Communication.readDataBlock(Communication.java:299)
at safariami.hes.dlms.Communication.readDataBlock(Communication.java:285)
Dayah
Hi, Now the data looks…
Hi,
Now the data looks correct.
You try to write 22 capture objects. You need to ask the meter manufacturer what is the maximum amount that you can write. Can you write 19 values?
BR,
Mikko
Hi Mikko, I get the same…
Hi Mikko,
I get the same error even for writing one object.
Dayah
Hi, Can you add new capture…
Hi,
Can you add new capture objects with GXDLMSDirector or is "Add" button disabled?
If it is, you need to use a different authentication level or it might be that your meter doesn't allow capture objects chancing.
BR,
Mikko
Hi Mikko, This works when…
Hi Mikko,
This works when using manufacturer's tool similar to the GXDLMSDirector. We have many meters that need this so we wanted to automate it.
We found another workaround where we can read data needed from the two profiles per connection. So we will not pursue updating the energy profile for now.
Thanks the help.
Dayah