You need to change the authentication level to low or high if you want to update the clock. If you are connecting without authentication you can only read values from the meter.
Try to connect with GXDLMSDirector. Read association view and select Clock object. Then check "Access rights" tab. Make sure that Read/Write is enabled.
It seems that you are using India standard meter. Set UseUtc2NormalTime = true;
client .UseUtc2NormalTime = true;
Also, try to first write same date-time to the meter that you have read. If it works there are few parameters in date-time that are causing problems with some meters.
In shared screen shot, I have provided read and write access and request connect. On connect I read time and again write back same date time without any change. Error is shared in above screen.
When I read association view, it has read access. I change it. Please find details. reading association , read clock and write clock.
If i don't provide readwrite access , then it is disable, how to writer it ? as suggested, I tried writing same date time. but same issue.
This is for EDMI meter, with low authentication pwd as 12345.
As I told before. You don't provide access right, the meter does. You need to try to connect using a High authentication level and read the association view again. Check if the clock access level is then ReadWrite.
Now i have High level password for L&T meter, as guided by you, association view has read write access for Time OBIS code.
While using directrix i am selecting Manufacture as Indian Standard, interface =HDLC, authentication = "US". using it am able to fetch all parameters now but Still the time sync is not happening. it through error as "access Error: Device reports a hardware fault"
Also while using .net code example i am not able to see "US" as authentication options.
Hi,
Hi,
You need to change the authentication level to low or high if you want to update the clock. If you are connecting without authentication you can only read values from the meter.
BR,
Mikko
Hi,
Hi,
I have tried with Low authentication, below is my code sample.
Gurux.DLMS.Reader.GXDLMSReader reader = null;
try
{
IGXMedia media = null;
TraceLevel trace = TraceLevel.Error;
bool iec = false;
string IpAddress = "172.19.10.32";
int Port = 1001;
if (CommunicationType == "1")
{
media = new Gurux.Net.GXNet();
}
else if (CommunicationType == "2")
{
media = new GXSerial(comport);
}
Initialize connection settings.
if (media is GXSerial)
{
GXSerial serial = media as GXSerial;
if (iec)
{
serial.BaudRate = 300;
serial.DataBits = 7;
serial.Parity = System.IO.Ports.Parity.Even;
serial.StopBits = System.IO.Ports.StopBits.One;
}
else
{
serial.BaudRate = 9600;
serial.DataBits = 8;
serial.Parity = System.IO.Ports.Parity.None;
serial.StopBits = System.IO.Ports.StopBits.One;
}
}
else if (media is GXNet)
{
GXNet net = media as GXNet;
net.Port = Convert.ToInt32(Portno);
net.HostName = IpAddress;
net.Protocol = Gurux.Net.NetworkType.Tcp;
}
else
{
throw new Exception("Unknown media type.");
objinformixhelper.AuditLog("DLMS Realtimedata Unknown media type. MeterId= " + MeterId, IpAddress);
return false;
}
DateTime MeterDateTime = DateTime.Now;
objinformixhelper.AuditLog("DLMS Realtimedata client connection MeterId= " + MeterId, IpAddress);
GXDLMSSecureClient client = new GXDLMSSecureClient(true, 32, 1, Authentication.Low, "ABCD0001", InterfaceType.HDLC);
reader = new Gurux.DLMS.Reader.GXDLMSReader(client, media, trace, objinformixhelper, ObjCommonFunction);
media.Open();
objinformixhelper.AuditLog("DLMS Realtimedata client connection open MeterId= " + MeterId, IpAddress);
Some meters need a break here.
Thread.Sleep(1000);
GXDLMSClock Clock = new GXDLMSClock();
Clock.LogicalName = "0.0.1.0.0.255";
Clock.SetAccess(2, AccessMode.Write); 5- auth write , 2 write
object val = comm.Read(Clock, 2);
Clock.Time = DateTime.Now;
byte[][] data = dlms.Write(Clock, 2);
GXReplyData reply = new GXReplyData();
comm.ReadDLMSPacket(data, reply);
reader.Write(Clock, 2);
if (reader != null)
{
reader.Close();
}
}
catch (Exception ex)
{
if (reader != null)
{
reader.Close();
}
objinformixhelperDLMSSyn.ExceptionLog("DLMSMetersynctime ex=" + DateEx.Message + "Date =" + meterDate, "ChecktimesyncForLandTMeter", IpAddress);
}
Hi Sachin ,
Hi Sachin ,
Try to connect with GXDLMSDirector. Read association view and select Clock object. Then check "Access rights" tab. Make sure that Read/Write is enabled.
It seems that you are using India standard meter. Set UseUtc2NormalTime = true;
client .UseUtc2NormalTime = true;
Also, try to first write same date-time to the meter that you have read. If it works there are few parameters in date-time that are causing problems with some meters.
BR,
Mikko
Hi,
Hi,
No I am using secure standard FX 100. I have tried but failed. Please find Scree.
regards,
Sachin
Hi Sachin,
Hi Sachin,
Try to first write time what you have read back to the meter. Some meters are expecting that specific time zone is used.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Thank you for reply.
In shared screen shot, I have provided read and write access and request connect. On connect I read time and again write back same date time without any change. Error is shared in above screen.
Hi,
Hi,
You don't provide access right, meter does. If you read association view, is access right readWrite?
BR,
Mikko
Hi Mikko,
Hi Mikko,
When I read association view, it has read access. I change it. Please find details. reading association , read clock and write clock.
If i don't provide readwrite access , then it is disable, how to writer it ? as suggested, I tried writing same date time. but same issue.
This is for EDMI meter, with low authentication pwd as 12345.
[Trace removed]
Hi,
Hi,
As I told before. You don't provide access right, the meter does. You need to try to connect using a High authentication level and read the association view again. Check if the clock access level is then ReadWrite.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Now i have High level password for L&T meter, as guided by you, association view has read write access for Time OBIS code.
While using directrix i am selecting Manufacture as Indian Standard, interface =HDLC, authentication = "US". using it am able to fetch all parameters now but Still the time sync is not happening. it through error as "access Error: Device reports a hardware fault"
Also while using .net code example i am not able to see "US" as authentication options.
Kindly help for doing time sync.
Hi Sachin,
Hi Sachin,
Please, create a new topic if you have a new question.
Your settings seem to be ok and the meter should reply.
US is High authentication where the client address is changed to 48 (0x30). It's added to GXDLMSDirector to help reading.
BR,
Mikko