FCT_SHUTDOWN: Disables Transmission on the Socket
(Original Document)
Function Description
The FCT_SHUTDOWN function is used to disable either send/receive transmission on the socket.
The TCP window is not changed and incoming data will be accepted (but not acknowledged) until the window is exhausted.
NOTE: the function does not close the socket, and resources assigned to the socket are not freed until the FCT_CLOSE is sent. However you should not attempt to reuse the socket after the FCT_SHUTDOWN function has been executed.
The additional parameters EN and ENO may be configured.
Representation in FBD
Representation in LD
Representation in IL
LD Module_Number
FCT_SHUTDOWN Socket_Number, Shutdown_Option, Gest_Index, Management_Param
Representation in ST
FCT_SHUTDOWN(Module_Number, Socket_Number, Shutdown_Option, Gest_Index, Management_Param);
Description of Parameters
The following table describes the input parameters:
Parameter
Type
Comment
Module_Number
Slot number of network module in rack 0.
  • Low byte is the slot number of network module in rack 0.
  • High byte can be used to extend the number of sockets.
    • 00: Provided for full backward compatibility with applications created on firmware version 3.3 or earlier.
    • 01: Up to 64 sockets can be used (firmware version must be higher than 3.3).
Socket_Number
Socket number
Shutdown_Option
Disable transmission option:
  • 0: No further receives are allowed on the socket.
  • 1: No further sends are allowed on the socket; a FIN message is sent.
  • 2: No further sends or receives are allowed on the socket. This option does the same as both of the previous options together.
Gest_Index
Index of first word in Management_Param array
The following table describes the input/output parameters:
Parameter
Type
Comment
Management_Param
ARRAY [0... 3] OF INT
The operation report can have the following values:
  • 16#00: No error.
  • 16#09: The socket number is invalid.
  • 16#16: An argument is not valid.
  • 16#39: The socket is not connected.