Changing and Getting IP Address of Modbus TCP with Program

I wrote the code using the link above. It works fine with ETH(IF2), but it doesn’t work with Modbus Tcp_any.

CfgGetIPAddr_1(
	enable := Get_ip_adr, 
	pDevice :=ADR('ST1'), 
	pIPAddr :=ADR(Current_ip), 
	Len := 20 );

Even if I use ‘SL1.IF2.ST1’ or ‘IF2.ST1’ for pDevice, I still get error 29000.
Is it not possible to read or modify the IP of modbusTCP_any with this function block?

Hello,

it is not possible to read or write the IP adress of a Modbus slave configured on a ETH interface of the master with this functions.

Basically it would be possible when parsing the configuration file on the PLC. Writing this file would also be possible but this includes a rather deep knowledge of this configuraiton files and also a restart after loading this file. AsIOMMan library would be the library in question

best regards

Oliver