22.12.2016, 09:35
If your register is not a bitmask but a single bit you can write it directly to a boolean object, any numeric value other than 0 will be treated as true. As for reading int16, you can use this:
Code:
value = mb:readregistervalue(123, 'int16')