The document doesnt't tell the COSEM object type, but I believe that those are register objects.
Select device and select Edit and "Add object". Select Register as object type and set the OBIS code, e.g. 1.0.1.8.0.255.
Then try to read the value. If read succeeds, everything is ok. If it fails, you need to check the object type (it can also be data object) and OBIS code.
Hi,
When I try to connect to my meter, it's loading as collecting objects and can't connect. I think my client address is correct. Should I do any configuration or settings on my meter?
You must add one object manually before connecting to the meter, and then the objects are not collected when you establish the connection to the meter.
Hi,
Thank you for your help. Finally, I successfully got data from the meter. It is working great. Now, how can I get data in constant time? For example, I want to receive data from the meter once every 12 hours. smt like that.
The easiest way is if you read your meter with a client example and save the values to the database or file. The client example doesn't support this, so you need modify it for your needs.
Hi,
I downloaded Visual Studio and opened the DLMS client example, but I’m not sure how to adjust it to read data and save it. Could you please guide me on what to modify?
Hi,
I downloaded and opened Gurux.DLMS.Net in Visual Studio. Then I made a small change in the Program.cs file to log meter readings into a CSV file using this line:
File.AppendAllText("meter_log.csv", $"{DateTime.Now},{it.Key},{val}\n");
After building the project, I ran the executable from the Command Prompt like this:
Gurux.DLMS.Client.Example.Net.exe -S COM6 -b 9600 -c 10 -s 1 -r LN -a None -g "1.0.1.8.0.255:2"
The program connected to the meter and showed:
Connected:
Standard: DLMS
But then it gave this error:
Failed to receive reply from the device in given time.
System.Exception: Failed to receive reply from the device in given time.
at Gurux.DLMS.Reader.GXDLMSReader.ReadDLMSPacket(Byte[] data, GXReplyData reply) in C:\Users\Acer\Desktop\Gurux.DLMS.Net-master\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:line 1449
at Gurux.DLMS.Reader.GXDLMSReader.ReadDataBlock(Byte[] data, GXReplyData reply) in C:\Users\Acer\Desktop\Gurux.DLMS.Net-master\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:line 1556
at Gurux.DLMS.Reader.GXDLMSReader.SNRMRequest() in C:\Users\Acer\Desktop\Gurux.DLMS.Net-master\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:line 450
at Gurux.DLMS.Reader.GXDLMSReader.InitializeConnection() in C:\Users\Acer\Desktop\Gurux.DLMS.Net-master\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:line 840
at Gurux.DLMS.Client.Example.Program.Main(String[] args) in C:\Users\Acer\Desktop\Gurux.DLMS.Net-master\Gurux.DLMS.Client.Example.Net\Program.cs:line 151
After a few attempts, "This app can't run on your PC" error appeared on my computer
Hi, The document doesnt't…
Hi,
The document doesnt't tell the COSEM object type, but I believe that those are register objects.
Select device and select Edit and "Add object". Select Register as object type and set the OBIS code, e.g. 1.0.1.8.0.255.
Then try to read the value. If read succeeds, everything is ok. If it fails, you need to check the object type (it can also be data object) and OBIS code.
BR,
Mikko
Hi, When I added objects but…
Hi,
When I added objects but I think it's not working. How can I know or check it's working?
Thank you for helping me always. When I try to connect the added object, it's loading as collecting objects so long.
https://www.dropbox.com/scl/fi/8wu5uox1k6mtq61ieqy1d/Screenshot-2025-07…
Hi. Is it correct the OBIS…
Hi. Is it correct the OBIS code?
https://www.dropbox.com/scl/fi/kjaslhgdhza515jooev70/Screenshot-2025-07…
Hi, You can see if it's…
Hi,
You can see if it's working when you try to read it. The meter returns an error if object type or OBIS code is wrong.
BR,
Mikko
Hi, When I try to connect to…
Hi,
When I try to connect to my meter, it's loading as collecting objects and can't connect. I think my client address is correct. Should I do any configuration or settings on my meter?
Hi, You must add one object…
Hi,
You must add one object manually before connecting to the meter, and then the objects are not collected when you establish the connection to the meter.
BR,
Mikko
Hi, Thank you for your help…
Hi,
Thank you for your help. Finally, I successfully got data from the meter. It is working great. Now, how can I get data in constant time? For example, I want to receive data from the meter once every 12 hours. smt like that.
Hi, The easiest way is if…
Hi,
The easiest way is if you read your meter with a client example and save the values to the database or file. The client example doesn't support this, so you need modify it for your needs.
https://github.com/Gurux/Gurux.DLMS.Net/tree/master/Gurux.DLMS.Client.E…
BR,
Mikko
Hi, I downloaded Visual…
Hi,
I downloaded Visual Studio and opened the DLMS client example, but I’m not sure how to adjust it to read data and save it. Could you please guide me on what to modify?
Hi, I downloaded and opened…
Hi,
I downloaded and opened Gurux.DLMS.Net in Visual Studio. Then I made a small change in the Program.cs file to log meter readings into a CSV file using this line:
File.AppendAllText("meter_log.csv", $"{DateTime.Now},{it.Key},{val}\n");
After building the project, I ran the executable from the Command Prompt like this:
Gurux.DLMS.Client.Example.Net.exe -S COM6 -b 9600 -c 10 -s 1 -r LN -a None -g "1.0.1.8.0.255:2"
The program connected to the meter and showed:
Connected:
Standard: DLMS
But then it gave this error:
Failed to receive reply from the device in given time.
System.Exception: Failed to receive reply from the device in given time.
at Gurux.DLMS.Reader.GXDLMSReader.ReadDLMSPacket(Byte[] data, GXReplyData reply) in C:\Users\Acer\Desktop\Gurux.DLMS.Net-master\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:line 1449
at Gurux.DLMS.Reader.GXDLMSReader.ReadDataBlock(Byte[] data, GXReplyData reply) in C:\Users\Acer\Desktop\Gurux.DLMS.Net-master\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:line 1556
at Gurux.DLMS.Reader.GXDLMSReader.SNRMRequest() in C:\Users\Acer\Desktop\Gurux.DLMS.Net-master\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:line 450
at Gurux.DLMS.Reader.GXDLMSReader.InitializeConnection() in C:\Users\Acer\Desktop\Gurux.DLMS.Net-master\Gurux.DLMS.Client.Example.Net\GXDLMSReader.cs:line 840
at Gurux.DLMS.Client.Example.Program.Main(String[] args) in C:\Users\Acer\Desktop\Gurux.DLMS.Net-master\Gurux.DLMS.Client.Example.Net\Program.cs:line 151
After a few attempts, "This app can't run on your PC" error appeared on my computer
Hi, One of your settings is…
Hi,
One of your settings is different from what the meter expects. Select the meter in GXDLMSDirector, and you can see the correct command line arguments.
BR,
Mikko