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. Set 3 Last Byte of Clock

set 3 last byte of clock

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 , 7 April, 2021
Forums
General discussion

Hi, I want to set three last byte of meter clock as 00 80 00 , so that deviation and time zone does not apply when I read meter clock.
I use this code :
var tzi= TimeZoneInfo.FindSystemTimeZoneById(TimeZoneInfo.Local.Id);
var dtNow = DateTime.UtcNow.AddMinutes(tzi.BaseUtcOffset.TotalMinutes);
var clock = new GXDLMSClock("0.0.1.0.0.255")
{
Time = new GXDateTime(dtNow) {Skip = DateTimeSkips.Deviation ,Status = ClockStatus.DaylightSavingActive},
Status = ClockStatus.DaylightSavingActive | ClockStatus.Skip,
Deviation = 60,
TimeZone =0,// (int)tzi.BaseUtcOffset.TotalMinutes*(-1),
Enabled = false
};
clock.UpdateDirty(2,clock.Time);
clock.UpdateDirty(3, clock.TimeZone);
//clock.UpdateDirty(4, clock.Status);
clock.UpdateDirty(7, clock.Deviation);
clock.UpdateDirty(8, clock.Enabled);
WriteDevice(_device, clock, 0);

but I can't achieve what I want. do you have any Idea ?

Profile picture for user Kurumi

Kurumi

5 years 2 months ago

Hi,

Hi,

You can use Skip value, but it's reset every time when you read the value from the meter.
In your example you are setting skip value before writing the value and deviation is ignored. If you want that last byte is zero you need to set it like this:
Skip = DateTimeSkips.Deviation;
Status = ClockStatus.None;

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