Modbus TCP with Opta in PLC IDE

I went through the article Modbus TCP On Opta Using PLC IDE but I could not understand how the "Master" mode actually works?

I am using the latest PLC IDE 1.0.8 and the Opta 1.2 firmware on the Opta.

I could get and set coils with QModMaster GUI tool and with the Python command line tool modbus. Also was it possible to get and set registers in the Opta from a Siemens LOGO!.

Up to now I used the Opta as a Slave. But activating the Master mode and setting up some registers on a Slave (the LOGO! or on a simulator like diagslave) did not show any effect.

Does Master mode work in 1.0.8 and Opta 1.2?

How does it get triggered? I was setting up a new Modbus device (below Ethernet) and with that I added some coil write and read items.

I guess I am missing something. How does the Opta know when to start communicating with other Modbus devices? I was just assuming that the Opta would all by herself decide when and how to get or set registers or coils (according to the set up configuration under the Modbus node) from a slave device. But, as nothing happens, I guess it's not working that way.

It turns out that one needs the Ethernet.begin() - otherwise Modbus TCP Master does nothing. I expected it to work with the default DHCP setting.

// shared variables can be accessed with PLCIn.varname and PLCOut.varname

void setup()
{
	// Configure static IP address
	IPAddress ip(192, 168, 1, 2);
	IPAddress dns(192, 168, 1, 1);
	IPAddress gateway(192, 168, 1, 1);
	IPAddress subnet(255, 255, 255, 0);
	// If cable is not connected this will block the start of PLC with about 60s of timeout!
	Ethernet.begin(ip, dns, gateway, subnet);
	
    // DHCP-Mode (siehe Beispiel unter folgendem Link auf github)
    // https://github.com/arduino-libraries/Arduino_ConnectionHandler/blob/0786d7afd7d6d91beb49a05c12289f2f03dbc0b3/examples/ConnectionHandlerDemo/ConnectionHandlerDemo.ino#L21
    //EthernetConnectionHandler ArduinoIoTPreferredConnection;

}

void loop()
{

}