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 RTU to TCP bridging
#8
Did you unlock the locking pad on the IFM interface? 

• protected by password where a password is required in the command
• protected by configuration: ◦ with the IFM interface, the remote control commands are enabled when the locking pad on the IFM interface is in the open position.

In sample below the used password is 0000 (ASCII 00 = 00110000 00110000 => 12336 in Decimal) 

Code:
require('luamodbus')
mb = luamodbus.rtu()
mb:open('/dev/RS485', 19200, 'E', 8, 1, 'H')
mb:connect()
mb:setslave(1)
if event.getvalue() == true then
  mb:writeregisters(7999, 904, 10, 4353,1,12336,12336,0,0,0,0,0,0,0,0,0,0,0,8019,8020,8021) -- Open command
else
  mb:writeregisters(7999, 905, 10, 4353,1,12336,12336,0,0,0,0,0,0,0,0,0,0,0,8019,8020,8021) -- Close command
end
mb:close()
Reply


Messages In This Thread
RE: Modbus RTU to TCP bridging - by Daniel - 20.05.2021, 07:37
RE: Modbus RTU to TCP bridging - by Daniel - 21.05.2021, 07:42
RE: Modbus RTU to TCP bridging - by admin - 21.05.2021, 13:06
RE: Modbus RTU to TCP bridging - by Erwin van der Zwart - 25.05.2021, 08:57
RE: Modbus RTU to TCP bridging - by cekca - 27.05.2021, 07:27

Forum Jump: