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.

Reading Modbus IP
#4
I suggest using profiles instead of scripts as it provides automatic re-connection and other features. For example, if you create a resident script with your code it will stop working if connection is lost. The only way to make it work again would be to restart the script via disable/enable.

TCP connection is created like this:
Code:
require('luamodbus')
mb = luamodbus.tcp()
mb:open('192.168.0.1', 502)
mb:connect()
Reply


Messages In This Thread
Reading Modbus IP - by camilo - 30.10.2019, 13:21
RE: Reading Modbus IP - by admin - 30.10.2019, 13:26
RE: Reading Modbus IP - by camilo - 05.11.2019, 12:52
RE: Reading Modbus IP - by admin - 05.11.2019, 12:57

Forum Jump: