kallileo
Lifetime Supporting Member
Then why don't you want to setup the Modbus TCP slave in the device tree and then use it with ModbusRequest FB instead of Modbus channels?
Check the Enable property of the ModbusTCPSlave and check the following link as could be usefull.
https://faq.codesys.com/display/CDSFAQ/Modbus+TCP+Slave%3A+Dynamic+Setting+of+the+IP+Address
Check the Enable property of the ModbusTCPSlave and check the following link as could be usefull.
https://faq.codesys.com/display/CDSFAQ/Modbus+TCP+Slave%3A+Dynamic+Setting+of+the+IP+Address