
Libraries
9.4 Open user communication library
S7-200 SMART
508
System Manual, V2.3, 07/2017, A5E03822230-AF
9.4.2.3
UDP_CONNECT instruction
The UDP_CONNECT instruction creates a passive connection using UDP protocol. UDP is a
connectionless protocol so there is no actual connection created between this CPU and the
remote device. The UDP connection opens the selected local port to use with UDP protocol.
LAD/FBD
STL
Description
UDP_CONNECT Req, ConnID,
LocPort, Done, Busy, Er-
ror, Status
The UDP_CONNECT creates a passive connection using UDP
protocol to open a selected local port.
The UDP_CONNECT instruction only requires a connection ID and a local port number to
create the connection. One UDP connection can send messages to any number of other
devices since the IP address and remote port are supplied with each UDP_SEND instruction.
You will need multiple UDP connections only if you require multiple local ports. You cannot
use the same local port number for multiple UDP connections. All local port numbers must
be unique.
The connect operation is asynchronous and can take several scans to complete. There is no
active connection establishment with the remote device, nor are we waiting for another
device to connect to this CPU. The Busy output is set while the connect operation is
pending. When the connect operation is complete, the program sets the Done output. The
program sets the Error output only if there is a problem with the input parameters or there is
no passive connection available. The Status output byte contains the error code if the
program sets the Error bit.
You must not change the parameters of the UDP_CONNECT while the instruction is busy so
that the CPU knows this is a continuation of the call that started the connection process.
You can call the UDP_CONNECT instruction to determine the current status of a connection.
Set the Req input FALSE and provide a valid connection ID (ConnID), and the
UDP_CONNECT instruction returns the following:
●
The instruction sets the Done output if the connection is active and ready to send or
receive. This only means that you can use the connection. This is not an indication that
there is any remote device present.
●
The instruction sets the Busy output if the connect is still processing.
●
The instruction sets the Error output if the connection is not usable. The Status output
byte contains one of the error codes to specify the problem.
Содержание SIMATIC S7-200
Страница 30: ...Product overview 1 7 Programming software S7 200 SMART 30 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 267: ...Program instructions 7 6 Counters S7 200 SMART System Manual V2 3 07 2017 A5E03822230 AF 267 HSC modes 3 and 4 ...
Страница 394: ...Program instructions 7 18 Subroutine S7 200 SMART 394 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 425: ...Communication 8 5 PROFIBUS S7 200 SMART System Manual V2 3 07 2017 A5E03822230 AF 425 ...
Страница 786: ...Technical specifications A 11 S7 200 SMART cables S7 200 SMART 786 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 798: ...Error codes C 4 PLC fatal error codes S7 200 SMART 798 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 848: ...Ordering information F 6 Human Machine Interface devices S7 200 SMART 848 System Manual V2 3 07 2017 A5E03822230 AF ...