naks - 2024-07-08

Hi,

I'm working with wago 750-8212 controller. I want to change the IP address of the Ethernet adapter from webvisu. I have read some other threads in this forum and I have tried the following:

Added the following text to the config file CODESYSControl.cfg:

[SysSocket]
Adapter.0.Name="br1"
Adapter.0.EnableSetIpAndMask=1

Used the below code :

IF xUpdateEthernet THEN

    Ethernet.Enable := FALSE;
    Reconfig    (
                xExecute        := TRUE,
                itfNode         := Ethernet,
                eError          => ErrorReconfig,
                xBusy           => xBusy,
                xDone           => xDone,
                xError          => xErrorReconfigure);

    IF Reconfig.xDone THEN
        ErrorCode   := Ethernet.UpdateConfiguredIPSettings(IpAddress := NewIp, gateway := newGateway, subnetmask := newSubnetmask);
    END_IF

    IF Reconfig.xDone OR Reconfig.xError THEN
        reconfig(xExecute := FALSE);
    END_IF

    Ethernet.Enable := TRUE;
    Reconfig(xExecute := TRUE, itfNode := Ethernet );
END_IF

I could change the IP address but when i restart my Controller then the IP address resets to the original, Is there anything I have missed, what else can i try ?

Thank you in advance.