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.

Visualizing Modbus objects
#5
This generating a test to be able to check the Modbus TCP communication, but when I put four data it jumps to the next address and does not take me in data that I send it. What could be failing?
I am using this code: http://openrb.com/lm-as-modbus-tcp-slave

CODE:
if not mb1 then
require('luamodbus')
mb1 = luamodbus.tcp()
mb1:open('192.168.0.10', 502)
mb1:connect()
end


--Data1ModbusTCP
coil = mb1:readcoils(0)
grp.write('5/1/1', coil)

--Dato2ModbusTCP
coil2 = mb1:readcoils(0)
grp.write('5/1/2', coil2)

--Dato3ModbusTCP
register = mb1:readregisters(0)
grp.write('5/1/3', register)

--register2 = mb1:readregisters(0)
--grp.write('5/1/4', register2)
Reply


Messages In This Thread
Visualizing Modbus objects - by Rodriguez - 12.07.2017, 14:36
RE: Visualizing Modbus objects - by admin - 12.07.2017, 15:17
RE: Visualizing Modbus objects - by Rodriguez - 12.07.2017, 16:26
RE: Visualizing Modbus objects - by admin - 12.07.2017, 16:38
RE: Visualizing Modbus objects - by Rodriguez - 13.07.2017, 15:51
RE: Visualizing Modbus objects - by admin - 14.07.2017, 08:19
RE: Visualizing Modbus objects - by Rodriguez - 17.07.2017, 14:11
RE: Visualizing Modbus objects - by admin - 17.07.2017, 14:42

Forum Jump: