This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

from watt to kilowatt
#1
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)
Reply


Messages In This Thread
from watt to kilowatt - by mai - 20.05.2024, 06:21
RE: from watt to kilowatt - by admin - 20.05.2024, 07:28

Forum Jump: