14.12.2017, 21:09
(This post was last modified: 14.12.2017, 21:10 by Erwin van der Zwart.)
Hi,
Or use this function when you don't use modbus:
BR,
Erwin
Or use this function when you don't use modbus:
Code:
function getbit(value, nr)
value = bit.rshift(value, nr)
return bit.band(value, 1)
end
bit0 = getbit(0xFFFF,0)
log(bit0)
--...
bit15 = getbit(0xFFFF,15)
log(bit15)
BR,
Erwin