Hi,
I am running the Arduino Server.ino the code is running well. using the GXDLMSDirector I can read the Active Energy (Ch. 1 L1 Active power+ (QI+QIV) Last avg. 3). and i found the active power register object is added using the function.
int addRegisterObject()
{
int ret;
const unsigned char ln[6] = { 1, 1, 21, 25, 0, 255 };
if ((ret = INIT_OBJECT(activePowerL1, DLMS_OBJECT_TYPE_REGISTER, ln)) == 0)
{
activePowerL1Value = 10;
GX_UINT16_BYREF(activePowerL1.value, activePowerL1Value);
//10 ^ 3 = 1000
activePowerL1.scaler = 3;
activePowerL1.unit = 30;
}
return ret;
}
How can I add more registered object?.. such as voltage, current, energy e.t.c
Am I to duplicate the above function for every register am to read?
Create a register object and add it to the association view. Then you need to copy the method above and set the correct parameters. Then call addRegisterObject and handle register read in svr_preRead and that's it.
Hi,
Hi,
Create a register object and add it to the association view. Then you need to copy the method above and set the correct parameters. Then call addRegisterObject and handle register read in svr_preRead and that's it.
BR,
Mikko