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 values wrong
#12
Use writeregistervalue, writeregisters can only write 16-bit register values. In case you need to set a different swap mode, pass it as the 4th argument to writeregistervalue and in lowercase ('n', 'b', 'w' or 'wb').
Code:
res, err = mb:writeregistervalue(4887, value, 'float32')
log(res, err)
Reply


Messages In This Thread
Modbus values wrong - by arnocl - 19.01.2020, 20:26
RE: Modbus values wrong - by admin - 20.01.2020, 08:12
RE: Modbus values wrong - by arnocl - 20.01.2020, 12:42
RE: Modbus values wrong - by admin - 20.01.2020, 13:08
RE: Modbus values wrong - by arnocl - 20.01.2020, 13:11
RE: Modbus values wrong - by admin - 20.01.2020, 13:28
RE: Modbus values wrong - by arnocl - 20.01.2020, 16:23
RE: Modbus values wrong - by admin - 20.01.2020, 17:05
RE: Modbus values wrong - by arnocl - 22.01.2020, 18:58
RE: Modbus values wrong - by admin - 23.01.2020, 06:28
RE: Modbus values wrong - by TomasIha - 24.05.2022, 17:22
RE: Modbus values wrong - by admin - 25.05.2022, 06:36
RE: Modbus values wrong - by TomasIha - 25.05.2022, 07:57

Forum Jump: