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 TCP Slave
#6
2 Bytes floating point is a number so it cannot raise an error. Can you post data types for all objects?

Try this function instead of tonumber (add it to script and replace tonumber with mbtonumber):
Code:
function mbtonumber(val)
  if type(val) == 'boolean' then
    return val and 1 or 0
  else
    return tonumber(val) or 0
  end
end
Reply


Messages In This Thread
ModBus TCP Slave - by Gadjoken - 20.11.2019, 16:09
RE: ModBus TCP Slave - by admin - 20.11.2019, 16:23
RE: ModBus TCP Slave - by Gadjoken - 20.11.2019, 16:45
RE: ModBus TCP Slave - by admin - 20.11.2019, 17:06
RE: ModBus TCP Slave - by Gadjoken - 21.11.2019, 07:03
RE: ModBus TCP Slave - by admin - 21.11.2019, 07:44

Forum Jump: