By kevin jose minj, 20 December, 2022 Forums General discussion what are the arguments I have to pass in this function ? def setValue(self, settings, e): and from where I invoke Hi, Hi, setValue is reserved for internal use and you don't use it. What do you want to do? BR, Mikko I want to set normal I want to set normal threshold in meter using python how can I do? Hi, Hi, Read the Threshold normal (Attribute index #4) from the meter. Then modify it and make sure that the data type is the same and write it back. If you know the data type, you don't need to read it. It's just to let you know the data type. http://gurux.fi/Gurux.DLMS.Objects.GXDLMSLimiter lim = GXDLMSLimiter("Logican name") self.read(lim, 4) #Modify limiter value. self.write(lim, 4) BR, Mikko I tried this one it is I tried this one it is returning access error Hi, Hi, What is your authentication level? I believe that you need to change the authentication level to High. Check also the data type. Read the value and try to write the same value back. If it succeeds, then your data type is wrong. BR, Mikko Can you show the example to Can you show the example to write the custom value in limiter syntactically? Actually now I am getting this exception raise Exception("Invalid parameter. In python value type must give.") lim = GXDLMSLimiter('0.0.17.0.0.255') #value = self.read(lim, 4) # Modify limiter value. lim.thresholdNormal= 0 value = self.write(lim, 4) and this is my pytho code Hi, Hi, You must use the correct type when writing. Something like this: lim = GXDLMSLimiter('0.0.17.0.0.255') lim.thresholdNormal = GXUInt32(0) #You need to change GXUInt32 to correct data type. value = self.write(lim, 4) BR, Mikko What is the correct datatype What is the correct datatype for thresholdNormal ? I used GXUInt32,GXUInt64,GXInt32,GXInt64 all are throwing exception only Hi, Hi, That depends on the target threshold. You can read the data type with GXDLMSDirector when you read the threshold normal. BR, Mikko In Gurux DLMS Director it is In Gurux DLMS Director it is showing UInt32 and I tried the GXUInt32.Is anything wrong here? Hi, Hi, Are you connecting with the High authentication level? BR, Mikko yes, High wtih yes, High wtih AuthenticationEncryption Hi, Hi, Can you change it with GXDLMSDirector? BR, Mikko Default it is that only . Default it is that only . Changing it is possible? Hi, Hi, It depends on the meter. If access rights are read/write you can change it. BR, Mikko Log in or register to post comments
Hi, Hi, setValue is reserved for internal use and you don't use it. What do you want to do? BR, Mikko
Hi, Hi, Read the Threshold normal (Attribute index #4) from the meter. Then modify it and make sure that the data type is the same and write it back. If you know the data type, you don't need to read it. It's just to let you know the data type. http://gurux.fi/Gurux.DLMS.Objects.GXDLMSLimiter lim = GXDLMSLimiter("Logican name") self.read(lim, 4) #Modify limiter value. self.write(lim, 4) BR, Mikko
Hi, Hi, What is your authentication level? I believe that you need to change the authentication level to High. Check also the data type. Read the value and try to write the same value back. If it succeeds, then your data type is wrong. BR, Mikko
Can you show the example to Can you show the example to write the custom value in limiter syntactically? Actually now I am getting this exception raise Exception("Invalid parameter. In python value type must give.") lim = GXDLMSLimiter('0.0.17.0.0.255') #value = self.read(lim, 4) # Modify limiter value. lim.thresholdNormal= 0 value = self.write(lim, 4) and this is my pytho code
Hi, Hi, You must use the correct type when writing. Something like this: lim = GXDLMSLimiter('0.0.17.0.0.255') lim.thresholdNormal = GXUInt32(0) #You need to change GXUInt32 to correct data type. value = self.write(lim, 4) BR, Mikko
What is the correct datatype What is the correct datatype for thresholdNormal ? I used GXUInt32,GXUInt64,GXInt32,GXInt64 all are throwing exception only
Hi, Hi, That depends on the target threshold. You can read the data type with GXDLMSDirector when you read the threshold normal. BR, Mikko
In Gurux DLMS Director it is In Gurux DLMS Director it is showing UInt32 and I tried the GXUInt32.Is anything wrong here?
Hi,
Hi,
setValue is reserved for internal use and you don't use it.
What do you want to do?
BR,
Mikko
I want to set normal
I want to set normal threshold in meter using python how can I do?
Hi,
Hi,
Read the Threshold normal (Attribute index #4) from the meter.
Then modify it and make sure that the data type is the same and write it back.
If you know the data type, you don't need to read it. It's just to let you know the data type.
http://gurux.fi/Gurux.DLMS.Objects.GXDLMSLimiter
lim = GXDLMSLimiter("Logican name")
self.read(lim, 4)
#Modify limiter value.
self.write(lim, 4)
BR,
Mikko
I tried this one it is
I tried this one it is returning access error
Hi,
Hi,
What is your authentication level? I believe that you need to change the authentication level to High.
Check also the data type. Read the value and try to write the same value back. If it succeeds, then
your data type is wrong.
BR,
Mikko
Can you show the example to
Can you show the example to write the custom value in limiter syntactically?
Actually now I am getting this exception
raise Exception("Invalid parameter. In python value type must give.")
lim = GXDLMSLimiter('0.0.17.0.0.255')
#value = self.read(lim, 4)
# Modify limiter value.
lim.thresholdNormal= 0
value = self.write(lim, 4)
and this is my pytho code
Hi,
Hi,
You must use the correct type when writing. Something like this:
lim = GXDLMSLimiter('0.0.17.0.0.255')
lim.thresholdNormal = GXUInt32(0)
#You need to change GXUInt32 to correct data type.
value = self.write(lim, 4)
BR,
Mikko
What is the correct datatype
What is the correct datatype for thresholdNormal ? I used GXUInt32,GXUInt64,GXInt32,GXInt64 all are throwing exception only
Hi,
Hi,
That depends on the target threshold. You can read the data type with GXDLMSDirector when you read the threshold normal.
BR,
Mikko
In Gurux DLMS Director it is
In Gurux DLMS Director it is showing UInt32 and I tried the GXUInt32.Is anything wrong here?
Hi,
Hi,
Are you connecting with the High authentication level?
BR,
Mikko
yes, High wtih
yes, High wtih AuthenticationEncryption
Hi,
Hi,
Can you change it with GXDLMSDirector?
BR,
Mikko
Default it is that only .
Default it is that only . Changing it is possible?
Hi,
Hi,
It depends on the meter. If access rights are read/write you can change it.
BR,
Mikko