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 Writes Fail after Reads
#6
"method called on invalid context" means that the connection is not open or already closed.
Both examples will produce this error:
Code:
mb = require('luamodbus').tcp()
mb:open(IP, PORT)
mb:connect()
mb:close()

res, err = mb:readregisters(0)

Code:
mb = require('luamodbus').tcp()
res, err = mb:readregisters(0)
Reply


Messages In This Thread
RE: Modbus TCP Writes Fail after Reads - by admin - 19.09.2022, 06:20

Forum Jump: