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. Ignore Time Part of GXDateTime

ignore time part of GXDateTime

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 ali_bahal , 11 September, 2021
Forums
Gurux.DLMS

Hi, is there any way in c# version of library, I can create GXDateTime object that, it translate something like below ? I mean it put FF for time part of it?

<!-- 9/4/2021 *:*:* -->
<OctetString Value="07E50904FFFFFFFFFFFFFFFF" />

ali_bahal

4 years 9 months ago

I also looked at GxDate, but

I also looked at GxDate, but in converting to hex it translated into 5 bytes, that I think it's not correct for reading load profile.
case GXDate _:
buff.SetUInt8((byte) 5);
GXCommon.SetDate(settings, buff, value);
return;
case DateTime _:
buff.SetUInt8((byte) 12);
GXCommon.SetDateTime(settings, buff, value);
return;

ali_bahal

4 years 9 months ago

if I use skip property of

if I use skip property of GxDateTime,every thing work ok except Deviation that replaces with 80 00
instead of FF FF,

if ((gxDateTime.Skip & DateTimeSkips.Deviation) == DateTimeSkips.None)
{
short totalMinutes = (short) gxDateTime.Value.Offset.TotalMinutes;
if (settings != null && settings.UseUtc2NormalTime)
buff.SetInt16(totalMinutes);
else
buff.SetInt16(-totalMinutes);
}
else
buff.SetUInt16((ushort) 32768);

can we do anything about this ?

Profile picture for user Kurumi

Kurumi

4 years 9 months ago

Hi,

Hi,

You can ignore the time part using Skip as you have done. DLMS standard defines the deviation is ignored using 0x8000 and not 0xFFFF. If your meter is using 0xFFFF, then it's wrong and not as DLMS standard defines. You need to ask the meter manufacturer to fix it.

BR,
Mikko

ali_bahal

4 years 9 months ago

as you know sl7000 does not

as you know sl7000 does not implement dlms correctly. we have a lot of sl7000 meters. about 99 percent of them, does not have a problem. but only for 1% of them, I get access violated error on reading it's second load profile. I analyzed aimsPro packets and my packets, there was two differences in get request that I changed them after I get packet from your library.
but I stile get the same access violated error.
the differences was on 020412000809060000010000FF0F02120000090C that aims pro send simply
00090C for clock obis in get packet and time part that I already said above.
I should say that after changing packet contents, I checked them with translator and all of them was correct.
do you have any other idea ?

Profile picture for user Kurumi

Kurumi

4 years 9 months ago

Hi,

Hi,

The best way is if you can update the firmware. Is that possible? Can you modify the source code and change 32768 to 0xFFFF? Or are you reading all the meters with the same application?

BR,
Mikko

ali_bahal

4 years 9 months ago

we don't have access to new

we don't have access to new firmware. I also checked the version on meters and all meters are the same one.
also I changed 32768 to 0xFFFF and newly created packet is the same as aimsPro Packet.
but i checked snrm packet that we send and I see that :
<MaxInfoTX Value="117" />
<MaxInfoRX Value="114" />
I changed this values to 128. but then it send this values again. I don't hnow where this changes ? do you have any idea?

Profile picture for user Kurumi

Kurumi

4 years 9 months ago

Hi,

Hi,

I believe that you are using C#. You can change those values in GXDLMSClient.HdlcSettings

BR,
Mikko

ali_bahal

4 years 9 months ago

yes I changed them, but again

yes I changed them, but again it uses this values. if I don't set UseFrameSize , then everything is Ok.
but If I use UseFrameSize =true, then this values(117,114) apply instead of 128.

Profile picture for user Kurumi

Kurumi

4 years 9 months ago

Hi,

Hi,
Leave UseFrameSize to false and use MaxInfoTX and MaxInfoRX properties.
UseFrameSize is for some special meters when communicating Over The Air.

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