Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Read The Value of An OBIS Code

Read the value of an OBIS code

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By Leila , 23 April, 2016
Forums
Gurux.DLMS

Hi,

I am using below functions to get the value of Active Power:

CGXDLMSVariant value;
CGXDLMSObject pObject(OBJECT_TYPE_REGISTER, "1.1.1.8.0.255");
comm.Read(&pObject, 2, value);
long unsigned int IntValue = value.ToDouble();

But value variable in CGXCommunication::Read function returns nothing. (The value variable in not used in the function.
This way worked with the previews version written without Linux OS option.

could you help me how to read an active power value?!

Best regards,
Leila

Leila

10 years 1 month ago

Read the value of an OBIS code

Hi,

I solved the problem by making below changes in the source codes:
1. In GuruxDLMSClientExample.cpp file, in main function, after initializing, I added:

CGXDLMSVariant value;
CGXReplyData reply;
CGXDLMSObject pObject(OBJECT_TYPE_REGISTER, "1.1.1.8.0.255");
comm.Read(&pObject, 2, reply);
value = reply.GetValue();
printf("Register value is:(int) %d\n", value.iVal);

2. In CGXCommunication::Read function, I modified the function inputs:

int CGXCommunication::Read(CGXDLMSObject* pObject, int attributeIndex, /*CGXDLMSVariant& value*/CGXReplyData& reply)

3. In CGXCommunication::Read function, I commented:

//value.Clear();
//CGXReplyData reply;

4. In CGXCommunication::UpdateAccess function, I commented all except:

return ERROR_CODES_OK;

The number four change is not a efficient way, but it helps the software to work.

Could you help me how to solve the problem more efficiently?

Best regards,
Leila

vamsi

9 years 1 month ago

Read the value of an OBIS code

Hi Leila,
I am also trying to read obis value of my meter i fallowed your changes in gurux c++ code, it returns nothing for the same obis code and if i use the obis code of voltage my code getting crash please guide me to solve this issue.

Profile picture for user Kurumi

Kurumi

9 years 1 month ago

Read the value of an OBIS code

Hi Leila,

I have miss this post. I'm sorry that I have not reply. What meter you try to read? Can you send trace to me by email. We'll check this.

BR,

Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin