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. When Creating An Object How To Know If To Use GXDLMSData, GXDLMSRegister or The Object In The Library (such As GXDLMSClock)

When creating an object how to know if to use GXDLMSData, GXDLMSRegister or the object in the library (such as GXDLMSClock)

By sm12345, 26 August, 2025
Forums
Gurux.DLMS

Hello,

Thank you for this library. I am using my C# app to talk with an Italian gas meter. I am also using your GXDLMSDirector to help me unit test and develop in parallel. I've been able to connect, disconnect and read objects with both my app and yours.

One thing I can't figure out is when I should use GXDLMSData vs. GXDLMSRegister vs. the custom object in the library (such as GXDLMSClock)? If I pick the wrong one, it will not work. I get an exception such as "Access Error : Device reports a unavailable object."

For example, when I use GXDLMSData for the Logical Device Name (0.0.42.0.0.255) I can read the object. However, when I use GXDLMSRegister I cannot.
GXDLMSData dlmsObject = new GXDLMSData("0.0.42.0.0.255"); -> this one works
GXDLMSRegister dlmsObject = new GXDLMSRegister("0.0.42.0.0.255"); -> this one throws "Access Error : Device reports a unavailable object."

I wrote off the objects XML file using GXDLMSDirector and it seems to be a mixture of all three object types. For Logical Device Name the XML has GXDLMSData, which is the only object type that works in my C# app.

<GXDLMSData>
<LN>0.0.42.0.0.255</LN>
<Description>Logical Device Name</Description>
<Access>11</Access>
<MethodAccess/>
<Value Type="10">xxxxxxxxxxxxxxxx</Value>
</GXDLMSData>

I'm just wondering if there is a way for me to figure out which of the three object types I should be using? Initially I was just using GXDLMSData across the board, but I don't think that will work for every object.

Profile picture for user Kurumi

Kurumi

2 months 1 week ago

Hi, The meter returns…

Hi,

The meter returns available COSEM objects (Object type and OBIS code) when you read the association view. GXDLMSDirector reads the association view when you establish the connection to the meter for the first time. You can see supported object types and OBIS codes on the tree.

You must use the same object type that the meter is using, or meter returns an error.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 10/29/2025 - 08:51
    gurux.dlms.c 9.0.2510.2901
  • Thu, 10/16/2025 - 09:59
    gurux.dlms.java 4.0.83
  • Wed, 10/08/2025 - 10:21
    gurux.dlms.c 9.0.2510.0801
  • Fri, 09/26/2025 - 10:02
    gurux.dlms.cpp 9.0.2509.2601
  • Fri, 09/26/2025 - 09:45
    gurux.dlms.c 9.0.2509.2601

New forum topics

  • Guidance on using the source codes
  • How to get/convert user readable format data from readRowsByRange
  • Insufficient memory to continue the execution of the program.
  • The client instance code failed to connect to the electricity meter for authentication
  • Unable to Release Request when closing connection with meter.
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin