Communication
10.2 PROFINET
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
531
Table 10- 10 TSEND and TRCV instructions
req:=_bool_in_,
ID:=_word_in_,
len:=_udint_in_,
done=>_bool_out_,
busy=>_bool_out_,
error=>_bool_out_,
status=>_word_out_,
TCP and ISO on TCP: TSEND sends data
through a communication connection from the
CPU to a partner station.
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_,
TCP and ISO on TCP: TRCV receives data
through a communication connection from a
partner station to the CPU.
1
STEP 7 automatically creates the DB when you insert the instruction.
Table 10- 11 Data types for the parameters of TSEND and TRCV
REQ IN Bool TSEND: Starts the send job on a rising edge. The data is
transferred from the area specified by DATA and LEN.
EN_R
IN Bool TRCV: Enables the CPU to receive; with EN_R = 1, the TRCV is
ready to receive. The receive job is processed.
ID IN CONN_OUC
(Word)
Reference to the associated connection. ID must be identical to
the associated parameter ID in the local connection description.
Value range: W#16#0001 to W#16#0FFF
LEN IN UInt Maximum number of bytes to be sent (TSEND) or received
(TRCV):
• Default = 0: The DATA parameter determines the length of the
data to be sent (TSEND) or received (TRCV).
• Ad hoc mode = 65535: A variable length of data is set for
reception (TRCV).
DATA IN_OUT Variant Pointer to send (TSEND) or receive (TRCV) data area; data area
contains the address and length. The address refers to I memory,
Q memory, M memory, or a DB.
DONE OUT Bool TSEND:
• 0: Job not yet started or still running.
• 1: Job executed without error.