Byte Parameter Data type Start value Description
12 ... 27 local_tsap_id ARRAY
[1..16] of
BYTE
00h ...
n Remote port number
(possible values: 2000 ... 5000),
local_tsap_id[1] = high byte of port no in
hexadecimal representation,
local_tsap_id[2] = low byte of port no in hex-
adecimal representation,
local_tsap_id[3-16] = irrelevant
Note: Make sure that each value of
local_tsap_id that you use in your CPU is
unique.
28 ... 33 rem_subnet_id ARRAY
[1..6] of
BYTE
00h ... This parameter is currently not used. Value 00h
(fix).
34 ... 39 rem_staddr ARRAY
[1..6] of
BYTE
00h ... This parameter is currently not used. Value 00h
(fix).
40 ... 55 rem_tsap_id ARRAY
[1..16] of
BYTE
00h ... This parameter is currently not used. Value 00h
(fix).
56 ... 61 next_staddr ARRAY
[1..6] of
BYTE
00h ... This parameter is currently not used. Value 00h
(fix).
62 ... 63 spare WORD 0000h irrelevant
8.1.7 FB 66 - TDISCON - Terminating a connection
FB 66 TDISCON terminates a communications connection from the CPU to a communi-
cations partner.
The FB 66 TDISCON closes the local communications access point. The connection
between the user program and the communications level of the operating system is termi-
nated.
FB 66 TDISCON is an asynchronously functioning FB, which means that its processing
extends over several FB calls. To start terminating a connection, call FB 66 with REQ = 1.
After FB 66 TDISCON has been successfully called, the ID specified for FB 65 TCON is
no longer valid and thus cannot be used for sending or receiving.
The job status is indicated at the output parameters RET_VAL and BUSY. STATUS corre-
sponds to the RET_VAL output parameter of asynchronously functioning SFCs (see also
Meaning of the Parameters REQ, RET_VAL and BUSY with asynchronous SFCs).
The following table shows the relationships between BUSY, DONE and ERROR. Using
this table, you can determine the current status of FB 66 or when the establishment of the
connection is complete.
BUSY DONE ERROR Description
TRUE irrelevant irrelevant The job is being processed.
FALSE TRUE FALSE The job was completed successfully.
Use with TCP native and
ISO on TCP
Use with UDP
Description
VIPA SPEED7
Network Communication
Open Communication > FB 66 - TDISCON - Terminating a connection
HB00 | OPL_SP7 | Operation list | en | 18-30 129