Program instructions
7.3 Communication
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
227
TDCON
You use the TDCON instruction to terminate an existing communication connection. The
instruction terminates the connection when the REQ bit is set. It is recommended that you
put a positive edge trigger on the REQ input. If the your program calls the TDCON instruction
and the connection is already disconnected, then the instruction responds with error code
24, which means no operation pending.
TDCON instruction table
The following table contains the format and definitions for the TDCON instruction. Refer to
"OUC instruction error codes" (Page 228) for the error code listing. Refer to "Ports and
TSAPs" (Page 419) for port number restrictions and further information:
●
Status: The first byte of the table returns the status of the operation to the user. The OUC
instructions ignore the value of the status byte as an input. The status byte is valid on the
return of the instruction. These are the status bit definitions:
–
D = Done (Complete)
–
A = Active (In progress, in other words, Busy)
–
E = Error (Complete with error)
–
Error Code
If there is an error, the Done and Error bits are both set. The error codes are listed in
"OUC instruction error codes" (Page 228).
●
REQ: You use the REQ bit to initiate a new operation. The REQ bit is a level-triggered
value. Your program code must provide the one shot operation if required (a positive
edge contact). If the operation is not busy, a REQ value of TRUE initiates a new
operation. For example, if there is not currently a TSEND instruction in progress, a TRUE
value in the REQ bit causes the program to initiate a new TSEND instruction operation.
●
Connection ID: The Connection ID is a 16-bit value that you select to pass into the
function. The range is 0 to 65534 (65535 is reserved). The Connection ID parameter is an
input to the OUC instructions. The TSEND, TRECV, and TDCON instructions use the
Connection ID that you select for the TCON instruction as a reference.
Table 7- 13 Definition of TDCON instruction TABLE parameter structure
Byte
offset
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0
D
A
E
Error code (5 bits)
1
REQ
2
Connection ID
(2 bytes)
3
Содержание 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 ...