Communication
10.2 PROFINET
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
521
Table 10- 2 TSEND_C and TRCV_C instructions
req:=_bool_in_,
cont:=_bool_in_,
len:=_uint_in_,
done=>_bool_out_,
busy=>_bool_out_,
error=>_bool_out_,
status=>_word_out_,
connect:=_struct_inout_,
data:=_variant_inout_,
TSEND_C establishes a TCP or ISO on TCP
communication connection to a partner station,
sends data, and can terminate the connection.
After the connection is set up and established, it
is automatically maintained and monitored by
the CPU.
en_r:=_bool_in_,
cont:=_bool_in_,
len:=_uint_in_,
adhoc:=_bool_in_,
done=>_bool_out_,
busy=>_bool_out_,
error=>_bool_out_,
status=>_word_out_,
rcvd_len=>_uint_out_,
connect:=_struct_inout_,
data:=_variant_inout_,
TRCV_C establishes a TCP or ISO on TCP
communication connection to a partner CPU,
receives data, and can terminate the connection.
After the connection is set up and established, it
is automatically maintained and monitored by
the CPU.
1
STEP 7 automatically creates the DB when you insert the instruction.
Table 10- 3 TSEND_C and TRCV_C data types for the parameters
REQ
IN Bool Control parameter REQ starts the send job with the connection
described in CONNECT on a rising edge.
EN_R
IN Bool Control parameter enabled to receive: When EN_R = 1,
TRCV_C is ready to receive. The receive job is processed.
CONT IN Bool
• 0: Disconnect
• 1: Establish and hold connection
LEN IN UInt Maximum number of bytes to be sent (TSEND_C) or received
(TRCV_C):
• Default = 0: The DATA parameter determines the length of
the data to be sent (TSEND_C) or received (TRCV_C).
• Ad hoc mode = 65535: A variable length of data is set for
reception (TRCV_C).
Pointer to the connection description (Page 153)