1. Is it possible to run DLMS client and DLMS server with single controller ?
If yes then is there any example ?
2. Can we generate full frame by giving value to DLMS server ?
Example : Can we generate full frame of voltage by giving value like 230Voltage to DLMS server ?
3. Is there any way to identify request from the response of meter ?
Like if meter send voltage request(1.0.12.7.0.255) response, then is there any way to identify a perticualr response from meter is for voltage
1. Yes you can, but there is no example at the moment. It can be cone in autumn.
2. Yes. You just set the value and the framework handles everything else.
3. No. In DLMS framing there is a sequence counter, but PDU doesn't identify the response.
4. No.
For second number question
2. Yes. You just set the value and the framework handles everything else.
Any API or example, means how we can achive this ?
Is there any user guide ?
activePowerL1 is using activePowerL1Value as a reference value. When you update the UINT32 activePowerL1Value it's updated automatically for activePowerL1.
You need to call addRegisterObject to initialize it and add object for ALL_OBJECTS list.
I have added changes as below
Please can you let me know is it correct or not ?
Firstly I need only voltage related changes. So, I have added Voltage object in const gxObject* ALL_OBJECTS[] as per attached image [AllObject.jpg]
After that I have added voltage object with "svr_InitObjects" as per attached image [svr_InitObjects.jpg]
Next I have init server and client connection. Client got connected successfully with meter.
Please find attached image [ServerClientMeterConnection.jpg]
After that I am trying to generate frame from server based on fixed value of voltage.
But not able to generate frame.
Please find attached image of code [TryingTogetFrameFromValue.jpg].
Next I have init server and client connection. Client got connected successfully with meter.
Please find attached image [ServerClientMeterConnection.jpg]
After that I am trying to generate frame from server based on fixed value of voltage.
But not able to generate frame.
Please find attached image of code [TryingTogetFrameFromValue.jpg].
Hi, I don't fully understand what are you trying to accomplish, but as far as I understand (I’m not related to gurux) svr_handleRequest3 it’s not going to generate a frame from a value.
If you want to read the voltage you should request it from the client, here you have an example: https://github.com/Gurux/GuruxDLMS.c/blob/cf7c1bdd47287ac0a95fb439b1207…
And then the server must use the method svr_handleRequest to analyze the request and generate the response frame for the voltage.
Inshort I want below functionality
Need to run DLMS client and DLMS server in single controller.
By using DLMS client I need to read data from meter.
Lets take an example like I want to read current from meter. So I have send the request to read current from meter using DLMS client library.
Till now its working fine. means able to read the current from meter using DLMS client.
Now I got the response from meter and I have parsed it and get the value of current using GURUX library.
Now i want to pass that current value to DLMS server and need to generate frame.
Can I do that, if yes then , is there any API ?
If I understand correctly you want to read the value using the client and save the value at the server.
You can pass the value by reference in the addvoltageObject method with the macro GX_UINT32_BYREF and pass it the pointer to the variable where the client store the value.
Example: https://github.com/Gurux/GuruxDLMS.c/blob/cf7c1bdd47287ac0a95fb439b1207…
In the example the activePowerL1Value variable is passed as reference, this way whe it values is requested it's always updated.
Vitaol is correct. You need to implement both the server and the client. When svr_preRead is invoked you need to read value from the meter and server returns that read value.
Value is updated to e->value. You also need to set e->handled = 1.
Hi,
Hi,
1. Yes you can, but there is no example at the moment. It can be cone in autumn.
2. Yes. You just set the value and the framework handles everything else.
3. No. In DLMS framing there is a sequence counter, but PDU doesn't identify the response.
4. No.
BR,
Mikko
For second number question
For second number question
2. Yes. You just set the value and the framework handles everything else.
Any API or example, means how we can achive this ?
Is there any user guide ?
I am using c library
Hi,
Hi,
Read those as a start:
https://www.gurux.fi/Gurux.DLMS.Server
https://www.gurux.fi/Gurux.DLMS.microcontrollers
You can see how to create an active power register object from here:
https://github.com/Gurux/GuruxDLMS.c/blob/cf7c1bdd47287ac0a95fb439b1207…
activePowerL1 is using activePowerL1Value as a reference value. When you update the UINT32 activePowerL1Value it's updated automatically for activePowerL1.
You need to call addRegisterObject to initialize it and add object for ALL_OBJECTS list.
BR,
Mikko
I have added changes as below
I have added changes as below
Please can you let me know is it correct or not ?
Firstly I need only voltage related changes. So, I have added Voltage object in const gxObject* ALL_OBJECTS[] as per attached image [AllObject.jpg]
After that I have added voltage object with "svr_InitObjects" as per attached image [svr_InitObjects.jpg]
Next I have init server and client connection. Client got connected successfully with meter.
Please find attached image [ServerClientMeterConnection.jpg]
After that I am trying to generate frame from server based on fixed value of voltage.
But not able to generate frame.
Please find attached image of code [TryingTogetFrameFromValue.jpg].
After that I have added
After that I have added voltage object with "svr_InitObjects" as per attached image [svr_InitObjects.jpg]
Next I have init server and
Next I have init server and client connection. Client got connected successfully with meter.
Please find attached image [ServerClientMeterConnection.jpg]
After that I am trying to
After that I am trying to generate frame from server based on fixed value of voltage.
But not able to generate frame.
Please find attached image of code [TryingTogetFrameFromValue.jpg].
Hi, I don't fully understand
Hi, I don't fully understand what are you trying to accomplish, but as far as I understand (I’m not related to gurux) svr_handleRequest3 it’s not going to generate a frame from a value.
If you want to read the voltage you should request it from the client, here you have an example:
https://github.com/Gurux/GuruxDLMS.c/blob/cf7c1bdd47287ac0a95fb439b1207…
And then the server must use the method svr_handleRequest to analyze the request and generate the response frame for the voltage.
Inshort I want below
Inshort I want below functionality
Need to run DLMS client and DLMS server in single controller.
By using DLMS client I need to read data from meter.
Lets take an example like I want to read current from meter. So I have send the request to read current from meter using DLMS client library.
Till now its working fine. means able to read the current from meter using DLMS client.
Now I got the response from meter and I have parsed it and get the value of current using GURUX library.
Now i want to pass that current value to DLMS server and need to generate frame.
Can I do that, if yes then , is there any API ?
If I understand correctly you
If I understand correctly you want to read the value using the client and save the value at the server.
You can pass the value by reference in the addvoltageObject method with the macro GX_UINT32_BYREF and pass it the pointer to the variable where the client store the value.
Example:
https://github.com/Gurux/GuruxDLMS.c/blob/cf7c1bdd47287ac0a95fb439b1207…
In the example the activePowerL1Value variable is passed as reference, this way whe it values is requested it's always updated.
Hi,
Hi,
Vitaol is correct. You need to implement both the server and the client. When svr_preRead is invoked you need to read value from the meter and server returns that read value.
Value is updated to e->value. You also need to set e->handled = 1.
Check how clock is read and implement it in the same way.
https://github.com/Gurux/GuruxDLMS.c/blob/cf7c1bdd47287ac0a95fb439b1207…
BR,
Mikko
Hi,
Hi,
A VERY simple example is done in the next week to help you to get started.
BR,
Mikko
Can you please provide link
Can you please provide link for example ?
Hi,
Hi,
You can use this as a starting point.
https://github.com/Gurux/GuruxDLMS.c/tree/master/GuruxDLMSDataGateway/D…
It converts WRAPPER frames to HDLC frames.
BR,
Mikko