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. 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

1 year 2 months 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

1 year 2 months 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

1 year 2 months 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

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
  • DLMS server - serving multiple similar datasets gathered from multiple meters across distinct logical addresses
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin