20.05.2024, 06:21
I have done this scritp to change the value from watt/h to kilowatt/h. But it gives me always 0. Why??
-------------------------------------------------------------------------------
function kilowatt()
local value = event.getvalue('32/2/16')
if value then
local new_value = value * 0.001
return new_value
else
end
end
local valor = kilowatt()
grp.write('32/2/16', valor)
-------------------------------------------------------------------------------
function kilowatt()
local value = event.getvalue('32/2/16')
if value then
local new_value = value * 0.001
return new_value
else
end
end
local valor = kilowatt()
grp.write('32/2/16', valor)