Libraries
9.4 Open user communication library
S7-200 SMART
512 System Manual, V2.3, 07/2017, A5E03822230-AF
The maximum amount of data that you can send in one send operation is 1024 bytes. The
program copies the data from the send buffer in user memory to an internal buffer when the
TCP_SEND executes with the Req input set TRUE. You can change the program send
buffer after the TCP_SEND executes and the instruction sets the Busy output.
Table 9- 17 Parameters of the TCP_SEND instruction
Req IN BOOL The CPU starts the send operation if Req =
TRUE. If Req = FALSE, then the outputs show
the current status of the send operation.
ConnID IN WORD The Connection ID (ConnID) is the number of the
connection for this send operation. Use the Con-
nID that you selected for the TCP_CONNECT
DataLen IN WORD The DataLen is the number of bytes to transmit
DataPtr IN DWORD The DataPtr is the pointer to the data to be sent.
This is an S7-200 SMART pointer to I, Q, M, or V
memory (for example, &VB100).
Done OUT BOOL The instruction sets the Done output when the
send operation is complete with no errors.
Busy OUT BOOL The instruction sets the Busy output while the
send operation is in progress.
Error OUT BOOL The instruction sets the Error output when the
send operation is complete with an error. Refer to
"Open user communication library instruction
error codes" (Page 524) for further information.
Status OUT BYTE The Status output shows the error code if the
instruction sets the Error output. Status is zero
(no error) if the instruction sets the Busy or Done
outputs.
This is an example usage of the TCP_SEND instruction: