Hi,
I'm trying to read a Profile Generic obis using the .net client example:
============
//reading the first record
GXDLMSProfileGeneric profileGeneric = new GXDLMSProfileGeneric("8.0.99.98.12.255");
object val = reader.ReadRowsByEntry(profileGeneric, 2, 1);
============
I get the following error: Captured Objects not read.
when trying to read the captured objects before reading the first record:
============
GXDLMSProfileGeneric profileGeneric = new GXDLMSProfileGeneric("8.0.99.98.12.255");
object res = reader.Read(profileGeneric, 3);
object val = reader.ReadRowsByEntry(profileGeneric, 2, 1);
============
I get the following error: Access error: other reason.
It seems I don't have access to read the objects list.
Using the GXDLMSDirector I can read the profile generic obis fine, but when I click on the capture button I get the same error: Access error: other reason.
I tried defining the list manually before reading like this:
============
GXDLMSProfileGeneric profileGeneric = new GXDLMSProfileGeneric("8.0.99.98.12.255");
//define list of captured objects
var capturedObjectsList = new List<GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>>();
//define capture objects one by one...
var c = new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>();
GXDLMSData gxobject = new GXDLMSData();
gxobject.LogicalName = "8.0.17.0.0.255";
GXDLMSCaptureObject captureObject = new GXDLMSCaptureObject();
captureObject.AttributeIndex = 2;
captureObject.DataIndex = 0;
c.Key = gxobject;
c.Value = captureObject;
//define the other objects ... then add them to the list
capturedObjectsList.Add(c);
//add the rest of the objects to the list and equate the list to the captured objects list inside the //profileGeneric
profileGeneric.CaptureObjects = capturedObjectsList;
//start reading
reader.ReadRowsByEntry(profileGeneric, 2, 1);
============
However after adding all the objects, I get a the following exception when reading: service exception operation not allowed.
Is this the right way to define the captured objects list?
Is there another way to read a profile generic obis without capturing the objects first?
Hi,
Hi,
The capture button creates a new row and saves current values. Some meters don't implement this feature.
All the meters don't support ReadRowsByEntry. You can try to test if your meter supports this with GXDLMSDirector by giving the start index and count.
In general, your code looks correct.
BR,
Mikko