Skip to main content
Home
for DLMS smart meters

Main navigation

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

Breadcrumb

  1. Home
  2. Reading All "Data" Object Type Parameter Together

Reading all "Data" object type parameter together

By riteshP, 22 May, 2025
Forums
Gurux DLMS for ANSI C

Hi,

I can able to read individual Data type object. Using following methods.
Client.init(true, 32, 1, DLMS_AUTHENTICATION_LOW, "xxxx", DLMS_INTERFACE_TYPE_HDLC);

cosem_init(BASE(ldn), DLMS_OBJECT_TYPE_DATA, "0.0.42.0.0.255");
com_read(BASE(ldn), 2);

My Energy Meter has > 20 Data objects, All the objects i am able to read the values individually.
I want to read all DLMS_OBJECT_TYPE_DATA types available in a meter together instead of reading individual OBIS code.
How to read that in single read instead of multiple com_read?

Profile picture for user Kurumi

Kurumi

7 months 3 weeks ago

Hi, You can use ReadList for…

Hi,

You can use ReadList for that. The meter's memory capacity is limited, so you may need to perform multiple reads.

BR,
Mikko

riteshP

7 months 3 weeks ago

Hi Kurumi, Thanks for the…

Hi Kurumi,

Thanks for the Reply.

I am using following code to read 2 OBIS code using "com_readList"
I am getting no error. Seems like it's reading the data.
How to print the read data and clock value?

objectArray objects;
gxArray list;
gxClock clock1;
gxData ldn;

cosem_init(BASE(ldn), DLMS_OBJECT_TYPE_DATA, "0.0.0.1.0.255");
cosem_init(BASE(clock1), DLMS_OBJECT_TYPE_DATA, "0.0.1.0.0.255");

oa_init(&objects);
arr_init(&list);
arr_push(&list, key_init(&ldn, (void*)2));
arr_push(&list, key_init(&clock1, (void*)2));

com_readList(&list);

Profile picture for user Kurumi

Kurumi

7 months 3 weeks ago

Hi, The data type and OBIS…

Hi,

The data type and OBIS code must be correct, or meter returns an error.

cosem_init(BASE(ldn), DLMS_OBJECT_TYPE_DATA, "CHANGE OBIS CODE");
cosem_init(BASE(clock1), DLMS_OBJECT_TYPE_CLOCK, "0.0.1.0.0.255");

You can convert object attributes to string like this:

obj_toString(BASE(clock1), buff);

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 01/14/2026 - 14:29
    Gurux.DLMS.Python 1.0.196
  • Mon, 12/29/2025 - 10:38
    Gurux.Serial.Android 3.0.5
  • Mon, 12/15/2025 - 08:11
    Gurux.DLMS.Net 4.0.87
  • Fri, 12/12/2025 - 08:38
    Gurux.DLMS.Python 1.0.195
  • Thu, 12/11/2025 - 13:22
    Gurux.DLMS.Python 1.0.194

New forum topics

  • 6-digit field values from meter not fully received (only 5 digits shown)
  • Gurux DLMS Android App
  • AMR support for bidirectional meters.
  • addition of new object in object list, meter not working
  • old meter take to much time(l&t)
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin