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.

Data type
#1
Code:
-- Gets values
value1 = grp.getvalue('3/3/0')
value2 = grp.getvalue('3/3/1')
-- Math calculus, is, us, uh
if value1 > value2 then
-- Writes correct value to group address
grp.update('3/3/9', value2)
else
grp.update('3/3/9', value1)
end

I have this script that compares two values and writes the lowest value to a group address. However, I´m not writing it in the correct format. Consequently, the data will not display on screens in the house. ETS does not recognise the data type as a temperature, rather as a 2-byte float.

How do I write a 9.001 Temperature data type to the group?
Reply
#2
There's no difference between generic 2-byte float and 9.001 Temperature, you just have to set 3/3/9 object datatype correctly. ETS might not display values correctly for objects that are not in its database.
Reply
#3
But a display should display them correctly?

Currently I´m getting 0 °C, although I know I'm sending data to the group address. It should display 10 °C...
Reply
#4
You should use grp.write if your display is connected to KNX/TP.
Reply
#5
I just changed it to that. Not at site at this moment, however, when I used group monitor (remotely) in ETS it actually showed up there with grp.update. Is that because its connected remotely through the LM?
Reply
#6
ETS uses tunneling connection and grp.update forwards telegrams to KNX/IP routing an tunneling by default, unless filtering is enabled.
Reply
#7
Gotcha! Thanks!
Reply
#8
You were correct - It now functions properly!
Reply


Forum Jump: