The changeIPAddress
function block provides the capability to change dynamically a controller IP address, its subnet mask and its gateway address. The function block can also save the IP address so that it is used in subsequent reboots of the controller.
Input |
Type |
Comment |
---|---|---|
|
|
|
|
|
TRUE: save configuration for subsequent reboots of the controller. |
|
|
The input |
|
|
The new IP Address to be configured. Format: 0.0.0.0. |
|
|
The new subnet mask. Format: 0.0.0.0 |
|
|
The new gateway IP address. Format: 0.0.0.0 |
Output |
Type |
Comment |
---|---|---|
|
|
TRUE: if IP Addresses have been successfully configured or if default IP Addresses have been successfully configured because input |
|
|
Function block active. |
|
|
|
|
|
|
|
|
Configuration saved for the subsequent reboots of the controller. |
|
|
Current controller IP address. Format: 0.0.0.0. |
|
|
Current subnet mask. Format: 0.0.0.0. |
|
|
Current gateway IP address. Format: 0.0.0.0. |
changeIPAddress_Channel
: Ethernet port to be configured
The changeIPAddress_Channel
enumeration data type contains the following values:
Enumerator |
Value |
Description |
---|---|---|
|
0 |
M241, M251MESC, M258, LMC058, LMC078: M251MESE: |
|
1 |
M241: M251MESE: |
changeIPAddress_Error
: Error Codes
The changeIPAddress_Error
enumeration data type contains the following values:
Enumerator |
Value |
Description |
---|---|---|
|
00 hex |
No error detected. |
|
01 hex |
Internal error detected. |
|
02 hex |
IP address is not configured as a fixed IP address. |
|
03 hex |
Invalid IP address. |
|
04 hex |
The new IP address is already used in the network. |
|
05 hex |
Incorrect Ethernet communication port. |
|
06 hex |
IP address is already being changed. |
|
07 hex |
IP addresses not saved due to a detected error or no non-volatile memory present. |
|
08 hex |
A DHCP server is configured on this Ethernet communication port. |