EasyManua.ls Logo

Delta AH500 - Page 683

Delta AH500
749 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 6 Applied Instructions
6-515
API
Instruction code
Operand Function
2203 SCLOSE P
S
1
, S
2
Closing the socket
Device
X Y M S T C HC D L SM SR E PR K 16# “$” DF
S
1
S
2
Pulse instruction
16-bit instruction (5 Steps)
32-bit instruction
AH500
AH500
-
Symbol:
S
1
Socket mode Word
S
2
Socket number Word
Explanation:
1. S
1
is 1 if users want to close the TCP socket, and S
1
is 0 if users want to close the UDP socket.
S
2
is the socket number.
2. The operand S
1
should be either 0 or 1, and the operand S
2
should be within the range between
1 and 8.
3. Before closing the socket, users need to make sure that the socket has been connected.
Otherwise, the instruction is not executed.
4. If the TCP socket is closed by the server, the client continues to be connected to the local
communication port. If the TCP socket is closed is by the client, the client is not connected to the
local communication port. After the instruction is executed to close the TCP socket, the
corresponding flag is OFF.
5. After the instruction is executed to close the UDP socket, the corresponding flag is OFF.
6. If the TCP socket is closed, and no error occurs after the instruction is executed, the PLC is not
connected to the remote device, and the flag related to the connection’s being closed is ON. If
the connection is closed successfully, the flag related to the connections being closed is OFF. If
an error occurs, the error flag is ON.
Socket number
Being closing the
connection
Error flag
1
SM1274
SM1277
2
SM1282
SM1285
3
SM1290
SM1293
4
SM1298
SM1301
5
SM1306
SM1309
6
SM1314
SM1317
7
SM1322
SM1325
8
SM1330
SM1333
7. If the UDP socket is close, and no error occurs after the instruction is executed, the flag related
to the connection’s having been started is OFF. If an error occurs, the error flag is ON.
Socket number
Error flag
1
SM1338
2
SM1343
3
SM1348
4
SM1353
5
SM1358

Table of Contents

Other manuals for Delta AH500

Related product manuals