SOCKET_DELETE

The SOCKET_DELETE instruction deletes a created socket instance. For Transmission Control Protocol (TCP) connections, SOCKET_DELETE also closes (Passive Close) the connection before deleting the instance. Outputs are updated synchronously from the program scan.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the L20E, L50E, and L70E controllers.
SOCKET_DELETE
SOCKET_DELETE
SOCKET_DELETE parameters
Parameter
Parameter Type
Data Type
Description
Execute
Input
BOOL
Instruction block enable.
  • TRUE: Rising edge detected; start the instruction block with the precondition that the last operation has been completed.
  • FALSE: No rising edge detected.
Instance
Input
UDINT
Copy the returned Socket Handler from a SOCKET_CREATE or SOCKET_ACCEPT instruction to delete the respective socket.
  • For UDP and TCP Client Socket types, copy the returned Socket Handler from a SOCKET_CREATE instruction.
  • For TCP Server socket type, copy the returned Socket Handler from a SOCKET_ACCEPT instruction.
Done
Output
BOOL
Indicates when operation is complete.
  • TRUE: Operation completed successfully.
  • FALSE: Operation is in progress or encountered an error condition.
Output is updated synchronously from the program scan.
Busy
Output
BOOL
  • TRUE: The operation is not finished.
  • FALSE: The operation is finished.
Output is updated synchronously from the program scan.
Error
Output
BOOL
Indicates that an error occurred.
  • TRUE: An error is detected.
  • FALSE: No error.
Output is updated synchronously from the program scan.
Status
Output
SOCK_STATUS
Status is defined using the SOCK_STATUS data type  which contains ErrorID, SubErrorID, and StatusBits information.
Output is updated synchronously from the program scan.

SOCKET_DELETE examples

SOCKET_DELETE function block diagram example
SOCKET_DELETE function block diagram example
SOCKET_DELETE ladder diagram example
SOCKET_DELETE ladder diagram example
SOCKET_DELETE structured text example
SOCKET_DELETE structured text example
Results
Results
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal