Info |
---|
Establish a connection to the device that you want to link via Ethernet/IP. Your project should look like this: |
Adapt the POU PLC_PRG as follows:
Section Column width 7 Declaration
Column width 93 Code Block theme Confluence VAR xSet : BOOL; abyNewIp : ARRAY [0..3] OF BYTE := [192, 168, 99, 139]; // = wrong IpAddr !! itfEthIpRmAdapter : IoDrvEthernetIP.IRemoteAdapter2; END_VAR
Section Column width 7 Implementation
Column width 93 Code Block theme Confluence 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.