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.

Modbus, getting bits in a register
#3
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')
Reply


Messages In This Thread
RE: Modbus, getting bits in a register - by admin - 22.12.2016, 09:35

Forum Jump: