IBM CTI 2572 Network Card User Manual


 
CTI 2572 Installation and Operation Guide
31
CHAPTER 4. CAMP CLIENT COMMANDS
4.1. Overview
The CAMP client commands are used when you wish to use PLC logic to initiate communications.
This function may be used for peer to peer communications among PLCs or to send unsolicited data
to your HMI application. For example, you might use this function to report alarms to a supervisory
PC, avoiding the requirement to continuously poll for alarm data.
NOTE:
If you are using the 2572 in Server mode only, you can skip the remainder of this section.
4.2. Create Socket Command
The CREATE SOCKET command provides a means for your PLC logic to refer to another network
node when sending messages. You must complete the C
REATE SOCKET command before you can
send messages to another node on the network.
The C
REATE SOCKET 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 will return an error code to the PLC. If UDP is specified, the 2572 module saves the address
and port number as the default remote socket, but no connection attempt is made. Once the C
REATE
SOCKET 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)
6 IP Address of Remote Device- High 16 bits
7 IP Address of Remote Device - 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