Program instructions
7.3 Communication
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
221
Table 7- 9 Definition of TCON instruction TABLE parameter structure for UDP and TCP
1 A/P
1
REQ
Connection ID
2
Remote
IP
Address
3
Remote port
4
Local port
5
A/P: Active/Passive selection (1 = Active, 0 = Passive)
Connection Type: The Connection Type informs the TCON instruction of the desired type of con-
nection: UDP = 19 and TCP = 11
Remote IP address: This is the IP address of the remote device in the case of an active connec-
tion. You should set the Remote IP Address to 0.0.0.0 for UDP connections. The IP address must
be different than that of the local CPU and cannot be a multicast or broadcast address. Since the
S7-200 SMART supports routing, the IP address may be on a different subnet than the local CPU.
If you set the IP address for a passive (server) connection, then the CPU only accepts a connec-
tion from the specified IP address. If you set the IP add
ress to 0.0.0.0 for a passive connection, the
CPU accepts a connection from any IP address.
Remote Port: This is the port number in the remote device. You do not use the remote port num-
ber for UDP or passive connections, and you should set the Remote Port to zero.
5
Local Port: This is the port number for the connection in the local CPU.