Hi,
i am trying to read clock of dlms meter over serial port in c#. but i am pretty new to this, and don't find any proper way to work. please share me sample code to read clock (refered Gurux.dlms library and developed basic code but it is not working- code given below). serial port setting(baud rate, comport) done. thanks
GXDLMSClient dlmsClient = new GXDLMSClient(true,30,1, Authentication.None, "RMI_SECRET_ASSC2", InterfaceType.HDLC);
GXDLMSObject clockobject = dlmsClient.Objects.FindByLN(ObjectType.Clock, "0.0.1.0.0.255"); //(clock OBIS Code: 0.0.1.0.0.255)
if (clockobject != null)
{
// Get the date and time
var dateTime = dlmsClient.Read(clockobject, 2); // 2 is the clock's value attribute
// Display the date and time
Console.WriteLine("Meter Date and Time: " + dateTime);
}
Hi, At first download…
Hi,
At first download GXDLMSDirector and connect with that. It will help you to understand DLMS meters.
Then download the client example and connect with that.
You can see the correct command line arguments when you select the device in GXDLMSDirector.
https://github.com/Gurux/Gurux.DLMS.Net/tree/master/Gurux.DLMS.Client.E…
BR,
Mikko