SetIPAddress: Changes the IP Address Dynamically
This function changes the IP address dynamically when it is configured as a fixed IP address.
NOTE: EcoStruxure Machine Expert returns an error if the IP address is assigned by a server using DHCP or BOOTP.
To see the general representation in IL or ST language, refer to the chapter Function and Function Block Representation.
The following table describes the input variables:
Input |
Type |
Comment |
---|---|---|
execute |
BOOL |
On rising edge, starts the function block execution. On falling edge, resets the outputs of the function block when its execution terminates. |
IPAddressID |
ARRAY [0..3] OF BYTE |
IP address [aaa.bbb.ccc.ddd]: oIPAddressID[0]= aaa o... oIPAddressID[3]= ddd |
The following table describes the output variables:
Output |
Type |
Comment |
---|---|---|
Busy |
BOOL |
TRUE = setting of the new IP address is in progress. |
Done |
BOOL |
TRUE = indicates that the action is successfully completed. |
Error |
BOOL |
TRUE = indicates that an error was detected. |
ErrID |
When Error = TRUE, returns the type of ERR_TYPE that was detected. |
|
CurrentIPAddress |
ARRAY [0..3] OF BYTE |
The IP address that the PLC is using. |
The IP address changed using SetIPAddress is stored in the persistent memory area of the controller.
NOTE: If you download the application to the controller again, after changing the IP address, the IP address of the configuration page will be used.