CTI 2572-B / 2500C-2572-B Installation and Operation Manual 43
Socket command must be set to 1)
Offset 0 Error Word - Set to 0 so that any previous error codes are cleared
Offset 1 Command Code - The Command Code is 514 decimal (or 0202 hexadecimal).
Offset 2 Connection Number - You can specify any connection number that has been previously
established in a C
REATE SOCKET command block.
Offset 3 Source - The starting address of V memory in the remote PLC which contains the values you
want to transfer. This address is 1 relative.
Offset 4 Number of Words - This indicates the number of words you want to transfer.
Offset 5 Destination - The starting address of V memory in the local PLC that you want to update. This
address is 1 relative.
Offset 6 Command Timeout in seconds - When set to 0, the default value of approximately 9 seconds
is selected. A value of 999 specifies an infinite timeout.
Offset 7-9 Unused - Set to 0.
Offset 10-11 IP Address – These words are used only when UDP/multicast is selected and the IP Address
Location bit (offset 4 of the C
REATE SOCKET command block) is set to 1. If the IP Address
Location bit is set to 0, these words are ignored and the IP address contained in the CREATE
SOCKET command block is used. An IP address of 0.0.0.0 (0000 0000 hex) or greater than
223.255.255.255 (DFFF FFFF hex) will return an error.
Offset 12 UDP port number – This word is used only when UDP/multicast is selected and the IP
Address Location bit (offset 4 of the C
REATE SOCKET command block) is set to 1. If you are
accessing a CTI 2572 or CTI 2572-A module, you will typically set this value to 1505. If you are
CTI 2500P-ECC1 module, you may alternately choose 4450. NOTE: CTI 2500 Series controllers
do not accept packets with a multicast address. If the IP Address Location bit is set to 0, this
word is ignored and the port number contained in the CREATE SOCKET command block is used.
Offset 13-15 Unused - Set to 0.
Word Transfer - Exchange
This function is a combination of the WRITE and READ commands. As the name implies, it is intended to be used
in applications that exchange values between two PLCs or a PLC and a PC. The command writes the contents
of a block of local PLC V memory to a block of memory in the remote PLC, then reads a block of V memory in
the remote PLC and writes the values to a block of V memory in the local PLC. Since this is accomplished in one
transaction, it is much faster than executing separate read and write commands.
You can specify the locations of the V memory blocks in the local and the remote PLC, the number of words to
be written to the remote PLC, and the number of words to be read from the remote PLC. When the
command is triggered, the module in the local PLC retrieves the data from the specified memory and sends a
message containing the data to be written to the module in the remote PLC. If the write was successful, the
module in the remote PLC will read the specified V memory and build a reply message containing the data.
When the response message is returned, the local module will write the data to the local PLC V memory.