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.

Spacelynk and Exiway Smart control
#4
Hi 

Been testing this at the office and got this to work.
Used this to decode the bits:
Code:
function getbit(value, nr)
 value = bit.rshift(value, nr)
 return bit.band(value, 1) == 1
end

value = event.getvalue()

grp.checkupdate('32/5/1', getbit(value, 0))
grp.checkupdate('32/5/2', getbit(value, 1))
grp.checkupdate('32/5/3', getbit(value, 2))
grp.checkupdate('32/5/4', getbit(value, 3))
grp.checkupdate('32/5/5', getbit(value, 4))
grp.checkupdate('32/5/6', getbit(value, 5))
grp.checkupdate('32/5/7', getbit(value, 6))
grp.checkupdate('32/5/8', getbit(value, 7))
Runs as Event based script in each register.
Works like a charm.
This is the result.
   

The objects called "dummy_something" is bits not explained in the application note.
Its the only thing I can't figure out.
.pdf   AN049_v1.0_Exiway Smart Control - SpaceLYnk.pdf (Size: 760.24 KB / Downloads: 12)


Eirik
Reply


Messages In This Thread
Spacelynk and Exiway Smart control - by eirik - 07.11.2018, 10:45
RE: Spacelynk and Exiway Smart control - by eirik - 08.11.2018, 14:20

Forum Jump: