Read Landis+Gyr Meter

5 posts / 0 new
Last post
keenangeorge
Read Landis+Gyr Meter

Hi Mikko

I am trying to read specific obis code from Landis+Gyr meter.

GXDLMSRegister it_active_import_total = new GXDLMSRegister("1.1.1.8.0.255");
Object Total_Active_Import = comm.Read(it_active_import_total, 2, msno, host);

However i get a error Input String incorrect format.

2017/04/15 04:47:36 PM Info Initializing Network connection to Device 96655553 10.15.0.3 10001
2017/04/15 04:47:37 PM Info 96655553 SNRM Request 7E A0 07 03 21 93 0F 01 7E
2017/04/15 04:47:37 PM Reading Object 96655553 10.15.0.3 7E A0 07 03 21 93 0F 01 7E
2017/04/15 04:47:38 PM Info Meter Reply 96655553 10.15.0.3 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
2017/04/15 04:47:38 PM Info Meter Reply 96655553 10.15.0.3 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01
2017/04/15 04:47:38 PM Reading Object 96655553 10.15.0.3 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 02 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 5C 03 20 FF FF A2 6A 7E
2017/04/15 04:47:39 PM Info Meter Reply 96655553 10.15.0.3 7E A0 37 21 03 30 6C 7C E6 E7 00 61 28 A1 09 06 07 60 85 74 05 08 01 02 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 0F 04 0D 08 00 06 5F 1F 04 00 18 02 20 09 60 FA 00 0A A8 7E
2017/04/15 04:47:39 PM Reading Object 1.1.1.8.0.255 96655553 10.15.0.3
2017/04/15 04:47:39 PM Error96655553 10.15.0.3 System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseUInt32(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.UInt16.Parse(String s, NumberStyles style, NumberFormatInfo info)
at System.String.System.IConvertible.ToUInt16(IFormatProvider provider)
at System.Convert.ToUInt16(Object value)
at Gurux.DLMS.GXDLMSClient.Read(Object name, ObjectType objectType, Int32 attributeOrdinal, GXByteBuffer data) in C:\vsts-agent-win7-x64-2.109.1\_work\6\s\development\GXDLMSClient.cs:line 1498
at Gurux.DLMS.GXDLMSClient.Read(GXDLMSObject item, Int32 attributeOrdinal) in C:\vsts-agent-win7-x64-2.109.1\_work\6\s\development\GXDLMSClient.cs:line 1524
at Meter_Reading_Register_Tool.GXCommunicatation.Read(GXDLMSObject it, Int32 attributeIndex, Int32 msno, String host) in C:\Users\Keenan\Source\Meter_Reading_Register_Tool\Meter_Reading_Register_Tool\classes\GXCommunicatation.cs:line 203
at Meter_Reading_Register_Tool.initialize_comms.open_tcp_connection(String id, String host, String port, Int32 msno, Int32 meterId) in C:\Users\Keenan\Source\Meter_Reading_Register_Tool\Meter_Reading_Register_Tool\classes\initialize_comms.cs:line 100
2017/04/15 04:47:39 PM Reading Object 96655553 10.15.0.3 7E A0 07 03 21 53 03 C7 7E
2017/04/15 04:47:40 PM Info Meter Reply 96655553 10.15.0.3 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 3E 07 04 00 00 00 01 08 04 00 00 00 01 07 22 7E
2017/04/15 04:47:40 PM Info Disconnecting from the meter 96655553 10.15.0.3
2017/04/15 04:47:40 PM Reading Object 96655553 10.15.0.3 7E A0 07 03 21 53 03 C7 7E
2017/04/15 04:47:40 PM Unable to Close Meter Connection 96655553 10.15.0.3

Can we read the Landis+gyr meter like above.

Regards
Keenan George

keenangeorge

Resolved

keenangeorge

Hi Mikko

When reading extended register using short-code referencing.

GXDLMSExtendedRegister max_demand = new GXDLMSExtendedRegister("1.1.9.6.1.255", 54000);
Object Demand = comm.Read(max_demand, 2);

I am getting error (Input string was not in a correct format)

When i check the GXDLMSExtendedRegister object its in the correct format.
/// <summary>
/// Constructor.
/// </summary>
/// <param name="ln">Logical Name of the object.</param>
/// <param name="sn">Short Name of the object.</param>
public GXDLMSExtendedRegister(string ln, ushort sn)
: base(ObjectType.ExtendedRegister, ln, 0)
{
}

Can you point me in the right direction please.

Regards
Keenan George

Kurumi
Kurumi's picture

Hi Keenan George,

You have found an issue from our code. :-)
Most of meters are using Logical Name referencing at the moment.
For some reason short name is given as zero.

We have fixed this. Get latest version.

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

keenangeorge

Thanks Mikko

Issue solved.

BR