Establish a connection to the device that you want to link via Ethernet/IP.
In this example, a Wago controller (Ethernet/IP adapter) is used again.
The required steps are listed in this FAQ article:

Connecting to a WAGO Fieldbus Coupler via Ethernet/IP (IP scanner)

Your project should look like this:

  • Adapt the POU PLC_PRG as follows:


    Declaration

    VAR
        xSet                : BOOL;
        abyNewIp            : ARRAY [0..3] OF BYTE := [192, 168, 99, 139]; // = wrong IpAddr !!
        itfEthIpRmAdapter   : IoDrvEthernetIP.IRemoteAdapter2;
    END_VAR

    Implementation

    IF xSet Then
        xSet := FALSE;
        itfEthIpRmAdapter := WAGO_750_352020_000_Ethernet_STD; // must be the exact name of the tree node
        itfEthIpRmAdapter.IPAddress := abyNewIp;        
    END_IF


  • Download the modified project to the controller.

  • By setting the variable, the incorrect IP address is sent to the remote adapter and its connection is lost.



    When the correct IP address is sent, the connection to the Ethernet/IP adapter is reestablished.