13.07.2020, 13:03
(This post was last modified: 13.07.2020, 13:04 by savaskorkmaz.)
Hi,
When i changed the data type to 250 byte string original object data comes from KNX ( 0000005A000000FF0001 ) looks on Logic Machine like ( Z�▯ ) . Please check it out the object logs screenshot which is attached.
Event Script is not working when the value is ( Z�▯ )
We need 13 bits and 8 bytes it means total 21 points from 1 10 bytes objects. Can you check the script below also?
Regards,
value = event.getvalue()
addr = bit.band(value, 0xAF)
function getbit(value, nr)
value = bit.rshift(value, nr)
return bit.band(value, 1) == 1
end
grp.checkupdate('32/1/1', getbit(value,0))
grp.checkupdate('32/1/2', getbit(value,1))
grp.checkupdate('32/1/3', getbit(value,2))
grp.checkupdate('32/1/4', getbit(value,3))
grp.checkupdate('32/1/5', getbit(value,4))
grp.checkupdate('32/1/6', getbit(value,8))
grp.checkupdate('32/1/7', getbit(value,9))
grp.checkupdate('32/1/8', getbit(value,10))
grp.checkupdate('32/1/9', getbit(value,11))
grp.checkupdate('32/1/10', getbit(value,12))
grp.checkupdate('32/1/11', getbit(value,13))
grp.checkupdate('32/1/12', getbit(value,14))
grp.checkupdate('32/1/13', getbit(value,15))
bytes3 = { value:byte(3, #value) }
bytes4 = { value:byte(4, #value) }
bytes5 = { value:byte(5, #value) }
bytes6 = { value:byte(6, #value) }
bytes7 = { value:byte(7, #value) }
bytes8 = { value:byte(8, #value) }
bytes9 = { value:byte(9, #value) }
grp.checkupdate('32/1/14', bytes3)
grp.checkupdate('32/1/15', bytes4)
grp.checkupdate('32/1/16', bytes5)
grp.checkupdate('32/1/17', bytes6)
grp.checkupdate('32/1/18', bytes7)
grp.checkupdate('32/1/19', bytes8)
grp.checkupdate('32/1/20', bytes9)
grp.checkupdate('32/1/21', bytes10)
When i changed the data type to 250 byte string original object data comes from KNX ( 0000005A000000FF0001 ) looks on Logic Machine like ( Z�▯ ) . Please check it out the object logs screenshot which is attached.
Event Script is not working when the value is ( Z�▯ )
We need 13 bits and 8 bytes it means total 21 points from 1 10 bytes objects. Can you check the script below also?
Regards,
value = event.getvalue()
addr = bit.band(value, 0xAF)
function getbit(value, nr)
value = bit.rshift(value, nr)
return bit.band(value, 1) == 1
end
grp.checkupdate('32/1/1', getbit(value,0))
grp.checkupdate('32/1/2', getbit(value,1))
grp.checkupdate('32/1/3', getbit(value,2))
grp.checkupdate('32/1/4', getbit(value,3))
grp.checkupdate('32/1/5', getbit(value,4))
grp.checkupdate('32/1/6', getbit(value,8))
grp.checkupdate('32/1/7', getbit(value,9))
grp.checkupdate('32/1/8', getbit(value,10))
grp.checkupdate('32/1/9', getbit(value,11))
grp.checkupdate('32/1/10', getbit(value,12))
grp.checkupdate('32/1/11', getbit(value,13))
grp.checkupdate('32/1/12', getbit(value,14))
grp.checkupdate('32/1/13', getbit(value,15))
bytes3 = { value:byte(3, #value) }
bytes4 = { value:byte(4, #value) }
bytes5 = { value:byte(5, #value) }
bytes6 = { value:byte(6, #value) }
bytes7 = { value:byte(7, #value) }
bytes8 = { value:byte(8, #value) }
bytes9 = { value:byte(9, #value) }
grp.checkupdate('32/1/14', bytes3)
grp.checkupdate('32/1/15', bytes4)
grp.checkupdate('32/1/16', bytes5)
grp.checkupdate('32/1/17', bytes6)
grp.checkupdate('32/1/18', bytes7)
grp.checkupdate('32/1/19', bytes8)
grp.checkupdate('32/1/20', bytes9)
grp.checkupdate('32/1/21', bytes10)