SpaceLogic KNX Forum
Schneider Electric SpaceLogic KNX forum to get support and share knowledge including selection, installation and troubleshooting for spaceLYnk, Wiser for KNX, eConfigure KNX, SpaceLogic KNX Hybrid module and other topics.
Posted: 2016-12-07 12:08 AM . Last Modified: 2024-07-14 11:54 PM
Link copied. Please paste this link to share this article on your social media post.
Is there anybody that have a script for this function?
Link copied. Please paste this link to share this article on your social media post.
Hi Martin,
I think you can easily do this with a extra object (or can also be by storage), now done by extra byte object, also easy to see what next rotation value will be (;
Script would look like this: (link it as event based to the object controlled by the binary input)
address_line_1 = '14/0/0' -- bit object
address_line_2 = '14/0/1' -- bit object
address_line_3 = '14/0/2' -- bit object
address_rotation = '14/0/3' -- byte object
value_line_1 = grp.getvalue(address_line_1)
value_line_2 = grp.getvalue(address_line_2)
value_line_3 = grp.getvalue(address_line_3)
value = event.getvalue()
if value == true then
value_rotation = grp.getvalue(address_rotation)
if value_rotation == 0 then
if value_line_1 == false then
grp.write(address_line_1, true)
end
if value_line_2 == true then
grp.write(address_line_2, false)
end
if value_line_3 == true then
grp.write(address_line_3, false)
end
grp.update(address_rotation, 1 )
elseif value_rotation == 1 then
if value_line_1 == true then
grp.write(address_line_1, false)
end
if value_line_2 == false then
grp.write(address_line_2, true)
end
if value_line_3 == true then
grp.write(address_line_3, false)
end
grp.update(address_rotation, 2)
elseif value_rotation == 2 or value_rotation > 2 then
if value_line_1 == true then
grp.write(address_line_1, false)
end
if value_line_2 == true then
grp.write(address_line_2, false)
end
if value_line_3 == false then
grp.write(address_line_3, true)
end
grp.update(address_rotation, 0)
end
else
if value_line_1 == true then
grp.write(address_line_1, false)
end
if value_line_2 == true then
grp.write(address_line_2, false)
end
if value_line_3 == true then
grp.write(address_line_3, false)
end
end
Best regards,
Erwin van der Zwart
Link copied. Please paste this link to share this article on your social media post.
Thanks Erwin,
it works great.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.