Libraries
9.4 Open user communication library
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
515
For example, let us suppose this time there is an ISO-on-TCP client that sends four 20-byte
messages to the CPU in rapid succession. Assume also that your program does not call the
TCP_RECV instruction during this time. The ISO-on-TCP protocol delivers the four
messages during four subsequent calls to the TCP_RECV instruction (one message per
call). This happens because ISO-on-TCP has start and end markers in the protocol to
delineate the messages and separate them in the receiving device.
Table 9- 18 Parameters of the TCP_RECV instruction
Parameter
Declaration Data type
Description
EN
IN
BOOL
Enable input
ConnID
IN
WORD
The Connection ID (ConnID) is the number of the
connection for this receive operation (defined
during the connect process).
MaxLen
IN
WORD
The MaxLen is the maximum number of bytes to
accept (for example, the size of the buffer at
DataPtr (1 to 1024)).
DataPtr
IN
WORD
The DataPtr is the pointer to where the receive
data should be stored. 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
receive operation is complete with no errors.
When the instruction sets the Done output, the
Length output is valid.
Busy
OUT
BOOL
The instruction sets the Busy output while the
receive operation is in progress.
Error
OUT
BOOL
The instruction sets the Error output when the
receive 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.
Length
OUT
WORD
The Length is the actual number of bytes re-
ceived. Only when the instruction sets the Done
or Error outputs is the Length valid. If the instruc-
tion sets the Done output, then the instruction
received the entire message. If the instruction
sets the Error output, the message was greater
than the buffer size (MaxLen) and has been trun-
cated.
Содержание 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 ...