hit counter script
Siemens SIMATIC S7-400 Equipment Manual
Hide thumbs Also See for SIMATIC S7-400:
Table of Contents

Advertisement

Quick Links

SIMATIC
S7-400
Point-to-point connection CP 440
Installation and Parameter
Assignment
Equipment Manual
03/2022
A5E00057742-AE
Preface
Product Description
Basic Principles of Serial
Data Transmission
Commissioning the CP 440
Mounting the CP 440
Configuring and Parameter
Assignment the CP 440
Communication via
Function Blocks
Startup Characteristics and
Operating Mode Transitions
of the CP 440
Diagnostics with the CP 440
Programming Example for
Standard Function Blocks
Technical specifications
Connecting cables
Accessories and order
numbers
Literature
1
2
3
4
5
6
7
8
9
10
11
12
13

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SIMATIC S7-400

  • Page 1 Preface Product Description Basic Principles of Serial Data Transmission SIMATIC Commissioning the CP 440 S7-400 Point-to-point connection CP 440 Mounting the CP 440 Installation and Parameter Assignment Configuring and Parameter Assignment the CP 440 Equipment Manual Communication via Function Blocks Startup Characteristics and Operating Mode Transitions of the CP 440...
  • Page 2 Note the following: WARNING Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation. If products and components from other manufacturers are used, these must be recommended or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and maintenance are required to ensure that the products operate safely and without any problems.
  • Page 3: Preface

    Preface Preface Purpose of This Manual This manual explains how to configure and operate a point-to-point connection. Contents of the manual The manual describes the hardware and software of the CP 440 communication processor and its integration in an S7–400 programmable controller. It is divided up into instruction-based chapters and a reference section (appendices).
  • Page 4 • At the beginning of the manual you can find a comprehensive list of contents. • Finally, a comprehensive index allows quick access to information on specific subjects. Additional assistance Please contact your local Siemens representative if you have any queries about the products described in this manual. • Find your contact partner at: http://www.siemens.de/automation/partner...
  • Page 5 Preface Service & Support on the Internet In addition to our documentation, we offer a comprehensive knowledge base online on the Internet. http://www.siemens.de/automation/service&support (http://www.siemens.com/automation/ service&support) There you will find: • The newsletter, which provides the latest information on your products.
  • Page 6 Preface Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...
  • Page 7: Table Of Contents

    Table of contents Preface ..............................3 Product Description ..........................11 Uses of the CP 440 ......................11 Components Required for a Point-to-Point Connection with the CP 440....... 12 1.2.1 Required Hardware Components ..................12 1.2.2 Required Software Components ..................13 1.2.3 Incompatible CPU versions ....................
  • Page 8 Table of contents 5.4.2 Basic Parameters of the CP 440 ..................57 5.4.3 Configuration Data of the ASCII Driver ................58 5.4.4 Configuration Data of the 3964(R) Procedure ..............63 Managing the Parameter Data.................... 68 Firmware updates ......................69 5.6.1 Subsequent Loading of Firmware Updates ................
  • Page 9 Table of contents 9.6.4 "CP440 MASTER" Program Example .................. 114 9.6.5 "CP440 SLAVE" Program Example ..................115 Technical specifications ........................117 10.1 Technical Specifications of the CP 440 ................117 10.2 Standards and approvals ....................120 10.2.1 Currently valid markings and approvals ................120 10.2.2 CE approval ........................
  • Page 10 Table of contents Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...
  • Page 11: Product Description

    • Customization of the transmission protocols by means of parameter assignment with the CP 440: Point-to-Point Communication, Parameter Assignment interface Uses of the CP 440 The CP 440 communication processor allows point-to-point communication with SIMATIC modules and with non-Siemens products. Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...
  • Page 12: Components Required For A Point-To-Point Connection With The Cp 440

    Product Description 1.2 Components Required for a Point-to-Point Connection with the CP 440 Functions Supported by the Interfaces Table 1-1 Functions of the CP 440 Function CP 440 RS 422* RS 485* 3964(R) Procedure ASCII driver: • XON/XOFF flow control * The RS 422 and RS 485 are distinguished by their parameter configuration.
  • Page 13: Required Software Components

    Product Description 1.2 Components Required for a Point-to-Point Connection with the CP 440 1.2.2 Required Software Components Software components The following table lists the software components required for establishing a point-to-point connection with the CP 440. Table 1-3 Software Components for a Point-to-Point Connection with the CP 440 Components Function Diagram...
  • Page 14: Design Of The Cp 440

    Product Description 1.3 Design of the CP 440 Table 1-5 CPU Versions with Which the CP 440 Cannot be Used Order number CPU 412-1 6ES7 412-1XF00-0AB0 CPU 413-1 6ES7 413-1XG00-0AB0 CPU 413-2 6ES7 413-2XG00-0AB0 CPU 414-1 6ES7 414-1XG00-0AB0 CPU 414-2 with 128k 6ES7 414-2XG00-0AB0 CPU 416-1 6ES7 416-1XJ00-0AB0...
  • Page 15 Product Description 1.3 Design of the CP 440 Position of Operator Control and Display Elements The figure shows the arrangement of the controls and indicators on the front panel of the CP 440 communication processor. Figure 1-1 Arrangement of the Controls and Indicators on the CP 440 Communication Processor LEDs On the front panel of the •...
  • Page 16: Features Of The X27 (Rs 422/485) Interface

    With the RK 512 and 3964(R) protocols, the X27 (RS 422/485) interface submodule can only be used in four-wire mode. Cables Siemens offers standard cables in various lengths for point-to-point connection between the communication processor and a communication partner. For order information and the length of standard cables are listed in the appendix "AUTOHOTSPOT".
  • Page 17: Basic Principles Of Serial Data Transmission

    Basic Principles of Serial Data Transmission Serial Transmission of a Character Introduction The system provides various networking options for the exchange of data between two or more communication partners. The simplest form of data interchange is via a point-to-point connection between two communication partners. Point-to-Point Communication In point-to-point communication the communication processor forms the interface between a programmable controller and a communication partner.
  • Page 18 Basic Principles of Serial Data Transmission 2.1 Serial Transmission of a Character Only half-duplex mode can be used with an RS 485 (2-wire) setting. Asynchronous Data Transmission With the communication processor, serial transmission occurs asynchronously. The so-called time base synchronism (a fixed timing code used in the transmission of a fixed character string) is only upheld during transmission of a character.
  • Page 19 Basic Principles of Serial Data Transmission 2.1 Serial Transmission of a Character Figure 2-1 10-Bit Character Frame Character Delay Time The figure below shows the maximum time permitted between two characters received within a message frame. This is known as the character delay time. Signal nth character ((n + 1)th character...
  • Page 20: Transmission Procedure With A Point-To-Point Connection

    Basic Principles of Serial Data Transmission 2.2 Transmission Procedure with a Point-to-Point Connection Transmission Procedure with a Point-to-Point Connection Introduction When data are transmitted, all communication partners must adhere to a fixed set of rules for handling and implementing data traffic. The ISO has defined a 7-layer model, which is recognized as the basis for a worldwide standardization of transmission protocols for computer- to-computer communication.
  • Page 21: Transmission Integrity

    Basic Principles of Serial Data Transmission 2.3 Transmission integrity The individual layers are as follows: 1. Physical layer – Physical conditions for communication, e.g. transmission medium, baud rate 2. Data-link layer – Security procedure for the transmission – Access modes 3.
  • Page 22 Basic Principles of Serial Data Transmission 2.3 Transmission integrity Classifying the Supplied Protocols The CP 440 can use the following protocols: • ASCII driver • 3964(R) Procedure The figure below illustrates how these protocols of the CP 440 fit into the ISO reference model: Figure 2-3 Position of the supplied protocols of the CP 440 in the reference model Transmission Integrity with the ASCII Driver...
  • Page 23: Data Transmission With The Ascii Driver

    Basic Principles of Serial Data Transmission 2.4 Data Transmission with the ASCII Driver Two different procedures for data transmission can be used, either with or without a block check character: • data transmission without a block check character: 3964 • data transmission with a block check character: 3964R In this manual, the designation 3964(R) is used when descriptions and notes refer to both data transmission procedures.
  • Page 24: Sending Data With The Ascii Driver

    Basic Principles of Serial Data Transmission 2.4 Data Transmission with the ASCII Driver RS422 Operation In RS422 operation, the data is transmitted via four cables (four-wire mode). Two cables (differential signal) are available for the send direction and two for the receive direction. This means you can send and receive data at the same time (full-duplex operation).
  • Page 25 Basic Principles of Serial Data Transmission 2.4 Data Transmission with the ASCII Driver If some other method of synchronization is used, the pause in sending can be deactivated by means of the parameter assignment interface. Note When XON/XOFF flow control is configured, the user data must not contain the configured XON or XOFF characters.
  • Page 26: Receiving Data With The Ascii Driver

    Basic Principles of Serial Data Transmission 2.4 Data Transmission with the ASCII Driver 2.4.3 Receiving Data with the ASCII Driver Selectable End Criteria In data transmission using the ASCII driver, you can choose between three different end criteria when data is received. The end criterion defines when a complete message frame is received. The possible end criteria are as follows: •...
  • Page 27 Basic Principles of Serial Data Transmission 2.4 Data Transmission with the ASCII Driver Waiting for character Character arrived Character received with character Error when receiving (not a delay time monitoring character delay time error) Waiting for character delay time. Received Message frame characters discarded complete (character...
  • Page 28 Basic Principles of Serial Data Transmission 2.4 Data Transmission with the ASCII Driver If you are working with end-of-text characters, transmission is not code-transparent, and you must make sure that the end code(s) are not in the user data of the user. Note the following when the last character in the received message frame is not the end-of-text character.
  • Page 29 Basic Principles of Serial Data Transmission 2.4 Data Transmission with the ASCII Driver Waiting for character Character arrived Character received with end control and character delay time Error when receiving Message frame complete Waiting for valid end code Message frame entered in receive buffer Expiration...
  • Page 30 Basic Principles of Serial Data Transmission 2.4 Data Transmission with the ASCII Driver Note the following if the message frame length of the received characters does not match the configured fixed message frame length: • Message frame length of received characters greater than configured fixed message frame length: All characters received after the parametered fixed message frame length is reached –...
  • Page 31 Basic Principles of Serial Data Transmission 2.4 Data Transmission with the ASCII Driver Waiting for character Character arrived Character received with length control and character delay time Error when receiving Message frame complete Waiting for parameterized number of characters Message frame entered in receive buffer Expiration...
  • Page 32: Topologies Between The Communication Partners

    Basic Principles of Serial Data Transmission 2.4 Data Transmission with the ASCII Driver The receive buffer on the CP 440 is a ring buffer: • If several message frames are entered in the receive buffer of the CP 440, the following applies: it is always the oldest one that is sent from the CP 440 to the CPU.
  • Page 33 Basic Principles of Serial Data Transmission 2.4 Data Transmission with the ASCII Driver In these cases the CP 440 can be used as: • Master or • Slave. Figure 2-8 RS 422 Point-to-Point Figure 2-9 RS 485 Point-to-Point In the case of a master/slave topology, there must be an appropriate message frame in the user program.
  • Page 34 Basic Principles of Serial Data Transmission 2.4 Data Transmission with the ASCII Driver Master Slave Slave Slave Figure 2-10 RS 422 Multipoint RS485 Operation In the case of a topology in RS485 operation: • The cable pair is interconnected for the send/receive line of all the nodes. •...
  • Page 35: Data Transmission With The 3964(R) Procedure

    Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure The settings required for the different topologies can be made in the parameter assignment interface in the "Interface" dialog box. Note When you run the ASCII driver in RS422 multipoint or RS485 mode, you must take steps in the user program to ensure that only one node sends data at any one time.
  • Page 36 Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure The Control Characters The 3964(R) procedure analyzes the following control codes: • STXStart of Text; start of character string for transfer • DLEData Link Escape; data connection escape •...
  • Page 37: Block Checksum

    Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure 2.5.2 Block Checksum Block Checksum With the 3964(R) transmission protocol, data integrity is increased by the additional sending of a block check character (BCC). Figure 2-13 Block Checksum The block checksum is the even longitudinal parity (EXOR operation on all data bytes) of a sent or received block.
  • Page 38: Sending Data With 3964(R)

    Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure 2.5.3 Sending Data with 3964(R) Transmission Sequence The figure below illustrates the transmission sequence when data is sent with the 3964(R) procedure. CP 440 Communication partner Start code (02H) Connection Pos.
  • Page 39 Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure Releasing a Send Connection Once the contents of the buffer have been sent, the procedure adds the codes DLE, ETX and in the case of 3964(R) only the block checksum BCC as the end code, and waits for an acknowledgment code.
  • Page 40 Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure Sending with the 3964(R) procedure The figure below illustrates sending with the 3964(R) procedure. Intention to send Send NAK W = 1 Send NAK x > 6 x <= 6 x >...
  • Page 41: Receiving Data With 3964(R)

    Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure D: Default state W: Waiting for character reception 2.5.4 Receiving Data with 3964(R) Process of Data Transmission when Receiving The figure below illustrates the transmission sequence when data is received with the 3964(R) procedure.
  • Page 42 Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure Receiving Data After a successful connection setup, the receive characters that are arrive are stored in the receive buffer. If two consecutive DLE codes are received, only one of these is stored in the receive buffer.
  • Page 43 Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure Receiving with the 3964(R) Procedure The figure below illustrates receiving with the 3964(R) procedure. Receiving with procedure 3964(R) (part 1) Character not equal to STX or faulty Send request character S T X...
  • Page 44 Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure Receiving with the 3964(R) Procedure (part 2) The figure below illustrates receiving with the 3964(R) procedure. Receiving with procedure 3964(R) (part 2) Add character delay time Character DLE doubling received ? no errors, not...
  • Page 45 Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure R: Counter for retries D: Default state W: Waiting for character reception Receive buffer on CP 440 The CP 440 receive buffer accommodates 2000 bytes. During the parameter assignment, you can specify whether overwriting of data in the receive buffer should be prevented.
  • Page 46: Handling Corrupt Data

    Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure 2.5.5 Handling Corrupt Data Reaction to Corrupt Data The figure below illustrates how corrupt data is handled with the 3964(R) procedure. Communication CP 440 partner Receiving data Start code (02H) Connection Pos.
  • Page 47 Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure Initialization Conflict The figure below illustrates the transmission sequence during an initialization conflict. CP 440 Communication partner (low priority) (higher priority) Start code (02H) Connection Start code (02H) setup Pos.
  • Page 48 Basic Principles of Serial Data Transmission 2.5 Data Transmission with the 3964(R) Procedure reduce the user-data rate and integrity of the transmission. The disturbance could also be caused, however, by a malfunction on the part of the communication partner. If BREAK occurs on the receive line (receive line interrupted), an error is displayed at the STATUS output of the FB.
  • Page 49: Commissioning The Cp 440

    Commissioning the CP 440 Step Sequence Before starting up the CP 440 you will need to perform the following steps in the specified sequence. 1. Mounting the CP 440 2. Configuring the CP 440 3. Assigning parameters to the CP 440 4.
  • Page 50 Commissioning the CP 440 Backing up Configuration Data A backup of CP 440 parameter data includes the storage of parameters, their download to the CPU and transfer to the CP 440. Backup your CP configuration using the STEP 7 software. You can find a detailed description in the chapter "Managing the Parameter Data (Page 68)"...
  • Page 51 Commissioning the CP 440 4. Check: Always monitor the TXD send and RXD receive LEDs during the following operations Example 1: The polarity of the line is definitely correct – The default settings (all options) vary – Check the security word (e.g. CRC) Example 2: The default settings are definitely correct –...
  • Page 52 Commissioning the CP 440 Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...
  • Page 53: Mounting The Cp 440

    Mounting the CP 440 CP 440 slots Introduction There are no specific slots reserved for communication modules in the rack of the S7-400 automation system. Positioning the CP in the Rack The communication processor can be plugged into any slot in the rack, with the following exception: In all racks the power supply module occupies slots 1 to 3 depending on the width.
  • Page 54: Installation Steps

    Mounting the CP 440 4.2 Mounting and Dismounting the CP 440 Installation Guidelines The general installation guidelines for S7-400 must be followed (see the S7-400 Automation System, Installation Installation manual). To meet the EMC (electromagnetic compatibility) values, the cable shield must be connected to a shield bus.
  • Page 55: Configuring And Parameter Assignment The Cp 440

    Configuring and Parameter Assignment the CP 440 Assigning parameters to the CP 440 Requirements The programming interface Point–to–Point Communication, Parameter Assignment is installed in the STEP 7 software on your PG/PC. Before you can enter the communication processor in the configuration table of the STEP 7 software, you must have created a project and a terminal with STEP 7.
  • Page 56: Installing The Programming Interface

    Configuring and Parameter Assignment the CP 440 5.3 Parameters for the Communications Protocols Installing the Programming Interface Installation The CP 440: Point -to-Point Communication, Parameter Assignment interface is supplied together with the function blocks and the programming examples on a CD. To install the engineering tool: 1.
  • Page 57: Configuration Data

    Configuring and Parameter Assignment the CP 440 5.4 Configuration data Also, the on-line help provides sufficient support for working with the parameter assignment interface. Note To create a parameter record for the CP, you must select and save the protocol settings at least once.
  • Page 58: Configuration Data Of The Ascii Driver

    Configuring and Parameter Assignment the CP 440 5.4 Configuration data Affect of the “Reaction to CPU Stop” Parameter on the Storage of the Received Message Frames The response depends on whether or not flow control is used. Table 5-3 Control of Message Frame Storage Without Flow Control Without Flow Control Saved Frames Frame Just Arriving...
  • Page 59 Configuring and Parameter Assignment the CP 440 5.4 Configuration data Protocol parameters The table below describes the protocol parameters. Table 5-5 Protocol Parameters (ASCII Driver) Parameter Description Value Range Default Value Indicator for end of Defines which criterion signals the end After character delay time •...
  • Page 60 Configuring and Parameter Assignment the CP 440 5.4 Configuration data Parameter Description Value Range Default Value Transmission pause A pause equal to the length of the mon‐ • between the messag‐ itoring time (for a missing end ID) is in‐ •...
  • Page 61 Configuring and Parameter Assignment the CP 440 5.4 Configuration data Data flow control The table below contains descriptions of the parameters for data flow control. Data flow control is only possible when "Full Duplex (RS 422) Four-Wire Mode Point to Point" is set. Table 5-7 Data flow control (ASCII driver) Parameter...
  • Page 62 Configuring and Parameter Assignment the CP 440 5.4 Configuration data Operating mode/initial state of the receive line The table below contains descriptions of the operating mode/initial state of the receive line for the X27 (RS 422/485) interface. Table 5-9 X27 (RS 422/485) Interface (ASCII Driver) Parameter Description Value Range...
  • Page 63: Configuration Data Of The 3964(R) Procedure

    Configuring and Parameter Assignment the CP 440 5.4 Configuration data Initial state of receive line The following figure illustrates the wiring of the receiver at the X27 (RS 422/485) interface: R(B) + none R(A) R(B) + R(A) 5 V / R(B) 0 V R(A) R(B) + R(A) 0 V / R(B) 5 V...
  • Page 64 Configuring and Parameter Assignment the CP 440 5.4 Configuration data Configuration Data of the 3964(R) procedure With the CP 440: Point-to-Point Communication, Parameter Assignment interface, specify the parameters for the physical layer (layer 1) and the data-link layer (layer 2) of the 3964(R) procedure.
  • Page 65 Configuring and Parameter Assignment the CP 440 5.4 Configuration data Protocol parameters You can only set the protocol parameters if you have not set the default values in the protocol. Table 5-11 Protocol Parameters (3964(R) Procedure) Parameter Description Value Range Default Val‐...
  • Page 66 Configuring and Parameter Assignment the CP 440 5.4 Configuration data Baud Rate / Character Frame The following table describes the transmission rate/character frame. Table 5-12 Baud Rate / Character Frame (3964(R) Procedure) Parameter Description Value Range Default Value Baud rate Speed of data transmission in bits per second (baud) 9600 •...
  • Page 67 Configuring and Parameter Assignment the CP 440 5.4 Configuration data Receive buffer on CP The following table describes the parameters for the CP receive buffer. Table 5-13 Receive buffer on CP (3964(R) procedure) Parameter Description Value Range Default Value Delete CP receive buffer During power up or during transition of the CPU from •...
  • Page 68: Managing The Parameter Data

    Configuring and Parameter Assignment the CP 440 5.5 Managing the Parameter Data Wiring of the recipient at the X27 (RS 422) interface The figure below shows the wiring of the recipient at the X27 (RS 422) interface: R(B) + none R(A) R(B) + R(A) 5 V / R(B) 0 V...
  • Page 69: Firmware Updates

    Configuring and Parameter Assignment the CP 440 5.6 Firmware updates The module parameters are automatically transferred to the CP 440 in the following cases: • When they are downloaded to the CPU and the CP 440 can be reached via the S7-400 backplane bus •...
  • Page 70 Configuring and Parameter Assignment the CP 440 5.6 Firmware updates Load firmware You upload the firmware update with the aid of the CP 440: Point-to-Point Communication, Parameter Assignment interface. Proceed as follows: 1. Switch the CPU to STOP mode. 2. Start the parameter assignment interface: In SIMATIC Manager: File >...
  • Page 71: Viewing The Firmware Version

    Configuring and Parameter Assignment the CP 440 5.6 Firmware updates 5.6.2 Viewing the Firmware Version Viewing the Hardware and Firmware Version You can view the current hardware and firmware version of the communication processor in STEP 7 in the "Module Status" dialog. You can open this dialog by: In SIMATIC Manager: File >...
  • Page 72 Configuring and Parameter Assignment the CP 440 5.6 Firmware updates Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...
  • Page 73: Communication Via Function Blocks

    Communication via Function Blocks Introduction Communication between the CPU, the CP 440 and a communication partner takes place via the function blocks and the protocols of the CP 440. Communication between CPU and CP 440 The function blocks form the software interface between the CPU and the CP 440. They must be called in cycles from the user program.
  • Page 74 Communication via Function Blocks 6.1 Overview of the Function Blocks Function Blocks The table below contains the function blocks of the CP 440 and describes their purpose. Table 6-1 Function Blocks of the CP 440 FB/FC Meaning Protocol FB 9 "RECV_440" The RECV_440 function block allows you to receive data from a commu‐...
  • Page 75: Notes On Program Structure

    Communication via Function Blocks 6.3 Using the Function Blocks Notes on Program Structure Notes In order to use the speed of the CP 440 to optimum effect, you should heed the following when you create your user program: For a short cycle: •...
  • Page 76: S7 Transmits Data To A Communication Partner, 10 Send_440 Fb

    Communication via Function Blocks 6.3 Using the Function Blocks This means: • With ASCII driver: The job was sent to the communication partner. This does not necessarily mean that the data was received by the communication partner. • With 3964( R ) procedure: The job was sent to the communication partner and acknowledged affirmatively by the communication partner.
  • Page 77 Communication via Function Blocks 6.3 Using the Function Blocks Error Display on the SEND_440 FB The DONE output shows "request completed without errors". ERROR indicates whether an error has occurred. In STATUS the event number is displayed in the event of an error. If no error occurs the value of STATUS is 0.
  • Page 78 Communication via Function Blocks 6.3 Using the Function Blocks Assignment in the Data Area The SEND_440 FB works with an instance DB (I_SEND_440). The DB number is specified in the call. The data in the instance DB cannot be accessed. Note Exception: If the error (STATUS == W#16#1E0F) occurs, you can consult the SFCERR variable for additional details (see the chapter "Diagnostics Messages of the Function Blocks (Page 97)").
  • Page 79: S7 Receives Data From A Communication Partner, 9 Recv_440 Fb

    Communication via Function Blocks 6.3 Using the Function Blocks Time Sequence Chart for the SEND_440 FB The figure below illustrates the behavior of the DONE and ERROR parameters, depending on how the REQ and R inputs are wired. Figure 6-1 Time Sequence Chart for the 10 SEND_440 FB Note The REQ input is edge-triggered.
  • Page 80 Communication via Function Blocks 6.3 Using the Function Blocks If the function block detects the signal state "1" at the R parameter, the current send job is aborted and the RECV_440 FB is set to the initial state. Receiving is deactivated as long as the R parameter has the signal state "1".
  • Page 81 Communication via Function Blocks 6.3 Using the Function Blocks Assignment in the Data Area The RECV_440 FB works with an instance DB (I_RECV_440). The DB number is specified in the call. The data in the instance DB cannot be accessed. Note Exception: If the error (STATUS == W#16#1E0E) occurs, you can consult the SFCERR variable for additional details (see the chapter "Diagnostics Messages of the Function Blocks (Page 97)").
  • Page 82: Deleting The Receive Buffer (11 "Res_Recv" Fb)

    Communication via Function Blocks 6.3 Using the Function Blocks Time Sequence Chart for the RECV_440 FB The figure below illustrates the behavior of the NDR, LEN and ERROR parameters, depending on how the EN_R and R inputs are wired. Figure 6-2 Time Sequence Chart for the 9 RECV_440 FB Note The EN_R must be set to static "1".
  • Page 83 Communication via Function Blocks 6.3 Using the Function Blocks The LADDR parameter specifies the address of the CP 440 to be addressed. Error Display on the RES_RECV FB The DONE output shows "request completed without errors". ERROR indicates whether an error has occurred.
  • Page 84 Communication via Function Blocks 6.3 Using the Function Blocks Assignment in the data area The RES_RECV FB works with an instance DB (I_RES_RECV). The DB number is specified in the call. The data in the instance DB cannot be accessed. Note Exception: If the error STATUS == W#16#1E0F occurs, you can consult the SFCERR variable for more details of the error.
  • Page 85: Programming The Function Blocks

    Communication via Function Blocks 6.4 Programming the Function Blocks Time Sequence Chart for the RES_RECV FB The figure below illustrates the behavior of the DONE and ERROR parameters, depending on how the REQ and R inputs are wired. DONE ERROR Figure 6-3 Time Sequence Chart for the 11 RES_RECV FB Note...
  • Page 86 Communication via Function Blocks 6.4 Programming the Function Blocks Example of "Direct Parameter assignment" Call of the FB 10 corresponding to "direct parameter assignment": Network 1: CALL FB 10, DB10 := M 0.6 //Activates SEND := M 5.0 //Activates RESET LADDR := +336 //Basic address, PB336...
  • Page 87 Communication via Function Blocks 6.4 Programming the Function Blocks Example 1 The symbol name for the data block is entered in the symbol table, while the symbol name for the data operand is declared in the corresponding data block. DB 20.DBW 0 Absolute fully qualified addressing CP_DB.SEND_DWNORCV Symbolic fully qualified addressing...
  • Page 88: General Information On Program Processing

    Communication via Function Blocks 6.5 General Information on Program Processing FB 10, DB10 := SEND_REQ //Activates SEND := SEND_R //Activates RESET LADDR := BGADR //Basic address DB_NO := CP_DB.SEND_DBNR //Send DB no. DBB_NO := CP_DB.SEND_DWNR //Message frame as of data word := CP_DB.SEND_LAE //Message frame length...
  • Page 89: Technical Specifications Of The Function Blocks

    Communication via Function Blocks 6.6 Technical Specifications of the Function Blocks Addressing the Module The logical basic address is defined via STEP 7 and must be specified by the user under the block parameter LADDR. Technical Specifications of the Function Blocks Introduction The following lists the technical specifications for the memory requirements, runtimes, minimum number of the CPU cycles and the system functions used.
  • Page 90 Communication via Function Blocks 6.6 Technical Specifications of the Function Blocks Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...
  • Page 91: Startup Characteristics And Operating Mode Transitions Of The Cp 440

    Startup Characteristics and Operating Mode Transitions of the CP 440 Operating Modes of the CP 440 The CP 440 has the operating modes STOP, parameter reassignment and RUN. STOP When the CP 440 is in STOP mode, no protocol driver is active and all send and receive requests from the CPU are given a negative acknowledgment.
  • Page 92: Behavior Of The Cp 440 On Operating Mode Transitions Of The Cpu

    Startup Characteristics and Operating Mode Transitions of the CP 440 7.3 Behavior of the CP 440 on Operating Mode Transitions of the CPU Parameter Assignment Parameter assignment means that the CP 440 receives the module parameters assigned to the current slot as created with the CP 440: Point-to-Point Communication, Parameter Assignment programming interface.
  • Page 93: Behavior Of The Sender Line Drivers Of The Serial Interface During Particular Operating Modes Of The Cp 440

    Startup Characteristics and Operating Mode Transitions of the CP 440 7.4 Behavior of the Sender Line Drivers of the Serial Interface During Particular Operating Modes of the CP 440 Behavior of the Sender Line Drivers of the Serial Interface During Particular Operating Modes of the CP 440 Behavior of the Sender Line Drivers Table 7-1...
  • Page 94 Startup Characteristics and Operating Mode Transitions of the CP 440 7.4 Behavior of the Sender Line Drivers of the Serial Interface During Particular Operating Modes of the CP 440 Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...
  • Page 95: Diagnostics With The Cp 440

    Diagnostics with the CP 440 Diagnostics Functions of the CP 440 Introduction The diagnostics functions of the CP 440 enable you to quickly localize any errors which occur. The following diagnostics options are available: • Diagnostics via the display elements of the CP 440 •...
  • Page 96: Diagnostics Via The Display Elements Of The Cp 440

    Diagnostics with the CP 440 8.2 Diagnostics via the display elements of the CP 440 Diagnostics via the display elements of the CP 440 Display Elements of the CP 440 The display elements of the CP 440 provide information on the CP 440. The following display functions can be distinguished: •...
  • Page 97: Diagnostics Messages Of The Function Blocks

    Diagnostics with the CP 440 8.3 Diagnostics Messages of the Function Blocks Diagnostics Messages of the Function Blocks Error Diagnostics Each function block has a STATUS parameter for error diagnostics. The STATUS message numbers always have the same meaning, irrespective of which function block is used. Numbering Scheme for Event Class/Event Number The figure below illustrates the structure of the STATUS parameter.
  • Page 98 Diagnostics with the CP 440 8.3 Diagnostics Messages of the Function Blocks Event Classes The table below describes the various event classes and numbers. Table 8-2 Event Classes and Event Numbers Event Class 0 (00H): "CP startup" Event No. Event Text To correct or avoid errors (00)01H Initialization of the CP completed...
  • Page 99 Diagnostics with the CP 440 8.3 Diagnostics Messages of the Function Blocks Event Class 5 (05H): "Error processing a CPU request" Event No. Event To correct or avoid errors (05)0EH • Invalid message frame length • The message frame is > 400 bytes (see chapter "Overview of the Function Blocks (Page 73)").
  • Page 100 Diagnostics with the CP 440 8.3 Diagnostics Messages of the Function Blocks Event Class 7 (07H): "Send error" Event No. Event To correct or avoid errors (07)06H With 3964(R) only: Check whether the partner is also showing an error, possibly because not all transmission data has arrived Error at end of connection: (e.g.
  • Page 101 Diagnostics with the CP 440 8.3 Diagnostics Messages of the Function Blocks Event Class 8 (08H): "Receive error" Event No. Event To correct or avoid errors (08)01H With 3964(R) only: A repetition is not an error, however, it can be an indi‐ cation that there are disturbances on the transmission Expecting the first repetition: line or a malfunction of the partner device.
  • Page 102 Diagnostics with the CP 440 8.3 Diagnostics Messages of the Function Blocks Event Class 8 (08H): "Receive error" Event No. Event To correct or avoid errors (08)0CH Transmission error: Faults on the transmission line cause message frame repetitions, thus lowering user data throughput. Dan‐ •...
  • Page 103 Diagnostics with the CP 440 8.3 Diagnostics Messages of the Function Blocks Display and evaluate STATUS output You can display and interpret the actual operands in the STATUS output of the function blocks. Note An error message is only output if the ERROR bit (request completed with error) is set. In all other cases the STATUS word is zero.
  • Page 104: Diagnostics Via The Diagnostic Buffer Of The Cp 440

    Diagnostics with the CP 440 8.4 Diagnostics via the diagnostic buffer of the CP 440 Diagnostics via the diagnostic buffer of the CP 440 Diagnostic Buffer of the CP 440 The CP 440 has its own diagnostic buffer, in which all the diagnostic events of the CP 440 are entered in the order in which they occur.
  • Page 105 Diagnostics with the CP 440 8.4 Diagnostics via the diagnostic buffer of the CP 440 4. Select PLC > Module Information. Result: The "Module Information" tab appears for the CP 440. The "General" tab is displayed by default the first time you call it. 5.
  • Page 106 Diagnostics with the CP 440 8.4 Diagnostics via the diagnostic buffer of the CP 440 Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...
  • Page 107: Programming Example For Standard Function Blocks

    Programming Example for Standard Function Blocks General Information Introduction The project example given here and contained in the CP440_PtP_Com project describes the standard functions for operating the CP 440 communication processor. The example can be executed with the minimum hardware equipment. The STEP 7 function monitor/modify variables is also used (e.g.
  • Page 108: Settings

    Programming Example for Standard Function Blocks 9.4 Blocks Used Settings Settings in the CPU by means of STEP 7 Use STEP 7 to configure your controller as follows. • Slot 1: Power supply • Slot 2: CPU • Slot 4: CP 440, start address 512 •...
  • Page 109 Programming Example for Standard Function Blocks 9.4 Blocks Used Block Symbol Description DB 43 RECV DST DB Receive data block FB 9 RECV_440 Receive standard FB for data FB 10 SEND_440 Send standard FB for data FC 21 SEND Sending Data FC 22 RECEIVE Receiving data...
  • Page 110 Programming Example for Standard Function Blocks 9.4 Blocks Used Table 9-4 CP 440 MASTER Block Symbol Description OB 1 CYCLE Cyclic program processing OB 100 RESTART Cold restart processing FB 9 RECV_440 Receive standard FB for data FB 10 SEND_440 Send standard FB for data FC 1 SLAVE01...
  • Page 111: Installation, Error Messages

    Programming Example for Standard Function Blocks 9.6 Activation, Startup Program and Cyclic Program Installation, Error Messages Scope of Supply and Installation The project example of the CP 440 and the CP 440: Point -to-Point Communication, Parameter Assignment interface is supplied together with the function blocks and this manual on a CD. The program examples are installed together with the parameter assignment interface and described in the chapter "Installing the Programming Interface (Page 56)".
  • Page 112 Programming Example for Standard Function Blocks 9.6 Activation, Startup Program and Cyclic Program Cyclic Program The cyclic program is defined in the organization block OB 1. In the example, the function blocks FB 9 "RECV_440" and FB 10 "SEND_440" work together with the functions FC 21 and FC 22 as well as with the data blocks DB 21 and DB 22 as instance DBs and DB 42 and DB 43 as send or receive DBs.
  • Page 113: Cp440 1 Cyc" Program Example

    Programming Example for Standard Function Blocks 9.6 Activation, Startup Program and Cyclic Program 9.6.2 "CP440 1 CYC" Program Example This example is set up identically to the example "CP440 SEND RECV". However, the FC 21 has been changed to allow a SEND job to be processed cyclically. Description of FC 21 (SEND) The procedure for processing a SEND job cyclically is as follows: •...
  • Page 114: Cp440 Master" Program Example

    Programming Example for Standard Function Blocks 9.6 Activation, Startup Program and Cyclic Program Generation of BCC HI ASCII characters "32" =2 #w_bcc_value 0025 UW w#16#F0 00F0 //Hide lower half-byte = 0020 SLW 4 0200 //Push a half-byte to the left OW w#16#3000 3000 //Request 3000 Hex...
  • Page 115: Cp440 Slave" Program Example

    Programming Example for Standard Function Blocks 9.6 Activation, Startup Program and Cyclic Program 9.6.5 "CP440 SLAVE" Program Example In FB 40, RECV is called to query whether a job has been received from the master. For this purpose, in the receive message frame the slave address is compared with its own address. As soon as there is a job, the reply is sent to the master with the SEND call.
  • Page 116 Programming Example for Standard Function Blocks 9.6 Activation, Startup Program and Cyclic Program Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...
  • Page 117: Technical Specifications

    General technical specifications The following table contains the general technical specifications of the CP 440. You will find additional general technical specifications on the SIMATIC S7-400 in the S7-400 Automation System, Module Specifications reference manual, General Technical Specifications, and the S7-400 Automation System, Installation installation manual.
  • Page 118 Technical specifications 10.1 Technical Specifications of the CP 440 Technical specifications X27 (RS 422/485) interface The following table contains the technical specifications of the X27 (RS 422/ 485) interface of the CP 440-RS 422/485. Table 10-1 Technical specifications of the X27 (RS 422/485) interface Technical specifications Interface RS 422 or RS 485, 15-pin sub D female...
  • Page 119 Technical specifications 10.1 Technical Specifications of the CP 440 3964(R) procedure with default values Max. message frame 400 bytes (see chapter "Overview of the Function Blocks (Page 73)") length Parameter can be assigned parameters: • With/without block check character • Priority: low/high •...
  • Page 120: Standards And Approvals

    Technical specifications 10.2 Standards and approvals ASCII driver Parameter can also be assigned parameters: • Number of end-of-text characters: 1 and/or 2 • Hex code for first/second end-of-text character ASCII driver with end of message frame recognition by configured message-frame length Parameter can also be assigned parameters: •...
  • Page 121: Ce Approval

    Technical specifications 10.2 Standards and approvals Reference You can find the certificates for the markings and approvals on the Internet under Service&Support. Safety instructions WARNING Personal injury and damage to property may occur Note the following information for use in hazardous areas: •...
  • Page 122: Ccc Approval

    • GB 3836.1-2010 (Explosive atmospheres - Part 1: Equipment - General requirements) • GB 3836.8-2014 (Explosive atmospheres-Part 8: Equipment protection by type of protection "n") 10.2.4 UKCA approval DEKRA 21UKEX0018 X Importer UK: Siemens plc Manchester M20 2UR Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...
  • Page 123: Explosion Protection

    Technical specifications 10.2 Standards and approvals 10.2.5 Explosion protection ATEX approval DEKRA 21ATEX0010 X Type examination certificate number DEKRA 21ATEX0010 X Standards EN IEC 60079-0 EN 60079-7 Marking II 3 G Ex ec IIC T4 Gc The certificate is valid for the "DEKRA 21ATEX0010 X" products listed in the certificate. Special conditions •...
  • Page 124: Culus Approval

    Technical specifications 10.2 Standards and approvals 10.2.6 cULus approval Underwriters Laboratories Inc. in accordance with: • UL 508 (Industrial Control Equipment) • CSA C 22.2 No. 142 (Process Control Equipment) 10.2.7 cULus HAZ. LOC. approval HAZ. LOC. Underwriters Laboratories Inc. in accordance with: •...
  • Page 125: Approval For Australia And New Zealand

    Technical specifications 10.2 Standards and approvals 10.2.9 Approval for Australia and New Zealand The SIMATIC S7-400 product series meets the requirements of the standard EN 61000‑6‑4:2007 + A1:2001. 10.2.10 Approval for the Korea and South Korea The SIMATIC S7-400 product series complies with Korean safety standards:...
  • Page 126 Technical specifications 10.2 Standards and approvals Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...
  • Page 127: Connecting Cables

    Connecting cables 11.1 X27 (RS 422/485) Interface of the CP 440 Pin Assignment The table below shows the pin assignment for the 15-pin subminiature D female connector in the front panel of the CP 440. Table 11-1 Pin Assignment for the 15-Pin Subminiature D Female Connector of the Integrated Interface of the CP 440 Female connector on Designation Input/Output...
  • Page 128 11.2 Cables Note that you must only use shielded connector housings. A large surface area of both sides of the cable shield must be in contact with the connector casing. You are advised to use Siemens V42 254 shielded connector casings.
  • Page 129 Connecting cables 11.2 Cables For the connecting cables you require the following male connectors: • At the CP 440 end: 15-pin sub D male connector with screw-locking • At the communication partner: 15-pin sub D male connector with screw-locking CP 440 Communication partner T(A) R(A)
  • Page 130 The previous figure shows the wiring if you want to make the connecting cable yourself. In both RS 485 mode (two wire) and RS 422 mode (four wire) you can also use Siemens connecting cables. The figure below illustrates the internal wiring in the connecting cable.
  • Page 131 Connecting cables 11.2 Cables For the connecting cables you require the following male connectors: • At the CP 440 end: 15-pin subminiature D male with screw interlock • At the communication partner: 15-pin subminiature D male with clip fixing CP 440 Communication partner T(A)- R(A)-...
  • Page 132 Connecting cables 11.2 Cables Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...
  • Page 133: Accessories And Order Numbers

    Accessories and order numbers 12.1 Accessories and Order Numbers Module Table 12-1 Order Numbers of the CP 440 Module Product Order Number CP 440 6ES7 440–1CS00–0YE0 Cables Cables are available of the preferential lengths: 5 m, 10 m and 50 m. Table 12-2 Order Numbers of the Cables Connecting cables for...
  • Page 134 Accessories and order numbers 12.1 Accessories and Order Numbers Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...
  • Page 135: Literature

    S7 CPU. For novice users of an S7–300/400 it provides an Programming with STEP 7 (http:// overview of the programming principles on which the design of user programs is based. support.automation.siemens.com/ WW/view/en/18652056) Manual This STEP 7 manual explains the principles behind the use and functions of the STEP 7 automation software.
  • Page 136 (http:// If it is the first time that you use one of the languages, the manuals will help you in getting support.automation.siemens.com/ familiar with the programming principles. WW/view/en/18653496)
  • Page 137: Index

    Index Character delay time (CDT), 19 Character frame, 18, 60, 66 Code Transparency, 26 Commissioning the physical interface, 50 3964 procedure Communication protocols Receive buffer, 45 Parameter assignment, 56 3964 procedure programmable, 64 Communication via Function Blocks, 73 3964 procedure with default values, 64 Configuration data, 57 3964(R) procedure 3964(R) procedure, 63...
  • Page 138 Index Display elements (LEDs), 15, 95 Hardware Components, 12 EN/ENO Mechanism, 88 Indicator for end of receive message frame, 59 End criterion, 24, 26 Indirect parameter assignment, 85 End-of-text character, 27 Example, 86 Expiration of the character delay time, 26 Initial state of receive line, 62, 67 Fixed message frame length, 29 Initialization, 91...
  • Page 139 Index Operating mode transitions, 92 Order number, 55 Order Number, 133 SEND_440, 74 SEND_440 FB, 76 Assignment in the Data Area, 78 Parameter assignment, 56, 92 Error display, 77 direct, 85 Parameters, 78 indirect, 85 Time sequence chart, 79 of data words, 86 Sender line drivers, 93 Parameter assignment interface, 13 Sending Data...
  • Page 140 Index Uses of the CP 440, 11 Weight, 117 X27 (RS 422/485) interface, 127 Technical specifications, 118 X27 interface Definition, 16 Properties, 16 XOFF code, 61 XON code, 61 XON/XOFF, 61 Point-to-point connection CP 440 Installation and Parameter Assignment Equipment Manual, 03/2022, A5E00057742-AE...

Table of Contents