User manual
CTI 2572 Installation and Operation Guide
34
4.3. Close Socket Command
The following command block will close a connection to a TCP/IP socket. Once the connection has
been successfully closed, you can re-use the connection number in a subsequent C
REATE SOCKET
command block.
Offset Description Hex
Value
Decimal
Value
0 Error Word
0000 0
1 Command Code (Close Connection)
0002 02
2 Connection Number (19221 - 19228)
3- 15 Unused (Set to 0)
0000 0
Offset 0 Error Word - Set to 0 so that any previous error codes are cleared.
Offset 1 Command Code - The Command Code of the Close Connection command is 02.
Offset 2 Connection Number - You can specify any connection number that has been
previously established in a Create Socket command block.
Offset 3-15 Unused - These words are unused by this command and should be set to 0.
NOTE:
This command can be used only for client connections. You cannot use the command to close the
connection to the PLC Network Server.
4.4. Memory Transfer Commands
Memory Transfer commands are designed to provide a device independent method of transferring
data words. For SIMATIC 505 PLCs, the memory transfer commands provide a simple way to
transfer V memory between the local PLC and another PLC (or suitably programmed computer) on
the network. These commands access only the first 64K bytes of V memory. Before using the
Memory Transfer commands you must have successfully completed a C
REATE SOCKET command.
Word Transfer - Write Remote
This function reads the contents of a designated area of V memory in the local PLC and writes the
values in a specified area of memory in another device. You can specify the starting memory
addresses on both the local and remote PLCs and the number of words to be transferred (up to 256
words). Based on the specification, the 2572 reads the local V memory and sends a message to the
network recipient associated with the Connection Number. When the response is returned from the
remote PLC, the 2572 verifies that the message was properly processed. If not, the 2572 places an
error code in the command block and raises the applicable error bit. The following command block
is used for the W
RITE REMOTE MEMORY command.