14.02.2020, 15:46
Now I have to set bit 3 of register 1280 to 1
This is the right code?
Thanks
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()