Hi Mikko,
I am trying to read an obis value from the meter. But it doesn't show its value in my application (returns System.Byte[] from "ShowValue" method)
Send AARQ request 00 01 00 01 00 01 00 38 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 41 61 31 32 33 34 35 2E BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 62 1E 5D FF FF
TX: 11:30:02 00 01 00 01 00 01 00 38 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 41 61 31 32 33 34 35 2E BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 62 1E 5D FF FF
RX: 11:30:02 00 01 00 01 00 01 00 44 61 42 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 88 02 07 80 89 07 60 85 74 05 08 02 01 AA 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 08 00 06 5F 1F 04 00 00 18 1F 02 00 00 07
Parsing AARE reply61 42 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 88 02 07 80 89 07 60 85 74 05 08 02 01 AA 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 08 00 06 5F 1F 04 00 00 18 1F 02 00 00 07
Parsing AARE reply succeeded.
Obis, ObjectType, Index: 0.0.96.54.1.255,1
Read scalers and units from the device.
-------- Reading GXDLMSData 0.0.96.54.1.255 Ch. 0 Man. spec. abstract object
TX: 11:30:05 00 01 00 01 00 01 00 0D C0 01 C1 00 01 00 00 60 36 01 FF 02 00
RX: 11:30:05 00 01 00 01 00 01 00 8E C4 01 C1 00 01 04 02 02 09 08 30 30 35 37 37 31 37 32 02 06 16 01 16 02 16 02 16 FF 16 01 0A 08 31 39 31 34 35 34 38 37 02 02 09 08 32 30 30 30 35 32 30 31 02 06 16 02 16 02 16 02 16 FF 16 03 0A 08 31 39 31 34 35 34 38 37 02 02 09 08 32 30 30 30 38 39 33 33 02 06 16 02 16 02 16 02 16 FF 16 03 0A 08 31 39 31 34 35 34 38 37 02 02 09 08 31 31 32 32 33 33 34 34 02 06 16 01 16 02 16 02 16 FF 16 01 0A 08 31 39 31 34 35 34 38 37
Index: 2 Value: [[System.Byte[], [1, 2, 2, 255, 1, 19145487]], [System.Byte[], [2, 2, 2, 255, 3, 19145487]], [System.Byte[], [2, 2, 2, 255, 3, 19145487]], [System.Byte[], [1, 2, 2, 255, 1, 19145487]]]
0.0.96.54.1.255 Ch. 0 Man. spec. abstract object
Hi, Byte array can be any…
Hi,
Byte array can be any data and it's not possible to show because it's the content of the data and it's not described anywhere. Basically, it can be e.g. string, octet-string, date, time or date-time,
You need to loop the array and convert each column to the string. This is something that can't be done without knowing what meter is read and what meter is returning in the data.
BR,
Mikko
Hi Mikko, In GXDLMSDirector …
Hi Mikko,
In GXDLMSDirector => DLMS Translator, it can show us the value in green color. How does it recognize and show value?
Hi, That is a wild guess…
Hi,
That is a wild guess what it might be. :-)
It can be used in the translator, but it can't be used with real data. In this case, the output looks correct, but sometimes doesn't.
BR,
Mikko
I was thinking there might…
I was thinking there might be an existing method to make what you mentioned above in below if-block. Or I will my hand get dirty with it :) Thanks anyway.
public object ShowValue(object val, int pos){
.........
else if (val is System.Collections.IList)
{
string str = "[";
bool empty = true;
foreach (object it2 in val as System.Collections.IList)
{
if (!empty)
{
str += ", ";
}
empty = false;
if (it2 is byte[])
{
str += GXCommon.ToHex((byte[])it2, true);
}
else
{
str += it2.ToString();
}
}
str += "]";
val = str;
}
}
Hi, You can use this as a…
Hi,
You can use this as a base method, but it's not possible to add this the the DLMS library.
https://github.com/Gurux/Gurux.DLMS.Net/blob/master/Gurux.DLMS.Push.Lis…
BR,
Mikko