The library Ethernet.lib
EthSetIPConfig
This function sets the IP configuration of the control.
Since this is a synchronous function, this may not be called from the Default_Task (no task assignment
from PLC_PRG), since otherwise the task monitoring takes effect.
The changes of the setting are first adopted after the next startup. A restart of the control can be initiated
with the PLCReboot function from the PLCService.lib.
In/Out variable Data type Description
pIPConfig T_IPConfig *)
*) T_IPConfig
The structure contains the following variables:
Variable Data type Description
Name STRING(15) Name of the control, e.g. 'myPLC'
IP STRING(15) IP address, e.g. '192.168.5.20'
SubnetMask STRING(15) Subnet mask, e.g. '255.255.255.0'
Gateway STRING(15) Gateway address, e.g. '192.168.5.1'
DHCP BOOL If TRUE then the IP address is automatically polled
by the DHCP server. The current IP address of the
control can then be differently from the configured
one.
See also the topic 'Ethernet connection' in the system manual.
CECX-III 2