Logic Machine Forum
LM Modbus slave Application Note 016 - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: LM Modbus slave Application Note 016 (/showthread.php?tid=4178)



LM Modbus slave Application Note 016 - SigmaTec - 06.08.2022

Hi all,

scripting Lua lines to tune my LM (a Wiser For KNX one) in order to make it a Modbus Slave, I use with succes the application note "AN016_spaceLYnk_as_a_Modbus slave_v2.0" from Schneider Electric in Modbus RTU.

Modbus master is an EGX150 Schneider Electric.

So, success is not forthcoming when I try to turn my LM to be a Modbus TCP Slave, as the application note explain it's possible to do.

-- modbus init
if not mb then
--****************************************************
-->>>>>>>>>Modbus slave setting<<<<<<<<<<<<<<<<<<<<<<<
require('luamodbus')
mb = luamodbus.tcp()
-- IP:10.154.12.73, port: 502
mb:open('192.168.1.49', 502)   -- my LM @IP
mb:connect()
-- slave id
mbConfusedetslave(10)

../..


All your ideas are welcome !
Thank's in advance.

Dominique


RE: LM Modbus slave Application Note 016 - admin - 08.08.2022

Remove mb:connect() and use 0.0.0.0 as listening IP: mb:open('0.0.0.0', 502)


RE: LM Modbus slave Application Note 016 - SigmaTec - 08.08.2022

Your pourpose :

Remove mb:connect() and use 0.0.0.0 as listening IP: mb:open('0.0.0.0', 502)


Sorry, but it doesn't work for me, only Modbus RTU run correctly (502 port is ok on LM and gateway) :

Note : I use LM as Modbus slave with an EGX150 Schneider Gateway

???


RE: LM Modbus slave Application Note 016 - admin - 08.08.2022

Post your whole script.


RE: LM Modbus slave Application Note 016 - SigmaTec - 09.08.2022

Hi Admin,

after few tests, it is ok now for Modbus slave TCP.