Communication
11.2 PROFINET
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
895
The following instructions control the UDP communication process:
● TCON establishes the communication between the client and server (CPU) PC.
● TUSEND and TURCV send and receive data.
● TDISCON disconnects the communication between the client and server.
Refer to TCON, TDISCON, TSEND, and TRCV (Page 857) in the "TCP and ISO-on-TCP"
section for more information on the TCON and TDISCON communication instructions.
Table 11- 39 TUSEND and TURCV instructions
req:=_bool_in_,
ID:=_word_in_,
len:=_udint_in_,
done=>_bool_out_,
busy=>_bool_out_,
error=>_bool_out_,
status=>_word_out_,
The TUSEND instruction sends data via UDP to
the remote partner specified by the parameter
ADDR.
To start the job for sending data, call the TUSEND
instruction with REQ = 1.
en_r:=_bool_in_,
ID:=_word_in_,
len:=_udint_in_,
ndr=>_bool_out_,
busy=>_bool_out_,
error=>_bool_out_,
status=>_word_out_,
rcvd_len=>_udint_out_,
The TURCV instruction receives data via UDP.
The parameter ADDR shows the address of the
sender. After successful completion of TURCV, the
parameter ADDR contains the address of the re-
mote partner (the sender).
TURCV does not support ad hoc mode.
To start the job for receiving data, call the TURCV
instruction with EN_R = 1.
1
STEP 7 automatically creates the DB when you insert the instruction.
TCON, TDISCON, TUSEND, and TURCV operate asynchronously, which means that the job
processing extends over multiple instruction executions.