I am new for DLMS/COSEM. I want just try to make DLMS/COSEM Client. I want read a single register's data.
I have tried below mentioned code but it goes
"TRACE("Err! Failed to read register: Access Error : Device reports a undefined object" here.
You try to read the object that doesn't exist. Check your logical name. Read your meter with GXLMDSDirector first to check what kind of objects you have.
Thanks for your prompt response.
Actually I am using "GuruxDLMSServerExample" application as a meter and this ("0.0.1.0.0.255") OBIS code is for clock object.
The below mentioned code is working. kindly refer.
CGXDLMSClock *clock = new CGXDLMSClock("0.0.1.0.0.255");
if ((ret = comm.Read(clock, 2, value)) != 0)
{
TRACE("err! failed to read register: %s", CGXDLMSConverter::GetErrorMessage(ret));
}
else
{
TRACE("3 result isssss: %s", value.c_str());
}
Actually I have to skip the association view and want to read only single object with the help of OBIS code.
Is any function available which take OBIS code as a argument and return an object of the device to read???
or
any common object suppose "CGXDLMSxyz" which take any device's objects and passes it to read device data????
Kindly refer the mentioned code.
CGXDLMSxyz *obj = new CGXDLMSxyz("0.0.1.0.0.255");
if ((ret = comm.Read(obj , 2, value)) != 0)
{
TRACE("err! failed to read register: %s", CGXDLMSConverter::GetErrorMessage(ret));
}
else
{
TRACE("3 result isssss: %s", value.c_str());
}
Hi,
When you are reading the object from the meter, you must know object type and it must be correct.
If the object type is wrong "undefined object" exception is returned.
Check your object type.
Save Logical name and object type so you don't need to read association view.
Help needed in reading only wanted objects
Could anybody help me???
Thanks...
Getting objetcs of DLMS/COSEM by OBIS code.
Hi,
You try to read the object that doesn't exist. Check your logical name. Read your meter with GXLMDSDirector first to check what kind of objects you have.
BR,
Mikko
Getting objetcs of DLMS/COSEM by OBIS code.
Hi,
Thanks for your prompt response.
Actually I am using "GuruxDLMSServerExample" application as a meter and this ("0.0.1.0.0.255") OBIS code is for clock object.
The below mentioned code is working. kindly refer.
CGXDLMSClock *clock = new CGXDLMSClock("0.0.1.0.0.255");
if ((ret = comm.Read(clock, 2, value)) != 0)
{
TRACE("err! failed to read register: %s", CGXDLMSConverter::GetErrorMessage(ret));
}
else
{
TRACE("3 result isssss: %s", value.c_str());
}
Actually I have to skip the association view and want to read only single object with the help of OBIS code.
Is any function available which take OBIS code as a argument and return an object of the device to read???
or
any common object suppose "CGXDLMSxyz" which take any device's objects and passes it to read device data????
Kindly refer the mentioned code.
CGXDLMSxyz *obj = new CGXDLMSxyz("0.0.1.0.0.255");
if ((ret = comm.Read(obj , 2, value)) != 0)
{
TRACE("err! failed to read register: %s", CGXDLMSConverter::GetErrorMessage(ret));
}
else
{
TRACE("3 result isssss: %s", value.c_str());
}
Kindly suggest me. What should I do?
Thanks & Regards,
Pradson
Getting objetcs of DLMS/COSEM by OBIS code.
Hi,
When you are reading the object from the meter, you must know object type and it must be correct.
If the object type is wrong "undefined object" exception is returned.
Check your object type.
Save Logical name and object type so you don't need to read association view.
BR,
Mikko