I would like to read multiple object/OBIS Code using ANSCI C after connecting to DLMS meter at the same time would like to print value in readable format.
My idea is
1. Collect all the OBIS code - How to create multiple object list
2.read one by one and print its value based on data type in readable format
Please provide some psudeo code stuff
I am bit confused with readScaler and readList
I want to make it simple like
1.Create an array of obis code list
2.use com_read()
objectArray objects;
oa_init(&objects);
//Add objects that you want to read:
arr_push(&list, key_init(obj, 2));
ret = com_readList(connection, &list);
arr_clear(&list);
Hi Vijay,
Hi Vijay,
You can read multiple object like this:
objectArray objects;
oa_init(&objects);
//Add objects that you want to read:
arr_push(&list, key_init(obj, 2));
ret = com_readList(connection, &list);
arr_clear(&list);
BR,
Mikko
Hi Mikko,
Hi Mikko,
Thank you for reply. please correct me if am wrong in the code.
objectArray objects;
gxArray list;
gxClock clock1;
gxData cumBC;
con_init()
cl_init()
com_initializeConnection(&con);
cosem_init(&cumBC.Base,DLMS_OBJECT_TYPE_DATA,"0.0.0.1.0.255")
cosem_init(&clock1,DLMS_OBJECT_TYPE_CLOCK,"0.0.1.0.0.255")
gxObject *obj = BASE(cumBC);
gxObject *obj1= BASE(clock1);
oa_init(&objects);
arr_init(&list);
arr_push(&list,key_init(obj,2));
arr_push(&list,key_init(obj1,2));
com_readList(&con,&list);
But am not getting expected result. Below is my trace
TX: 7E A0 1A 03 41 32 F7 98 E6 E6 00 C0 03 81 01 00 01 00 00 00 01 00 FF 02 00 A3 AF 7E
RX: 7E A0 10 41 03 52 47 E1 E6 E7 00 0E 05 03 02 F5 CB 7E
Unsupported Service
Please help
Thanks
Vijay
Hi Vijay,
Hi Vijay,
Can you make a connection to the meter with GXDLMSDirector. There are Proposed and Negotiated parameters.
Can you see MultipleReferences in Negotiated? If not, your meter is not supporting this functionality
and you need to read values one by one.
BR,
Mikko
Hi,
Hi,
I am able to make connection with meter using DLMSDirector. But the blow trace is from my code
TX: 7E A0 07 03 41 93 5A 64 7E
RX: 7E A0 1E 41 03 73 8E 7F 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
TX: 7E A0 40 03 41 10 5F 93 E6 E6 00 60 32 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 06 80 04 6C 6E 74 31 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF 39 24 7E
RX: 7E A0 37 41 03 30 21 79 E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 10 1D 02 30 00 07 76 52 7E
TX: 7E A0 1A 03 41 32 F7 98 E6 E6 00 C0 03 81 01 00 08 00 00 01 00 00 FF 02 00 FB 92 7E
RX: 7E A0 10 41 03 52 47 E1 E6 E7 00 0E 05 03 02 F5 CB 7E
TX: 7E A0 07 03 41 53 56 A2 7E
RX: 7E A0 1E 41 03 73 8E 7F 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
Can you plesae confirm wheter is it supporting or not?
Thanks
Vijay
Hi,
Hi,
Your meter is not supporting MultipleReferences. You need to read values one by one.
http://www.gurux.fi/GuruxDLMSTranslator?translate=7EA0374103302179E6E70…
BR,
Mikko
Thank you so much. got a
Thank you so much. got a clarity