The idea of keep-alive is to keep the connection up. You don't read anything with a keep-alive message. You can use a normal read to read the register that you want to.
You can read association view and read all registers or you can read only register value. Like this:
r = GXDLMSegister("LOGICAL_NAME")
#Read scaler and unit.
self.read(r, 3)
#Read value.
self.read(r, 2)
Thanks. I understand it.
But perhaps between the readings of the registers I will do some other functions and the difference in time between the readings of the registers will be significant. The connection may be disconnected.
And thanks for the extra code.
I am not a strong programmer, but the task is to read data from a counter.
You need to create a timer that will call keepalive with a given time period.
You need to stop the timer every time when you read or write something to the meter and start it afterward.
Hi,
Hi,
The idea of keep-alive is to keep the connection up. You don't read anything with a keep-alive message. You can use a normal read to read the register that you want to.
You can read association view and read all registers or you can read only register value. Like this:
r = GXDLMSegister("LOGICAL_NAME")
#Read scaler and unit.
self.read(r, 3)
#Read value.
self.read(r, 2)
More information from the register value you can get from here:
http://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSRegister
BR,
Mikko
Thanks. I understand it.
Thanks. I understand it.
But perhaps between the readings of the registers I will do some other functions and the difference in time between the readings of the registers will be significant. The connection may be disconnected.
And thanks for the extra code.
I am not a strong programmer, but the task is to read data from a counter.
Hi,
Hi,
You need to create a timer that will call keepalive with a given time period.
You need to stop the timer every time when you read or write something to the meter and start it afterward.
BR,
Mikko
I don't know how to work with
I don't know how to work with the timer yet, but I will figure it out. Thanks for the tip.