FCT_SETSOCKOPT: Sets the Options Associated with the Socket
(Original Document)
Function Description
The FCT_SETSOCKOPT function sets options associated with the specified socket. Some options are set automatically when the socket is created by the FCT_SOCKET function.
The following options are available:
These options are selected by assigning a number in the Option_Type variable.
The additional parameters EN and ENO may be configured.
Representation in FBD
Representation in LD
Representation in IL
LD Module_Number
FCT_SETSOCKOPT Socket_Number, Option_Type, Gest_Index, Management_Param
Representation in ST
FCT_SETSOCKOPT(Module_Number, Socket_Number, Option_Type, 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
Option_Type
Type of option to be associated with socket. The values which can be assigned to this word are as follows:
  • 1 for DONT_ROUTE
  • 2 for RESET_DONT_ROUTE
  • 3 for KEEP_ALIVE
  • 4 for RESET_KEEP_ALIVE
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: Invalid option.
The fourth word of the array should contain the number of bytes stored in the buffer.