CTI 2572 ETHERNET TCP/IP MODULE INSTALLATION AND OPERATION GUIDE Version 2.
Copyright 2001 Control Technology Inc. All rights reserved. This manual is published by Control Technology Inc., 5734 Middlebrook Pike, Knoxville, TN 37921. This manual contains references to brand and product names which are tradenames, trademarks, and/or registered trademarks of Control Technology Inc. and Siemens AG. Other references to brand and product names are tradenames, trademarks, and/or registered trademarks of their respective holders.
V2.4 ii 10/9/01 REVISION HISTORY Incorporated addendum material Revised Uncoupled Mode description to indicate that Command Block would not be re-read if the Command Trigger were held high.
PREFACE This Installation and Operation Guide provides installation and operation instructions for the CTI 2572 Ethernet TCP/IP Adapter Module. The information in this manual is directed to individuals who will be installing, maintaining, and troubleshooting the module. We assume you are familiar with the installation and operation of: 1) SIMATIC 505 programmable controllers, 2) Ethernet local area networks, 3) Transmission Control Protocol/Internet Protocol.
USAGE CONVENTIONS NOTE: Notes alert the user to special features or procedures. CAUTION: Cautions alert the user to procedures that could damage equipment. WARNING: Warnings alert the user to procedures that could damage equipment and endanger the user.
TABLE OF CONTENTS CHAPTER 1. DESCRIPTION .................................................................................. 1 1.1. 1.2. 1.3. 1.4. 1.5. 1.6. 1.7. 1.8. Introduction...........................................................................................................1 Ethernet Ports ......................................................................................................2 Serial Ports.............................................................................................
CHAPTER 7. E-MAIL FEATURE........................................................................... 77 7.1. Overview ............................................................................................................77 7.2. 2572 Command Block .......................................................................................78 7.3. Application Example ..........................................................................................79 CHAPTER 8. TROUBLESHOOTING .......................
TABLE OF FIGURES Figure 1. 2572 Front Panel................................................................................................. 1 Figure 2. 2572 Ethernet Ports ............................................................................................ 2 Figure 3. 2572 Serial Ports.................................................................................................. 3 Figure 4. LED Indicators............................................................................................
CHAPTER 1. DESCRIPTION 1.1. Introduction The CTI 2572 Ethernet TCP/IP Adapter is a single wide I/O module for SIMATIC 505 controllers. The 2572 module connects to Ethernet local area networks, enabling the PLC to communicate with other network stations using the Transmission Control Protocol/ Internet Protocol (TCP/IP).
1.2. Ethernet Ports The 2572 provides an IEEE 802.3 10BaseT port and an IEEE 802.3 AUI port. The 10BaseT port connects to Unshielded Twisted Pair (UTP) cable using an RJ-45 connector. The 15-pin AUI connector is used to attach a transceiver to the 2572. The transceiver, in turn, connects to the desired Ethernet medium. Different transceivers are available for the various 802.3 media. Thus, using a transceiver, the 2572 can connect to coaxial, UTP, or fiber optic cable.
1.3. Serial Ports The 2572 is equipped with two serial ports. These ports are provided for use with module configuration and diagnostic programs. In addition, the ports may be used to access the local PLC. Devices that communicate with the PLC using the Non Intelligent Terminal Protocol (NITP) can access the PLC processor as if they were directly connected to the PLC program port. Optionally, NITP commands sent to a serial port can be redirected to another node on the TCP/IP network.
1.4. LED Indicators The 2572 provides an array of LEDs that inform the user of the module status and communications activity. The functions of the LEDs are described below: ACTIVE Active Status. Indicates the status of the module hardware. Solid illumination indicates the module status is good. Slow blinking indicates the module has detected a fault condition. Rapid blinking indicates that the network parameters have not been set or are Figure 4. LED Indicators invalid. XMT Transmit.
1.5. Functional Overview The 2572 can operate as both a PLC server and a PLC client. As a PLC server, the 2572 responds to messages sent by another network node. As a PLC client, the 2572 initiates messages on command from the PLC. PLC Server Function The 2572 can function as a server to clients who wish to access the PLC. Figure 5 illustrates the typical message dialog between the client, the 2572, and the PLC. 1) The client node sends a command message to the 2572 via TCP/IP.
PLC Client Function The 2572 can also function as a PLC Client. As a PLC Client, the 2572 acts as an agent for the PLC; it sends messages to other nodes and processes the responses under control of the PLC logic. Data in the PLC program specifies the recipient and data contents of the message. PLC logic sets a “trigger” bit to cause the 2572 to send the message. . 1) 2572 Command P L C 4) 2572 Response 2 5 7 2 Client PLC / 2572 2) Command Message 3) Response Message Server Node Figure 6.
1.6. TCP/IP Overview The CTI 2572 module uses TCP/IP (Transmission Control Protocol/Internet Protocol) to transport messages between the module and other nodes on the network. TCP/IP is a suite of protocols that provide routing and delivery services for messages between application programs running on different processors (called hosts in TCP/IP terminology). You may select between connectionless (packet based) or connection-oriented (stream based) delivery services.
1.7. PLC Command Interface Some 2572 functions require that you use PLC logic to control the operation of the module. The 2572 module provides a standard PLC logic interface for sending messages and processing responses. The interface consists of two parts: • • Command Blocks - Command Blocks are blocks of contiguous V memory words used to store module commands and associated parameters. The exact content of the Command Block will vary with the command being issued.
1.8. Getting Started Assigning an IP Address Before proceeding you must determine what IP address you will assign to the module. If you are connecting to an existing network, your network administrator will provide this information. If you plan on connecting your network to the Internet you should contact the Internet Network Information Center (NIC) for IP address assignment.
Using the Module Assuming you have completed the above steps successfully, the 2572 module is ready for use as a PLC Server. If you wish to implement PLC Client functions, please refer to Chapter 3 of this manual.
CHAPTER 2. INSTALLATION The installation of the Model 2572 Ethernet TCP/IP Adapter Module consists of the following steps: 1) 2) 3) 4) 5) 6) Planning the installation, Unpacking and configuring the module, Physical installation, Setting IP information, Connecting cables, Checking the module operation. 2.1. Installation Planning Ethernet Media The Model 2572 attaches directly to 10BaseT media (Unshielded Twisted Pair) via the RJ-45 connector. You should select cabling rated CAT 5 or better.
allows you to load the information directly from data stored in EEPROM on the 2572. You will need to decide which method best suits your requirements. NOTE: Unless your application requirements dictate otherwise, CTI recommends that you allow the PLC to establish the network parameters. If you choose to establish the network parameters using PLC logic, the 2572 will wait for the PLC to initiate network startup. Using a special 2572 startup command, the PLC can set the network parameters.
exceed the backplane limitation, you may power the AUI from an external 12 VDC power supply. The 2572 module provides a front panel connector for attaching an external AUI power supply. NOTE: The AUI external power circuit contains a reverse protection diode that may induce up to a 0.5 volt drop. Most transceivers can tolerate this voltage drop. If your transceiver cannot, you should adjust your external power supply to compensate.
2.4. Setting the 2572 Switches Switches on the 2572 are used to select the following: • AUI Power • Serial Port Baud Rate • Hardware Handshaking (RS-232 port) • DataShare Enable • Network Startup Option • EEPROM Write Protect • Serial Port Protocol Figure 8 indicates the location of the switches. AUI Power Source Switch The AUI port allows external transceivers to be attached to the module.
Switchblock 2 Switchblock 2 is used to set the communications parameters for serial port 2. In addition, switches 3,4, and 4 are used to set other module options. Figure 10. Switchblock 2 NOTE: The switches on some modules may be labeled OPEN and CLOSED. The Closed position is equivalent to ON. Switch settings not shown are reserved and should set to OFF. Serial Port Protocol Switches 6, 7, and 8 on each switch block are used to set the protocol used by the port.
Serial Port Baud Rate You can individually set the baud rate settings for each serial port. For most applications, a baud rate of 9600 provides a good balance between performance and reliability. Port 1 Hardware Handshaking Hardware handshaking for port 1 can be disabled or to enabled via a switch on Switchblock SW1. If hardware handshaking is enabled, the attached device must raise CTS before the 2572 will transmit data. See the diagram below. The switches on some modules may be labeled OPEN and CLOSED.
EEPROM Write Protect Switch 5 on switchblock SW2 protects the data in the EEPROM from being overwritten. When WRITE PROTECT is on, the network parameters stored in the EEPROM cannot be changed by the PLC program or by a PC attached to a serial port. If a program attempts to write to the EEPROM when the WRITE PROTECT switch is on, the 2572 will return an error code. See Section 2.6 on page 19 for procedures used to start the PLC network server using PLC logic. See Section 2.7 on page 120 and Section 2.
Checking PLC Login Next, log the module into the PLC I/O configuration. The 2572 logs in as a special function module with 2 WX and 6 WY words. To configure the PLC I/O refer to your PLC programming software manual. In the example below, the 2572 module is installed into slot 1 on I/O base 0 and will be logged in starting at address 1. Your configuration may differ. I/O MODULE DEFINITION FOR CHANNEL 00 I/O SLOT 01 02 .. 15 16 ADDRESS 00001 00000 ...... 00000 00000 X 00 00 .. 00 00 . . . 1 BASE .
2.6. Using PLC Logic to Start the Network Server The Start Network Server command is used when you want to establish the network parameters using PLC logic. When you use PLC logic to set the network parameters, you can ensure that the IP address is directly associated with the PLC and not the module. NOTE: Before you can use PLC logic to start up the PLC network server function, the Network Startup Option switch must be set to PLC Start (See Figure 10. Switchblock 2 on page 15).
Start Network Server Command Block Offset Description Hex Decimal Value Value 0 Command Error Word 0000 1 Command (Start Network Server) 0004 4 2 Connection Number (19291 - 19299) 4B62 19298 3 Protocol Manager Number 0023 35 4 Startup Option Bits (see description below) 0000 0 5 TCP Keep Alive Interval in Seconds (0=default = 60) (Set to 65000 or greater to disable Keep Alive) 0000 0 6 IP Address of this Module (High 16 bits) 7 IP Address of this Module (Low 16 bits) 8 TCP
TCP SERVER DISABLE - Setting this bit to 1 will disable TCP connections to the PLC server. The 2572 will reject attempts by a remote client to connect via TCP to the server. However, you can still initiate a client TCP connection from this PLC. A setting of 0 (TCP Enabled) is the normal mode. UDP SERVER DISABLE - Setting this bit to 1 will disable UDP (connectionless) protocol for the server. The 2572 will reject all UDP datagrams sent to the server.
Offset 6-7 IP Address Offset 6 should contain the high 16 bits of the module IP address. Offset 7 should contain the low 16 bits of the IP address. An IP address of 0.0.0.0 (0000 0000 hex) or greater than 223.255.255.255 (DFFF FFFF hex) is will return an error. Offset 8 TCP/UDP Port - This will be the port number used to connect to the 2572 PLC Server application. The examples in this manual assume that this will be set to 1505 decimal. You should use this value unless you have a reason to do otherwise.
NOTE: If you set the startup option to PLC START, you must successfully complete this command before any other network functions will execute. If you set the startup option to AUTOSTART and the EEPROM contains valid network parameters, you are not required to execute this command. NOTE: You must set the module startup option to AUTOSTART and reset the module before any EEPROM changes will take effect.
Ladder Logic Example The following diagram illustrates the ladder logic that executes the Start Network Server command block. This example assumes that the command block is located in V memory starting at V500 and that command slot 1 is used for the command. See the CTI 2572 PLC Command Interface Reference Manual for details. C100 C100 LDC WY5 500 Set the command to Coupled Mode C100 WX1.3 WX2.3 WY4.2 Sets the Command Trigger WY4.3 WY4.3 Figure 13.
2.7. Automatically Starting the Network Server Storing Network Parameters in EEPROM (PC Method) Before you can automatically start the Network Server, the network parameters, including the module IP address, must be stored in EEPROM on the 2572. You can accomplish this task using an IBM compatible PC and a utility program from CTI. 1) Attach the PC to Port 1 (RS-232) using a serial cable wired for RS-232. See Appendix A for a typical cable example.
2.8. Connecting Cables Connecting to the 10BaseT Port Insert the 8 pin (RJ-45) plug on your unshielded twisted pair cable into the RJ-45 jack on the 2572. Push the plug into the jack until the plug clicks into place. Attach the other end of the cable to a hub. When a link beat is detected on the 10BaseT port, the 2572 automatically selects this port. When you attach a cable that is connected to an active hub, the Link Beat (LB) LED should light. Figure 14.
Connecting to the Serial Ports Port 1 provides a subset of the RS-232C electrical interface. Cables for the RS-232 ports should be no longer than 50 feet. Port 2 provides an RS-422 electrical interface. RS-422 cables may be up to 4000 feet in length. The serial port connectors on the 2572 have been designed to accept commonly used serial cables. The pin-outs on the RS-232 port and the RS-422 port match those found on the SIMATIC TI 545 PLC.
Ethernet (AUI Connector) When you are using an Ethernet transceiver attached to the AUI port you should experience the following: 1) The AUI LED should light and the LB LED should not be lit. This indicates that the AUI port has been selected by the 2572. 2) If you are attached to an active network, you should see the Ethernet RCV (receive) LED flicker, indicating network signals are being received. If the above conditions are not met, refer to Chapter 5 of this manual.
CHAPTER 3. MODULE OPERATION 3.1. General Module Operation When the 2572 is powered on, it performs a Power On Self Test (POST) to determine if all module components are operating properly. The test takes only a few seconds. Once the POST is complete, the ACTIVE LED should blink at a fast (2Hz) rate, indicating that the network parameters have not been loaded. Once the network parameters are successfully loaded, the ACTIVE indicator will be illuminated (on steady).
3.3. Serial Port Operation The 2572 serial ports provide a method for configuring the module, performing diagnostic operations, and accessing the PLC memory. The 2572 module has a Transmit LED and a Receive LED for each port. When a signal is received at the port, the Receive LED will light. When a signal is transmitted from the port, the Transmit LED will light. When the port is in use, the LED’s should appear to flicker.
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.
Offset 0 Error Word - Set to 0 so that any previous error codes are cleared. Offset 1 Command Code - The Command Code of the CREATE SOCKET 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.
Bit 16 controls the priority given to this client application. When bit 16 is set to 0 (offset 4 = 0x0000), the client application will execute with a normal priority. When bit 16 is set to 1 (offset 4 = 0x0001), the client application will execute with a high priority. High priority client applications will be scheduled before all server applications and all client applications operating at normal priority. One use of the high priority setting could be sending critical alarm data.
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 CREATE 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 Description Hex Decimal 0 Error Word 0000 0 1 Command Code (Write Remote Memory) 0201 513 2 Connection Number (19221 - 19228) 3 Source: Starting V Memory Address in the Local PLC 4 Number of Words to Transfer (1-256) 5 Destination: Starting V Memory Address in Remote PLC 6 Command Timeout in seconds (0 = Use Default) 0000 0 7-9 Unused (Set to 0) 0000 0 10 IP Address of Remote Device - High 16 bits (UDP Only: IP Address Location bit in the Create Socket command must be set
Offset 12 UDP port number - UDP Only, firmware Version 5.0 and greater. If you set the IP Address Location bit to 1 (see offset 4 of the CREATE SOCKET command block), you must specify the UDP port number of the remote device. If you are accessing another 2572, you will typically set this value to 1505 (the recommended value for the 2572 PLC server). 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 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 CREATE 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.
If an error is encountered writing the data to the remote PLC, no data will be read from the remote PLC; an error message indicating the write failed will be returned. If an error is encountered reading data, an error message indicating the read failed will be returned. In either case, the module will set the applicable error bit and write the error code into the Command Error Word. The following command block is used for the memory exchange command.
Offset 3 Write Source: Starting V Memory - Enter the first V memory location in the local PLC which contains the values which you wish to write to the remote PLC. Offset 4 Number of Words to Write - Enter the number of words you want to write. Offset 5 Write Destination: Starting V Memory - Enter the beginning address of the V memory block in the remote PLC to which you want to write this data.
4.5. Application Example Start Network Server Command Block The following command block can be used to start up the 2572 network server at IP address 192.168.177.08 (in hex notation this is C0.A8.B1.08). The server is set up to listen on TCP/UDP port number 1505. The IP address of the default router is 192.168.177.241 (hex equivalent C0.A8.B1.F1). To enter the IP addresses, you will find it much easier to enter the values in hexadecimal format.
Create Socket Command Block This command block can be used to create a client connection to a TCP/IP socket. The socket is associated with another 2572 on the network at IP address 192.168.177.01 (hex C0.A8.B1.01) and TCP port 1505. The UDP protocol is selected.
Word Transfer Command Block The following command block can be used to write 25 words from the local PLC V memory starting at V100 to the PLC associated with connection number 19221(see the previous Create Socket command). The command requests that the data be written to the remote PLC V memory starting at V200.
PLC Ladder Logic Example The following pages contain a sample of a PLC ladder logic application that implements the 2572 Client Mode. Client Mode allows the PLC to send a message containing commands and/or data from the local PLC to another network node via TCP/IP. It is typically used to send unsolicited alarm messages or production data based on an event detected by the PLC. Potential message recipients include network computers or other PLCs using a 2572.
Note the function of C14 and C15. They are used to detect the fact that a 2572 command cycle has completed. Refer to the timing diagram below. The 2572 will raise the Command Busy it after the PLC logic sets the command trigger. If there is no error, the 2572 will lower command busy after the PLC lowers the command trigger and the 2572 module has successfully completed the command. If there is an error, the 2572 will raise the error bit.
Error recovery is a required component of any application utilizing network communications. The example error recovery is simple, but typical of what you might do. When executing the Start Network Server command, any error usually indicates an invalid command block. The error must be manually corrected. Therefore, any errors that occur while attempting this command are not logged nor is the error word cleared.
Client Ladder Logic Example: Part 1 WX1.3 C2 C1 LDC A: WY5 N = 100 SET C12 RST C13 RST C14 RST C15 RST C19 Rung 1 - If the Net Cfg bit (WX1.3) is on and C2 is not on, then load Command Slot 1 (WY5) with the V memory address of the Start Network Server command block (V100). Set C1 to indicate that Network Server has not been started, reset the control relays used to indicate logic state, and set the command trigger (C19). SET WX1.3 C2 WX2.3 C14 SET Rung 2 - When WX1.3 is on, turn on C2.
Client Ladder Logic Example: Part 2 C1 C15 LDC A: WY5 N = 120 C12 SET C1 V140 + 166 RST = INT C15 RST C19 SET C12 C15 LDC A: WY5 N = 140 C13 SET C12 RST C15 RST C100 C13 Rung 5 - If the command completed successfully while C1 is on, this means the Network server is started. Sets C12 and resets C1 to indicate new state. Loads command slot 1 (WY5) with the address of the Create Socket command block.
Client Ladder Logic Example: Part 3 C19 WY4.2 WX2.3 LDC A: V120 N = 0 WY4.3 LDC A: V140 N = 0 WY4.3 C19 RST WX2.1 C12 MOVW A: V120 B: V400 N=1 C18 WX2.1 C13 MOVW A: V140 B: V401 N=1 C18 WX2.1 WY4.1 Rung 8 - This is the command trigger for Command Slot 1. When C19 is set and Command Busy(WX2.3) is low, the Command Mode (WY4.2) and Command Trigger (WY.4.3) bits are turned on . These are held high by WY4.3 until command busy goes high.
CHAPTER 5. SEND-RECEIVE PROTOCOL 5.1. Overview The TCP/IP SEND/RECEIVE protocol enables data exchange between Siemens S7/S5 Controllers and Siemens SIMATIC 505 PLCs using a 2572 TCP/IP module. In addition, it may be used to transfer data between two SIMATIC 505 PLCs equipped with 2572 modules. SEND/RECEIVE establishes a peer-to-peer connection between PLCs. Once a connection is established between the peer-to-peer partners, either partner may send data to the other by issuing a SEND command.
Although buffering ensures that messages are preserved, it does introduce update latency because a new message must wait until all other messages stored in the module have been read by the PLC. For many applications, the increased latency is not significant.
5.3. Send/Receive Command Blocks The Send/Receive feature is implemented on the 2572 using the standard Command Interface. You may create up to four SEND/RECEIVE connections. OPEN ACTIVE Connection Command If the 2572 is designated as the Active partner, you must initiate an OPEN ACTIVE CONNECTION command using PLC logic. The OPEN ACTIVE CONNECTION command attempts to establish a connection with a designated communications partner.
Remote TSAP – This is the TSAP associated with the connection in the partner PLC. You must ensure that this matches the value entered for Local TSAP in the partner PLC. NOTE: TSAPs are case sensitive. If the case does not match, the connection will be rejected. Open PASSIVE Connection Command If the 505 PLC is designated as the Passive partner, you must initiate an OPEN PASSIVE CONNECTION command using PLC logic.
The following Command block is used for OPEN PASSIVE CONNECTION Offset Description Hex 0 1 2 Error Word Command Code Connection Number 3 4 5 6 7 8 9 10 11-15 Protocol Manager Number IP address of Partner – High 16 bits IP address of Partner – Low 16 bits Flags (Bypass Validity Checks = 0x01) Length of local TSAP in bytes Start V-memory address of local TSAP Length of remote TSAP in bytes Start V-memory address of remote TSAP Unused 0000 2E02 4B15 – 4B1C 2E Decima l 0 11778 1922119228 46 1-10 1-10
SEND Command The Send command reads a data from the designated block of V location and sends it to the partner PLC. Offset 0 1 2 Description Error Word Command Code (SEND) Connection Number 3 4 5 6 7-15 Command Flags Number of words to transfer Send Block V-memory Address Unused Unused Hex 0000 2E03 4B15 – 4B1C Decimal 0 11779 1922119228 1 - 200 1-512 Command Code – The number for this command is 0x2E03. Connection number – This must correspond to an open Send/Receive connection number.
Receive Command The RECEIVE command reads data from the receive buffer and places it in a designated V memory block. This data would have been written to the buffer by the partner PLC using a SEND command. There is no notification that data has been received from the partner. Typical user logic will periodically attempt to read data. If no new data is available, the error bit will be set and an error value will be returned in the Error Word.
5.4. Application Example Application A Siemens SIMATIC 505 PLC is used to update a Siemens S7 PLC with process information. When the S7 receives the information, it sends status information back to the 505 PLC. Assumptions • • • • • • The SIMATIC 505 PLC uses the 2572 as a network TCP/IP interface. The S7 uses a CP343-1 TCP/IP interface. The 2572 will be configured as the Active partner The S7 will be configured as the Passive partner The IP address of the 2572 is 192.168.1.2 (Dotted hexadecimal is C0.A8.
Send Data Command Block Address V140 V141 V142 V143 V144 V145 V146-155 Description Error Word Command Code (SEND) Connection Number Command Flags Number of words to transfer Send Block V-memory Address Reserved Hex 0000 2E03 4B15 0000 0064 03E8 0000 Decimal 0 11779 19221 0 100 1500 0 Receive Data Command Block Address Description Hex Decimal V120 V121 V122 V123 V124 V125 V126 Error Word Command Code (Receive) Connection Number (matches open) Command Flag Maximum Data Block Size (in words) Receive B
When “Cmd Busy” bit = TRUE, turn off C9. When C9 is FALSE, Open Command has been triggered. 28 !WX2.3 C9 [-] [---------------------------------------------------------------(RST ) ! If “Cmd Err” bit TRUE, it indicates error occurred by processing Open Cmd. Store error, set C108 TRUE (error flag), and “Err Ack” bit. 34 ! C9 WX2.1 MOVW1---------+ C108 [-]/[---] [---! !-------------------------------------*-(SET ) ! ! A:V100 ! ! ! ! B:V1400 ! ! WY4.
Receive Timer used to break out of receive loop if continuous errors occur. 97 !C107 TMRF1---------+ C101 [-] [---------! !---------------------------------------( ) ! ! ! ! ! ! ! ! P= 2.000 ! ! ! ! !C107 ! ! [-] [---------! ! ! +-------------+ Skips over logic section EXCEPT when executing “Receive Command” sequence. 102 ! C12 SKP11 [-]/[---------------------------------------------------------------( ) ! C14 TRUE = Receive Command Enabled but not Executed.
The Recv Cmd completed and either an error occurred or X4 (Send Input bit) is FALSE. If error occurred, it has been acknowledged and “Cmd Err” bit (C108) has been cleared by the module. Logic sets C14 (Recv Cmd Enable) to retry Recv Cmd and turns off “Cmd Err bit”. ! C14 WY4.3 WX2.3 C108 WX2.1 C12 161 183 [-]/[---]/[---]/[-*-] [---]/[-*-----------------------------------*-(RST ) ! ! ! ! ! ! X4 ! ! C108 ! +-]/[-------+ [-(RST ) ! ! ! ! C14 ! +-(SET ) ! Label to end “Recv Command” logic area.
219 !WX2.3 C15 [-] [---------------------------------------------------------------(RST ) If “Cmd Err” bit TRUE, it indicates error occurred when executing the Send Command. Store error, set C108 (Error flag), and C108 (Err Ack) bits. 225 ! C15 WX2.1 MOVW5---------+ C108 [-]/[---] [---! !-------------------------------------*-(SET ) ! ! A:V140 ! ! ! ! B:V1410 ! ! WY4.
Configuring the CP343 Ethernet Module Set the Network Connection properties of the CP343-1 module as shown below. The MAC address is not used in TCP/IP connections, but some versions of Step 7 may require an entry. In this case you may enter any arbitrary value that Step 7 will accept. Configuring the Other Station (2572) Enter the following Network Connection properties for the 2572 module. Again, the MAC ID is not used by TCP/IP, but some versions of Step 7 may require the entry.
Configuring the ISO on TCP Connection Create a new connection to the 2572 as shown below. Enter the following TSAP information.
S7 Logic The following S7 Function Block (FC6) receives data from the 2572 module. ID must correspond to the “Connection ID” in the S7 Ethernet setup. LADDR must correspond to the value shown in “Block Parameters”. RECV is memory block where the S7 writes the received data. Your S7 logic should execute this function block on a regular basis to check for input from the 505 PLC. The following S7 Function Block (FC5) sends data to the 505 PLC.
CHAPTER 6. DATASHARE PROTOCOL 6.1. Overview The DataShare protocol provides a high speed data exchange among stations residing on an Ethernet local area network. DataShare is especially useful in applications where: • One PLC needs to periodically update several others with the same set of data. • Multiple PLCs need to interchange data on a cyclical basis. • Built-in message receipt verification is not required General Information DataShare uses the Producer/Consumer model for exchanging data.
A given module may produce multiple data sets and consume multiple data sets. In a typical DataShare application, each module might produce a single data set, and consume one or more data sets produced by other modules. 6.2. Implementation Configuring the 2572 module The DataShare facility is enabled by setting Switch 3 on Switchblock SW2 to the ON position.
data packet arrive before the PLC write has been completed, the incoming packet will overwrite the previous data in the buffer with the new value. PLC Command Interface The PLC command interface uses additional bits in the standard 505-CP2572 Module Status Word and Module Command Word structure to control scan triggered automatic DataShare production.
Protocol Manager Number - The number for this Protocol Manager is 0x2F Option Bits – Reserved for Future Use. Set to 0. Data ID - This number Identifies the data being produced. You may arbitrarily assign any number within the range; however, you must ensure that the number is unique. It should not be duplicated by other producers on the same local area or the results will be unpredictable and, most likely, undesirable. NOTE: The Protocol Manager cannot ensure that the Data ID is not duplicated elsewhere.
DataShare to produce every 10 seconds, and use the command to trigger production on a particular event. Offset 0 1 2 3 4 - 15 Description Error Word Command (Trigger DataShare Producer) Connection Number (19241 – 19248) Option bits (Reserved – Set to 0) Reserved. Set to 0. Hex 0000 0x2F02 Decimal 0 0000 0 Error Word - will contain an error code if an error occurs. You should set this value to 0 each time you trigger the command block to clear previous error codes.
NOTE: When this option bit is set, the number of V memory words written will be 1 + the data length. Data ID - This number identifies the data to be consumed. This number must match the Data ID of one of the producers. MSW: Destination Memory Address –Most Significant Word of the address of the V memory block to which the consumed data will be written. For addresses below 65,536, set this value to 0.
6.4. Master Controller Update Example Application One 505 PLC (PLC A) is used as a master controller, sending updates to three other 505 PLCs (PLC B, PLC C, PLC D) as fast as possible. PLC A is configured as a DataShare producer with a requested production rate of every scan. The remaining PLCs are configured as DataShare consumers. Assumptions • • • • The master controller will produce 300 words of data, stored at V1000.
Start Consumer – PLC B Offset V100 V101 V102 V103 V104 V105 V106 V107 V108 V109 V110-V115 Description Error Word Command Code (Start DataShare Consumer) Connection Number Protocol Manager Number Option Bits Data ID (1 - 65565) MSW: Destination V Memory Address LSW: Destination V Memory Address Data Length in Words (1 - 512) Starting Data Word in Data Block (1 - 512) Reserved, Set to 0 Hex 0000 2F03 4B29 002F 0002 0001 0000 07D0 0064 0001 0000 Decimal 0 12035 19241 47 2 1 0000 2000 100 1 0 Start Consumer
PLC Logic Below is typical logic to start a DataShare Producer or Consumer. This example assumes that the 505-CP2572 module is logged into the PLC I/O configuration at WX1 and command slot 1 is being used for command processing. The command block being executed begins at V100. The command is fired on the rising edge of X1. If a command error is encountered, the 2572 module will turn the error bit (WX2.1) ON. In that case, the logic turns the Error Acknowledge bit (WY4.1) ON to clear the error condition.
Producer Command Blocks Start Producer – PLC A Address V100 V101 V102 V103 V104 V105 V106 V107 V108 V109 V110 V111-115 Description Error Word Command Code (Start DataShare Producer)) Connection Number Protocol Manager Number Option Bits Data ID (1 - 65565) MSW: Source V Memory Address LSW: Source V Memory Address Length of Data in Words (1 - 512) Trigger Option (1 = timer, 2 = logic, 3 = scan) Timer Interval (when Offset 9 = 1) Scan Interval (when Offset 9 = 3) Reserved, Set to 0 Hex Decimal 0000 2F01 4
Start Producer – PLC C Address V100 V101 V102 V103 V104 V105 V106 V107 V108 V109 V110 V111-115 Description Error Word Command Code (Start DataShare Producer)) Connection Number Protocol Manager Number Option Bits Data ID (1 - 65565) MSW: Source V Memory Address LSW: Source V Memory Address Length of Data in Words (1 - 512) Trigger Option (1 = timer, 2 = logic, 3 = scan) Timer Interval (when Offset 9 = 1) Scan Interval (when Offset 9 = 3) Reserved, Set to 0 Hex Decimal 0000 2F01 4B2B 002F 0000 0003 0000
Start Consumer – PLC A & PLC B (Data Produced by PLC C) Offset V100 V101 V102 V103 V104 V105 V106 V107 V108 V109 V110-V115 76 Description Error Word Command Code (Start DataShare Consumer) Connection Number Protocol Manager Number Option Bits Data ID (1 - 65565) MSW: Destination V Memory Address LSW: Destination V Memory Address Data Length in Words (1 - 512) Starting Data Word in Data Block (1 - 512) Reserved, Set to 0 Hex 0000 2F03 4B2B 002F 0000 0003 0000 04B0 0064 0001 0000 Decimal 0 12035 19243 47
CHAPTER 7. E-MAIL FEATURE 7.1. Overview Electronic Mail (E-mail) has become the de-facto standard for timely distribution of information. The latest versions of E-mail servers are even capable of initiating pager messages, immediately notifying the recipient that E-mail has arrived. E-mail can be used in the plant floor environment, to notify maintenance of equipment breakdowns, inform material handling of parts requirements, and to alert production personnel of special process requirements.
7.2. 2572 Command Block The E-mail Feature is implemented using the standard 505-CP2572 command interface. A single command block is used to initiate the E-mail client, establish the connection to the E-mail server, transfer the message, and close the connection.
be used to time stamp the message. The PLC logic must copy the contents of the status words to the command block. NOTE If the V memory offsets 10–13 contain erroneous data, the date will be wrong. If you encounter Email date problems, check the values in these fields. See the SIMATIC 545/555/575 Programming Reference manual for the Status Word format. Signed offset from GMT – This field contains the local time zone adjustment relative to Greenwich Mean Time (GMT).
Command Block V Memory Address 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 Description Hex Decimal Error Word Command Code (Send E-mail) Reserved Reserved IP address of Mail Server – High 16 bits IP address of Mail Server – Low 16 bits V memory address of E-mail Recipient List V memory address of Reply To address V memory address of Subject field V memory address of Message string Contents of Status Word 141 Contents of Status Word 142 Contents of Status Word 143 Contents of Status W
C1000, 1001, and 1002 have been programmed as the alarm bits for the alarm conditions. When one of the alarm bits goes true, the pointer to the desired message string to be sent in the E-mail is moved into V109 of the command block. The one-shot allows the message to only be triggered on the first transition of the alarm bit to true to prevent sending the message multiple times.
CHAPTER 8. TROUBLESHOOTING 8.1. General Troubleshooting Techniques If you experience a problem in communicating with the module, consider the following troubleshooting guidelines: 1. Make sure that the module is operational (see Section 5.2 below). Common problems include not logging in the module to the PLC and not loading the PLC parameters properly. If you notice a problem in this area, you must correct it before proceeding further. 2. Check the network cabling (see Section 5.3 below).
8.2. General Module Problems When the 2572 is reset, it performs a Power On Self Test (POST) to determine if all module components are operating properly. This test takes only a few seconds. Once the POST is complete, the ACTIVE LED should blink at a fast (2Hz) rate, indicating that the network parameters have not been loaded. Once the network parameters are successfully loaded, the ACTIVE indicator will be illuminated (on steady).
8.3. Network Communications Problems Most of the problems you encounter with the Ethernet network data link will probably be associated with cabling problems. The LEDs on the 2572 can help you locate the problem source. If you are connected to an active network you should see the Ethernet Receive LED flash. Note that this LED detects all traffic not just packets directed to module address.
Symptom The COLLISION LED flashes frequently and throughput is degraded. Probable Cause The network is experiencing excessive traffic. Corrective Action If the situation persists, isolate this segment of the network by installing a router or bridge. The COLLISION LED flashes frequently when using 10Base2 cabling The coax cable is not terminated properly or the transceiver is defective. Correct cabling and/or transceiver problems. The POLARITY LED is lit. This indicates that the cable is miswired.
8.4. Serial Communications Problems The most common sources of signal problems are bad cables and improperly configured operator interface devices. The RCV and XMT indicators can be a valuable aid in troubleshooting these errors. If the RCV indicator for a serial port does not flash briefly when you attempt to send data to the 2572, no signal is being received by the module. First, determine that the operator interface device is indeed sending data (refer to the operating manual for the applicable device).
Intermittent Serial Communications Problems If you experience intermittent communications failures, you may be experiencing noise on the communications cable which interferes with data transmission or you may have a faulty cable. You should ensure that you have not exceeded the maximum distances for cabling lengths. Also check for proper grounding of the cable shields; we recommend connecting the shield at one end only.
8.5. PLC Logic Problems As described previously, the Command Block located in V memory specifies the command to be executed. The Command Slots (WY5-WY8) select which Command Blocks are to be processed. The Command Control bits trigger the execution of the commands. A mistake in setting up and/or manipulating these structures will cause erroneous results. Fortunately, the 2572 module provides extensive error reporting which should assist you in correcting logic problems.
Errors in manipulating the Command Control bits may cause "multiple triggering," resulting in an error code. Certain commands, such as those to create a connection, must be run only once. Improperly constructed PLC logic may repeatedly trigger the command, resulting in an error code such as 0x00A7 (duplicate connection). 8.6.
Within each set of four Command Status bits: • The first bit is the Command Error bit, • The second bit is the PLC Error bit, • The third bit is the Command Busy bit, • The fourth bit is the Abort Busy bit. Therefore, to set a command trigger only (uncoupled mode) for the first command slot, set WY4 to hex 2000. To set the command trigger for the second slot, set the WY4 to hex 0200. To set the error acknowledge for the third Command Slot, set WY4 to hex 0080.
To trigger a coupled mode command for command slot 1 (Assuming the module is logged at Word 1-8): 1. Enter the Command Block data in V memory. 2. Enter the address of the Command Block in WY5. 3. Change the value of WY4 to hex 6000. WX2 should change to hex 2000, indicating that the module is executing the command. 4. If WX2 changes to hex 2000, set the value of WY4 to hex 0000 (clears the trigger). If WX2 eventually transitions from hex 2000 to hex 0000, the command was executed successfully. 5.
APPENDIX A. 2572 CONNECTORS RS-232 Connector (Port 1) Use communications cable that complies with RS-232C requirements. Since this pinout of this port matches the IBM PC compatible standard, you should be able to locate standard cables. If you wish to construct custom cables, please refer to the following diagram. Connect shield wire at one end only. Figure 16. RS-232 Connector Pin-Out RS-422 Connector (Port 2) Use a communications cable that complies with RS-422 requirements.
10BaseT Connector Use unshielded twisted pair cables that comply with the IEEE 802.3 Type 10BaseT standard. Figure 18. 10BaseT Connector AUI Connector Use transceivers or cables that comply with the IEEE 802.3 standard for Attachment Unit Interface. Figure 19. AUI Connector AUI Power Attach an external power supply capable of supplying at least 500ma at 12 VDC. This connector is not fused; however, it is diode protected.
APPENDIX B. ERROR CODES When the 2572 encounters an error condition, it raises the CMD ERR bit and places an error word in Offset 0 of the Command Block. Following is a list of the errors in numerical order. 2572 System Error Codes The following error codes may be returned by the 2572 operating system. They are almost always the result of invalid data in the command block or faulty PLC logic. All system error codes begin with hex 00.
HEX DEC DESCRIPTION SOLUTION 008D 142 MAXIMUM CONNECTIONS EXCEEDED You cannot create more than 8 TCP Client connections. You attempted to create more TCP client connections than the 2572 will support. 0097 151 INVALID COMMAND While attempting to execute a system command, you specified an invalid command number. 009E 158 ALREADY BUSY You attempted to send a command to a function that was already busy executing a previous command.
HEX DEC DESCRIPTION SOLUTION 00A8 168 DUPLICATE CONNECTION NUMBER Check the Command Blocks for the respective Create Connection commands. An attempt was made to start two protocol managers with the same connection number. Ensure that the Create Connection commands use different connection numbers. 00A9 169 INVALID PROTOCOL MGR NUMBER You entered an invalid protocol manager number in the Command Block.
General Memory Transfer Error Codes HEX DEC DESCRIPTION SOLUTION 026F 623 REMOTE MEMORY READ: WORD COUNT ERROR This error usually occurs when the number of words requested in the command block causes the read request to exceed the memory boundary in the remote PLC. In other words, you are trying to read memory that isn’t there. The remote device (PLC) responded with fewer words than requested by the Remote Memory Read command block.
HEX DEC DESCRIPTION SOLUTION 027A 634 INVALID DEVICE CODE This error may result from a transient error in the data link. You should retry the command. If the problem persists, check the quality of the data link. The 2572 detected an invalid device code in the response from the remote device If the remote node is a computer simulating a 2572 PLC server, ensure that the software is correctly creating the response the response message 027B 635 BAD OR MISSING DELIMITER See error code 027A.
HEX DEC DESCRIPTION SOLUTION 0292 658 MESSAGE ID MISMATCH This error could be caused by a timeout value which is too short followed by an attempt to re-send. Therefore, by the time the response to the first command arrives, you have already sent a second command. You may correct this condition by increasing the timeout value. The response message contained an ID field which did not match the ID field in the command. This may also be caused by an improperly programmed server.
HEX DEC DESCRIPTION SOLUTION 02AC 684 MEMORY READ ERROR When this error occurs, it is usually due to an invalid memory address specification in the command block. Check the value for Source in Offset 3 and make corrections if necessary. The 2572 was unable to read the requested V memory. If this occurs on a WRITE REMOTE command block, it indicates that the 2572 could not obtain the data from the local PLC V memory.
PLC Server Error Codes The following error codes may be returned by the PLC server or by a CAMP server operating on a serial port. The codes will be displayed only if the server was started by PLC logic. Some error codes are described as “information only”. They will be displayed only if you start the Network Server using the Start Network Server command. “Information Only” errors are not caused by PLC logic; they are the result of a problem with the client device.
237C 237D 237E 237F 2380 2381 2382 2383 2386 9084 9085 9086 9087 9088 9089 9090 9091 9094 BAD BCC - CAMP PROTOCOL This error is for information only. The 2572 received a CAMP message with bad Block Check Character field. See error 237A above INVALID TYPE CODE -CAMP PROTOCOL This error is for information only. The 2572 received a CAMP message which contained an invalid Type Code. See error 237A above INVALID CHARACTER - CAMP PROTOCOL This error is for information only.
HEX DEC DESCRIPTION SOLUTION 238D 9101 # OF CONNECTIONS OUT OF RANGE Correct the command block and re-execute the command. The number of concurrent TCP server connections you specified in Offset 11 of the command block exceeded the maximum allowable value. 238F 2390 2391 2397 9103 9104 9105 9111 INVALID WORD COUNT - CAMP READ This error is for information only. The 2572 received a CAMP Read message which contained an invalid word count. No action is required at the 2572/PLC.
HEX DEC DESCRIPTION SOLUTION 239B 9115 NETWORK READ ERROR This may be caused by an intermittent network condition. Retry the operation. If the condition persists try replacing the module to determine if the condition will disappear. The module detected an error when reading for the Ethernet port If replacing the module does not improve the condition, you should test your network thoroughly. 239C 239D 9116 9117 NETWORK WRITE ERROR The module was unable to write data to the TCP/IP socket.
HEX DEC DESCRIPTION SOLUTION 23A3 9123 SBIT SELECTION ERROR See error code 23A0 (Serial Ports Only) The protocol manager was passed an invalid number of stop bits. Valid stop bit values are 1 and 2. 23A4 9124 HSHAKE SELECTION ERROR See error code 23A0 (Serial Ports Only) The protocol manager was passed an invalid handshake value.
PLC Client Error Codes HEX DEC DESCRIPTION SOLUTION 2401 9217 PROTOCOL NOT SUPPORTED The protocol may have been disabled in the startup options of the remote 2572 Network Server. Check the remote device. The remote device does not support the TCP/IP protocol you are requesting. Check the network address in the command block. If you are using a PC to emulate a PLC server, ensure that the network parameters are properly set. 2402 9218 SOCKET TYPE NOT SUPPORTED See the previous solution.
HEX DEC DESCRIPTION SOLUTION 2409 9225 INSUFFICIENT BUFFER SPACE This could occur when the remote host has sent more data than the negotiated buffer space. Retry the operation. If the problem persists, contact CTI. There is insufficient buffer space to hold the message. 240A 9226 SOCKET NOT CONNECTED The socket you are attempting to use is not connected to the remote host.
HEX DEC DESCRIPTION SOLUTION 2470 9328 INVALID OPTION BIT Correct the option bit setting or change the conflicting parameters. The option bit setting is invalid when compared to the other parameters in the command block. 2473 9331 BAD OR MISSING DELIMITER The receiving device detected a bad or missing delimiter in the command message If you are using TCP, you cannot set the IP Address Location bit to 1. This error usually indicates a transient error in the data link. You should retry the command.
HEX DEC DESCRIPTION SOLUTION 247E 9342 INVALID DATA CHARACTER See error code 247A. The 2572 detected an invalid data character in the message sent from the remote device. Only characters 0-9 and A-F are allowed. 247F 9343 ODD NUMBER OF CHARACTERS See error code 247A. The 2572 detected an odd number of characters in the message sent from the remote device. All CAMP messages have an even number of characters. 2480 248A 9344 9354 The response contained an unknown error character.
HEX DEC DESCRIPTION SOLUTION 2498 9368 COULD NOT OPEN PORT This error may occur when you are starting up a client on the serial port. The protocol manager could not open the 2572 serial port. Occurs during a Create Connection command. 2499 9369 ERROR READING PORT This usually is the result of a hardware error, which may be transient. Retry the command. If the error persists, reset the module. If the error re-occurs after reset, replace the module. See error code 2498.
HEX DEC DESCRIPTION SOLUTION 24A1 9377 DATA BITS SELECTION ERROR See error code 24A0 (Serial Ports Only). The protocol manager was passed an invalid value for data bits. Valid data bit values are 5, 6, 7, 8. 24A2 9388 PARITY SELECTION ERROR See error code 24A0 (Serial Ports Only). The protocol manager was passed an invalid parity value. Valid parity values are 0-None, 1-Odd, 2-Even. 24A3 9379 STOP BIT SELECTION ERROR See error code 24A0 (Serial Ports Only).
E-Mail Error Codes NOTE: Some E-mail delivery errors will not be detected at the time the command is executed. When these errors occur, most mail servers generate a reply message back to the initiator of the message. If you wish to be notified of these errors, make sure you have entered the appropriate address in the “REPLY TO” string. HEX DEC Description Corrective Action 2D01 11521 2D02 11522 2D03 11523 No SMTP Server Was Available At The Target IP Address.
HEX DEC Description Corrective Action 2D18 11545 Error starting SMTP protocol manager Ensure that all command block parameters are valid.
Send Receive Error Codes HEX DEC Description Possible Corrective Action 2E01 11777 TSAP length too long(>10 bytes) Ensure the entry is correct 2E02 11778 Out-of-range connection number Use a number between 19221 and 19228 2E03 11779 Local TSAP specified is already in use Select another TSAP name 2E04 11780 2E05 11781 Remote TSAP specified is already in use for the remote IP address. Local TSAP Length = 0 Select another TSAP name. You may need to set up another TSAP in the partner PLC.
HEX DEC Description Possible Corrective Action 2E25 11813 Correct the application logic. 2E26 11814 2E27 11815 2E28 11816 2E30 11824 2E31 2E32 11825 11826 2E33 11827 A SEND command was issued on a Passive connection that has not yet been established. Remote system attempted to open a connection on a TSAP locally configured as an Active connection. Logic attempted to create an active TCP connection when the TCP connection is already established. Connection has been lost.
location) to verify that data is being consumed. Note that error counts will be logged in DataShare diagnostic statistics and can be accessed by the user for troubleshooting. HEX DEC Description Possible Corrective Action 2F00 12032 Connection number out of Range Correct the Command Block entry. 2F01 12033 Correct the Command Block entry. 2F02 12034 The specified connection ID is already in use (Duplicate request). V memory address of user data = 0 Correct the Command Block entry.
HEX DEC Description Possible Corrective Action 2FAC 12204 Correct Command Block Entry 2FC82FFF 12238 12287 V memory address of user data extends beyond PLC maximum System errors. Contact Technical Support 2572 Internal Errors Error codes whose lower byte is greater than C8 hex are internal code errors. If you should experience one of these errors, contact CTI for assistance.
APPENDIX C. REFERENCE MATERIAL Hexadecimal to ASCII Conversion Table 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F CTI 2572 Installation and Operation Guide space ! " # $ % & ’ ( ) * + , .
Monitoring the AUI/10BaseT Bit. Bit 6 of the module WX1 word can be used to monitor whether the AUI port or the 10BaseT port is being used. In applications using redundant cabling (one cable connected via a transceiver to an AUI port and one cable directly to the 10BaseT port), the bit can be used to detect when the primary cable has failed and the signal on the backup cable is being used.
Offset 0 Error Word - Set to 0 so that any previous error code is cleared. Offset 1 Command Code - The Command for Start Network Server is 4. Offset 2 Connection Number - Set this to 19200 (hex 4B00). Offset 3 TCP Stale Socket Timeout - This value specifies the amount of elapsed time (in seconds) without any messages from the client application before the 2572 will automatically close a server TCP socket.
Reading Network Parameters from EEPROM (PLC Method) The Read EEPROM command allows you to obtain the network parameters stored in the module EEPROM. The command is triggered using the command control bits in the module WY4 word.
APPENDIX D. PLC COMMAND INTERFACE General Description CTI 2572 modules log into the PLC as 2 WX inputs and 6 WY outputs. The PLC controls the module by placing values in specific WY words. The PLC obtains status information from the module via the WX words. Areas of V memory called Command Blocks are used to store command information.
Command Processing Modes You can specify how the module command execution is synchronized with the PLC logic by setting the Command Mode bit in WY4. The Command Mode bit is described in detail later in this appendix. You can select either coupled mode or uncoupled mode. Coupled Mode Processing Coupled Mode provides for tight "handshaking" between the module and the PLC. When the PLC triggers the command, the module will execute the command only once.
WX/WY Description Figure 22 shows the layout of the WX and WY words assigned to the module. WX1 and WY3 are used for global module control and status. The remaining words are used for command processing. Note there are four command slots, which allows the PLC to trigger up to four module commands in one scan. The four sets of bits in WX2 and WY4 correspond to the four command slots.
Module Status Word The module Status Word is located in the module WY1. This word is used to communicate the overall status of the module.
Module Control Word Module Control Word (WY3) 1 2 3 4 5 Mod Rst 6 7 8 9 10 11 12 13 14 15 16 DS En Module Control Bits are contained in WY3. Bit 1 is a module reset bit. When the bit is set and all four abort triggers are set, the module will perform a hardware reset. This operation resets the processor and starts all hardware diagnostics and startup functions. It is available for extreme error cases where simply acknowledging an error or aborting a command does not clear the error.
Command Control Word The Command Control Word contains bits that are set by the PLC logic. The following illustration indicates how the bits within the word are used. COMMAND CONTROL WORD (WY4) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ERR Ack CMD Mode CMD Trig Abort Trig ERR Ack CMD Mode CMD Trig Abort Trig ERR Ack CMD Mode CMD Trig Abort Trig ERR Ack CMD Mode CMD Trig Abort Trig COMMAND 1 COMMAND 2 COMMAND 3 COMMAND 4 ERROR Ack Error Acknowledge.
CMD Err Command Error. The 2572 sets this bit when it encounters an error while attempting to execute the command. The 2572 will write an error code into Offset 0 of the command block unless PLC ERR is also set (see below). PLC Err PLC Read/Write Error. The 2572 sets this bit to indicate that it could not read a valid command block from V memory. Therefore, there is no place to write an error word.
WX2 and WY4 Relationships The following illustrates the relationship between the first four bits in WX2 and WY4. This relationship applies to the other three sets of bits. Word Bit 1 Bit 2 Bit 3 Bit 4 WX2 CMD Err PLC Err CMD Busy Abort Busy WY4 ERR Ack CMD Mode CMD Trigger Abort Trigger Error Processing Bits The module will set CMD ERR any time an error occurs in processing a command. The module will also set PLC ERR if a valid Command Block cannot be read from V memory.
Command Blocks Command Blocks contain information which specifies how the command is to be executed. The standard Command Block consists of 16 contiguous words located in the first 64k of PLC V memory and has the following general structure.
WX/WY Quick Reference 132 CTI 2572 Installation and Operation Guide
Command Timing Diagrams Coupled Mode Timing (CMD Mode = 1) Coupled Mode should be selected when you want to ensure that the module will execute a command only once per trigger. In Coupled Mode the PLC and the module use the CMD TRIG (Command Trigger) and the CMD BUSY (Command Busy) bits in a "handshaking" sequence. The following figure illustrates the timing relationships between CMD TRIG and CMD BUSY for a Coupled Mode command.
Uncoupled Mode Timing (CMD Mode =0) Uncoupled Mode may be selected when close synchronization between the PLC and the module is not required. In this mode, a single trigger can cause the module to execute a command many times. Uncoupled mode is useful in applications where you want to continuously update the remote PLC. Uncoupled Mode usually takes less PLC logic to implement than Coupled Mode.
Command Error Timing The module provides a mechanism for command execution communicating errors to the PLC. This is accomplished via the CMD ERR bit and the ERROR WORD in the Command Block. The following figure illustrates Command Error timing. Note that the shaded area indicates a "don’t care" condition for the particular bit. At time A, the module has set CMD BUSY and is attempting to retrieve the command block and to process the command. Some time later, a command processing error occurs.
PLC Error Timing A PLC error occurs when the module cannot read a valid Command Block from the PLC V memory or it cannot write back to this location. The following diagram illustrates timing for the PLC ERR bit. Note that the shaded area indicates a "don’t care" condition for the particular bit. At time A, the module has set CMD BUSY and attempts to retrieve the command block from V memory. At time B, the module determines it cannot retrieve a valid command block and asserts the CMD ERR and the PLC ERR bit.
Command Abort Timing There may be rare occasions when you need to abort a command that is in progress. For example, if you triggered a READ REMOTE command with an infinite timeout and the data was never returned, the protocol manager would wait forever, blocking further execution in the command slot. Figure 27 illustrates abort timing. Assume the module is busy processing a command (Time A). At time B, the PLC asserts ABORT TRIG to stop the ongoing command processing.
General Command Considerations When designing your PLC logic you should be aware of the following: • The Command Trigger is ignored for a command if the associated Abort Trigger is set. • In Uncoupled Mode, the PLC may not see CMD BUSY go low in between command cycles. After you lower the trigger, the module may execute the command additional times. • If ERR ACK is set and left high, the associated CMD ERR bit may be set and cleared without the PLC detecting it.
APPENDIX E. IP ADDRESS INFORMATION IP Address Nomenclature Every host interface, or node, on a TCP/IP network is identified by a unique IP address. This address is used to identify a node on a network and the network to which the node belongs. Each IP address consists of 32 bits, divided into four 8 bit bytes (called octets). An IP address is usually expressed in dotted notation, with each octet expressed as its decimal equivalent. See the example below.
Private IP Addresses If you are planning on connecting to the 2572 modules via the Internet, you must obtain a set of IP addresses from the Internet Assigned Numbers Authority (IANA). You may access the web site at the following URL: http://www.isi.edu/div7/infra/iana.html. to obtain more information. If you are certain that you do not need to connect to the Internet, you can use a block of ‘private” addresses specified in RFC 1597. The private addresses are: • 10.0.0.0 through 10.255.255.255 • 172.16.0.
The subnet mask must allow at least two bits of host address. This translates into the requirement that that the subnet mask must contain at least two zeroes. In addition, a subnet mask which causes the derived host address to be 0 or a broadcast address (all bits set to 1) is invalid. Port Number The Port Number identifies a particular process or service offered by the host. Some services, such as echo server, are provided via standard "well known" port numbers.
HARDWARE SPECIFICATIONS Ethernet Ports: 1 ea. - IEEE 802.3 10BaseT with RJ-45 connector. 1 ea. - IEEE 802.3 AUI port with female DB15 connector. 10BaseT port will be automatically selected if a Link Beat is present. AUI Power may be derived from PLC backplane or from an external supply. Serial Communications Ports: 1 ea. - RS-232C (subset) with Male DB9 Connector, DTE. (RS-232 handshake lines include RTS, CTS, DSR, and DTR). 1 ea. - RS-422 with Female DB9 Connector. 1500 VDC Isolation - channel to PLC.
Backplane Power Consumption: 6.0 watts @ 5 VDC NOTE: This requirement does not include any power consumed by an optional transceiver attached to the AUI port. If you are using a transceiver, see the Installation Planning section of this manual.
LIMITED PRODUCT WARRANTY CTI warrants that this CTI Industrial Product shall be free from defects in material and workmanship for a period of one (1) year after purchase from CTI or from an authorized CTI Industrial Distributor. This CTI Industrial Product will be newly manufactured from new and/or serviceable used parts which are equal to new in the Product.
146 CTI 2572 Installation and Operation Guide
REPAIR POLICY In the event that the Product should fail during or after the warranty period, a Return Material Authorization (RMA) number can be requested orally or in writing from CTI main offices. Whether this equipment is in or out of warranty, a Purchase Order number provided to CTI when requesting the RMA number will aid in expediting the repair process. The RMA number that is issued and your Purchase Order number should be referenced on the returning equipment’s shipping documentation.
WX / WY Quick Reference 148 CTI 2572 Installation and Operation Guide