Post by ragarcia on Error while using UpdateConfiguredIPSettings to change IP address
CODESYS Forge
talk
(Post)
Hello everyone, I am trying to change dynamically by code the IP address of a Weidmuller controller. So I am basically using IoDrvEthernet library to use UpdateConfiguredIPSettings function but I am getting constantly the 'INVALID_STATE' error. Even though I am following a procedure it should work: * First I added on the config file of codesys the following: [SysSocket] Adapter.0.Name="eth0" Adapter.0.EnableSetIpAndMask=1 Adapter.1.Name="eth1" Adapter.1.EnableSetIpAndMask=1 * Secondly I am first disabling the ethernet interface by using Ethernet_0.Enable = FALSE and then executing DED.Reconfigure. After that, I run the Ethernet_1.updateConfiguredIPSettings Code: Ethernet_1.Enable:= EnableDisable; Reconfigure(xExecute:= TRUE, itfNode:= Ethernet_1, xError=> ErrorReconfigure, eError=> ErrorCodeReconfigure); IF Reconfigure.xDone THEN ErrorCodeIP:= Ethernet_1.UpdateConfiguredIPSettings(IPAddress:= newIP, SubnetMask:= newMask, Gateway:= newGW); END_IF IF Reconfigure.xDone OR Reconfigure.xError THEN Reconfigure(xExecute:= FALSE); END_IF Ethernet_1.Enable:= TRUE; Reconfigure(xExecute:= TRUE, itfNode:= Ethernet_1); IF Reconfigure.xDone OR Reconfigure.xError THEN Reconfigure(xExecute:= FALSE); END_IF Can someone help me? Thank you. All I am trying is to find a way to change dynamically with code, the IP addresses of my controller (2 ethernet ports).
Last updated: 2023-12-11
communication
CODESYS Forge
talk
(Thread)
communication
Last updated: 2023-08-19
NETVAR_UDP
CODESYS Forge
talk
(Thread)
NETVAR_UDP
Last updated: 2023-08-29
Post by eschwellinger on CODESYS Automation Server Connector for 3.5 SP11
CODESYS Forge
talk
(Post)
https://store.codesys.com/en/codesys-automation-server-connector.html Programming System CODESYS Development System V3.5.15.0 or higher
Last updated: 2023-08-30
VPN
CODESYS Forge
talk
(Thread)
VPN
Last updated: 2023-09-06
VPN
CODESYS Forge
talk
(Thread)
VPN
Last updated: 2023-09-06
VPN
CODESYS Forge
talk
(Thread)
VPN
Last updated: 2023-09-06
ernesto881124
CODESYS Forge
talk
(Thread)
ernesto881124
Last updated: 2023-09-14
Benutzeranmeldung
CODESYS Forge
talk
(Thread)
Benutzeranmeldung
Last updated: 2009-01-19
Trend
CODESYS Forge
talk
(Thread)
Trend
Last updated: 2021-11-26
Warten
CODESYS Forge
talk
(Thread)
Warten
Last updated: 2009-09-17
(no subject)
CODESYS Forge
talk
(Thread)
Last updated: 2007-09-28
IJSONData.FindAllElementsByKey
CODESYS Forge
talk
(Thread)
IJSONData.FindAllElementsByKey
Last updated: 2021-12-09
SysDir
CODESYS Forge
talk
(Thread)
SysDir
Last updated: 2022-02-15
MaxNodesPerRead
CODESYS Forge
talk
(Thread)
MaxNodesPerRead
Last updated: 2018-03-16
Time
CODESYS Forge
talk
(Thread)
Time
Last updated: 2023-03-03
Sprachumschaltung
CODESYS Forge
talk
(Thread)
Sprachumschaltung
Last updated: 2009-06-10
Reglersimulation
CODESYS Forge
talk
(Thread)
Reglersimulation
Last updated: 2018-01-16
swiping
CODESYS Forge
talk
(Thread)
swiping
Last updated: 2020-11-30
CODESYSControl.cfg
CODESYS Forge
talk
(Thread)
CODESYSControl.cfg
Last updated: 2015-06-02
how to run the machine using CNC editor in codesys
CODESYS Forge
talk
(Thread)
how to run the machine using CNC editor in codesys
Last updated: 2007-10-24
ESP8266
CODESYS Forge
talk
(Thread)
ESP8266
Last updated: 2016-10-29
Cmpiecvaracces
CODESYS Forge
talk
(Thread)
Cmpiecvaracces
Last updated: 2016-06-27
Projektinformationen
CODESYS Forge
talk
(Thread)
Projektinformationen
Last updated: 2018-05-15
MCP3424
CODESYS Forge
talk
(Thread)
MCP3424
Last updated: 2016-07-20
To search for an exact phrase, put it in quotes. Example: "getting started docs"
To exclude a word or phrase, put a dash in front of it. Example: docs -help
To search on specific fields, use these field names instead of a general text search. You can group with AND or OR.