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.

Write in a Single Bit of a Word
#9
Now I have to set bit 3 of register 1280 to 1

This is the right code?
Code:
require("user.SetBit")

mb = require('mbproxy').new()
mb:setslave(1)

value = 1

if grp.getvalue('32/1/29') then
  value = setbit(value, 3)
end

log(value)

mb:writeregisters(1280, value)

mb:close()
Thanks
Reply


Messages In This Thread
RE: Write in a Single Bit of a Word - by UfficioTecnicoEE - 14.02.2020, 15:46

Forum Jump: