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. DLMS Profile Generic Read

DLMS Profile Generic Read

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 novatricetechn… , 14 March, 2020
Forums
Gurux.DLMS

I am trying to read profile generic over Serial using ANSI C
My code is as below.

ret = com_readProfileGenericColumns();
oa_init(&objects);
ret = oa_getObjects(&settings.objects, DLMS_OBJECT_TYPE_PROFILE_GENERIC, &objects);

ret = com_read((gxObject*)pg, 3);
ret = com_read((gxObject*)pg, 2);

for(pos=0;pos!=objects.size;pos++)
{
ret = oa_getByIndex(&objects, pos, (gxObject**)&pg);
ret = com_read((gxObject*)pg, 7);
ret = com_read((gxObject*)pg, 8);
ret = com_readRowsByEntry((gxObject*)pg, 1, 1);
}

How to get All Columns and Rows values for profile generic after this?
Is this Correct sequence to read Profile generic?

for example;
OBIS Code 0.0.94.91.10.255 in profile generic,Inside that there are number of columns as below
0.0.96.1.0.255,
0.0.96.1.1.255,
1.0.0.2.0.255,
0.0.94.91.9.255,
0.0.94.91.11.255,
0.0.94.91.12.255,
1.0.0.4.2.255,
1.0.0.4.3.255,
0.0.96.1.4.255

Now,I would like to read 10 rows.
Then I want to iterate each one of them and print obis code and value on the serial port.
how to parse the data buffer for the objects ?.

Please guide me for the same.

Profile picture for user Kurumi

Kurumi

6 years 2 months ago

Hi,

Hi,

First you need to read columns.
ret = com_read((gxObject*)pg, 3);

If you want to read all the data from the PG use this:
ret = com_read(BASE(pg), 2);
If you want to read 10 rows use this:
ret = com_readRowsByEntry(BASE(pg), 1, 10);
If you want to read using start and end time use com_readRowsByRange.

Check obj_rowsToString method. It converts all columns to string.

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