25.05.2021, 08:57
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)
• 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()