CTI 2572-A Installation and Operation Guide
32
To send a multicast message, you need to do the following:
1.
Execute the C
REATE
S
OCKET
command using a multicast address. This command is
explained in the following section.
2.
Use the U
NACKNOWLEDGED
W
RITE
command to send a multicast message containing the
data you wish to write. See page 40 for a description of this command.
5.3. Create Socket Command
The
C
REATE
S
OCKET
command provides a means for your PLC logic to refer to another network
node when sending messages. You must complete the C
REATE
S
OCKET
command before you can
send messages to another node on the network.
The C
REATE
S
OCKET
command creates a local TCP/IP socket and associates it with the remote socket
specified by the values for IP address and port in the command block. If TCP is specified, an actual
logical connection to the remote node is attempted. If the connection cannot be established, the 2572-
A will return an error code to the PLC. If UDP is specified, the 2572-A module saves the address and
port number as the default remote socket, but no connection attempt is made. Once the C
REATE
S
OCKET
command completes successfully, your logic can use the Connection Number to refer to the
remote socket. You can establish up to eight concurrent connections.
Create Socket Command Block
Offset
Description
Hex
Decimal
0 Error
Word
0000
0
1
Command Code (Create Socket)
0003
03
2
Connection Number (19221 - 19228)
3
Protocol Manager Number
0024
36
4
Startup Option Bits (see description below)
0000
0
5
Type of Service (1 = TCP, 2 = UDP/Multicast)
6
IP Address of Remote Device or Multicast Address
(High 16 bits)
7
IP Address of Remote Device or Multicast Address-
(Low 16 bits)
8
Unused (Set to 0)
0000 0
9
Remote Device - TCP/UDP Port Number
10-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 C
REATE
S
OCKET
command is 03.
Offset 2
Connection Number
- Network Client connection numbers may range from 19221 through
19228. Any connection number within the valid range can be assigned, as long as the
number is unique. Connections can be closed and re-used, if desired. To help keep
track of the connection numbers, you may wish to assign connection numbers
sequentially.
Summary of Contents for 2572-A
Page 8: ......
Page 16: ......
Page 28: ......
Page 32: ......
Page 60: ......
Page 84: ......
Page 96: ......
Page 104: ...CTI 2572 A Installation and Operation Guide 96 WX WY Quick Reference...
Page 112: ......
Page 116: ......
Page 126: ......
Page 130: ...CTI 2572 A Installation and Operation Guide 122 WX WY Quick Reference...