Program blocks
5.2 Changing the IP address during runtime
CP 1243-1
Operating Instructions, 04/2017, C79000-G8976-C365-03
119
Connection establishment and termination
Connections are established using the program block TCON. Note that a separate program
block TCON must be called for each connection.
A separate connection must be established for each communications partner even if
identical blocks of data are being sent.
After a successful transfer of the data, a connection can be terminated. A connection is also
terminated by calling "TDISCON".
Note
Connection abort
If an existing connection is aborted by the communications partner or due to disturbances on
the network, the connection must also be terminated by calling TDISCON. Make sure that
you take this into account in your programming.
5.2
Changing the IP address during runtime
Changing the IP address during runtime
You can change the following address parameters of the CP at runtime controlled by the
program:
●
IP address
●
Subnet mask
●
Router address
Note
Changing the IP parameters with a dynamic IP address
Note the effects of program-controlled changes to the IP parameters if the CP obtains a
dynamic IP address from the Internet service provider: In this case, the CP can no longer be
reached by communications partners.
Requirements - firmware version
Requirements for program-controlled changing of the IP parameters are as follows:
●
CP firmware ≥
V2.1.7x
and
●
CPU firmware ≥
V4.2
Requirements - program blocks / STEP 7 versions
Program-controlled changing of the IP parameters is supported by program blocks. The
program blocks access address data stored in a suitable system data type (SDT).