Siemens Simatic S7-300 CP 341 User Manual

Point-to-point communication, installation and parameter assignment
Table of Contents

Advertisement

SIMATIC
S7-300
CP 341 Point-to-Point
Communication, Installation and
Parameter Assignment
Manual
09/2008
A5E02191071-01
www.gkbpx.com
Preface
Product Description
Basic Principles of Serial
Data Transmission
Commissioning the CP 341
Mounting the CP 341
Configuring and Parameter
Assignment the CP 341
Communication via Function
Blocks
Start-up Characteristics and
Operating Mode Transitions
of the CP 341
Diagnostics with the CP 341
Programming Example for
Standard Function Blocks
Technical Specifications
Connecting cables
Accessories and order
numbers
Literature on SIMATIC S7
该文档是极速PDF编辑器生成,
如果想去掉该提示,请访问并下载:
http://www.jisupdfeditor.com/
1
2
3
4
5
6
7
8
9
A
B
C
D

Advertisement

Table of Contents
loading

Summary of Contents for Siemens Simatic S7-300 CP 341

  • Page 1 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Preface Product Description Basic Principles of Serial Data Transmission SIMATIC Commissioning the CP 341 S7-300 CP 341 Point-to-Point Mounting the CP 341 Communication, Installation and Configuring and Parameter Parameter Assignment Assignment the CP 341 Manual Communication via Function Blocks Start-up Characteristics and Operating Mode Transitions...
  • 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

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Preface Purpose of this manual The information in this manual enables you to set up and commission a point-to-point connection. Contents of the manual The manual describes the hardware and software of the CP 341 communication processor and its integration in an S7-300 programmable controller.
  • Page 4: Changes Since Edition

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Preface Changes Since Edition 04/2000 In contrast with edition 04/2000 of this manual, this edition describes the additional functions of the CP 341 (as of order number 6ES7341-1_H02-0AE0). ● Baud-rate range extended to 115.2 kbaud ● Increase of maximum message frame length to 4 kbyte ●...
  • Page 5 Phone: +49 (91 31) 7-3 36 98 Fax: +49 (91 31) 7-2 66 43 This Siemens department offers individual consultation for a comprehensive and flexible recycling and disposal system at a fixed price. Following disposal, you will receive information giving you a breakdown of the relevant material fractions and the associated material verification papers.
  • Page 6 Preface Additional support If you have any unanswered questions regarding use of the products described in this manual, please contact your local Siemens representative. ● You can locate your contact partner on this Internet URL: http://www.siemens.com/automation/partner ● The portal to our technical documentation for the various SIMATIC products and systems is available at: http://www.siemens.com/simatic-tech-doku-portal...
  • Page 7 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Preface There you will find: ● The newsletter, which constantly provides you with up-to-date information on your products ● Relevant documentation for your application, which you can access via the search function in Product Support ● the bulletin board, a worldwide knowledge exchange for users and experts. ●...
  • Page 8 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/...
  • Page 9: Table Of Contents

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Table of contents Preface ................................ 3 Product Description ..........................17 Possible applications for the CP 341 ..................17 Design of the CP 341........................20 Components for a Point-to-Point Connection with the CP 341...........22 1.3.1 Required Hardware Components .
  • Page 10 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Table of contents Commissioning the CP 341 ........................109 Mounting the CP 341 ..........................111 CP 341 slots..........................111 Mounting and Dismounting the CP 341 ................... 112 4.2.1 Installation steps ........................112 4.2.2 Removal steps .........................
  • Page 11 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Table of contents Start-up Characteristics and Operating Mode Transitions of the CP 341..........181 Operating Modes of the CP 341 ....................181 Startup Characteristics of the CP 341 ..................182 Behavior of the CP 341 on Operating Mode Transitions of the CPU ........184 Diagnostics with the CP 341 .
  • Page 12 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Table of contents Tables Table 1- 1 CP 341 module variants......................17 Table 1- 2 Functions of CP 341 module variants ..................18 Table 1- 3 Hardware components for a point-to-point connection .............. 22 Table 1- 4 Software components for a point-to-point connection with the CP 341.
  • Page 13 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Table of contents Table 6- 3 FB P_RCV_RK parameters.......................138 Table 6- 4 FB 8 P_SND_RK parameters for "Send data" request .............144 Table 6- 5 Information in the RK 512 message frame header for "Send data" request......145 Table 6- 6 FB 7 P_RCV_RK parameters for "Receive data"...
  • Page 14 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Table of contents Figures Figure 1-1 Positions of the module elements on the CP 341 communication processor......20 Figure 1-2 Bus connector ..........................21 Figure 2-1 10-bit character frame ........................ 31 Figure 2-2 Character delay time ........................32 Figure 2-3 Position of the supplied protocols of the CP 341 in the reference model .
  • Page 15: Cp 341 Point-To-Point Communication, Installation And Parameter Assignment Manual, 09/2008, A5E02191071-01

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Table of contents Figure 6-2 Time sequence chart of FB 7 P_RCV_RK ................139 Figure 6-3 FB 8 P_SND_RK time sequence chart for "Send data" request..........145 Figure 6-4 Time sequence chart of FB 7 P_RCV_RK for "Receive data" request ........150 Figure 6-5 Time sequence chart of FB 7 P_RCV_RK for "Provide data"...
  • Page 16 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Table of contents CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 17: Product Description

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Description Possible applications for the CP 341 The CP 341 communication processor enables you to exchange data between automation devices or computers by means of a point-to-point connection. Functionality of the CP 341 The CP 341 communication processor provides the following functionality: ●...
  • Page 18: Table 1- 2 Functions Of Cp 341 Module Variants

    ● SIMATIC S5 via the 3964(R) driver or RK 512 with corresponding interface module on S5 side ● Siemens PDA terminals from the ES 2 family via 3964(R) driver ● MOBY I (ASM 420/421, SIM), MOBY L (ASM 520) and ES 030K data acquisition terminal via 3964R driver ●...
  • Page 19 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Description 1.1 Possible applications for the CP 341 The CP 341 can be operated in a PROFINET IO network if ● the corresponding PROFINET IO controller is integrated in the SIMATIC STEP 7 CPU, ● FB7 (P_RCV_RK) / FB8 (P_SND_RK) - blocks with versions higher than or equal to V3.0 are used.
  • Page 20: Design Of The Cp 341

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Description 1.2 Design of the CP 341 Design of the CP 341 The CP 341 communication processor is supplied with an integrated serial interface. Positions of the module elements The diagram shows the arrangement of the module elements on the front panel of the CP 341 communication processor.
  • Page 21: Figure 1-2 Bus Connector

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Description 1.2 Design of the CP 341 Integrated interface The CP 341 is available in three variants with different interface types: ● RS 232C ● X27 (RS 422/485) ● 20-mA-TTY The interface type is indicated on the front of the CP 341. A detailed interface description can be found in Section "Subsequent Loading of Firmware Updates (Page 123)".
  • Page 22: Components For A Point-To-Point Connection With The Cp 341

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Description 1.3 Components for a Point-to-Point Connection with the CP 341 Components for a Point-to-Point Connection with the CP 341 To establish a point-to-point connection between the communication processor and a communication partner, you require certain hardware and software components. 1.3.1 Required Hardware Components Hardware components...
  • Page 23: Required Software Components

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Description 1.3 Components for a Point-to-Point Connection with the CP 341 1.3.2 Required Software Components Software components The following table lists the software components required for establishing a point-to-point connection with the CP 341. Table 1- 4 Software components for a point-to-point connection with the CP 341 Component Function...
  • Page 24: Properties Of The Serial Interface

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Description 1.4 Properties of the Serial Interface Properties of the Serial Interface Three module variants of the communication processor are available, each having a different interface type that is suitable for different communication partners. The interfaces of the module variants are described in the following sections. 1.4.1 RS 232C Interface of the CP 341-RS 232C Definition...
  • Page 25: 20Ma-Tty Interface Of The Cp 341-20Ma Tty

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Description 1.4 Properties of the Serial Interface RS 232C signals The following table shows the meanings of the RS232C accompanying signals. Table 1- 5 RS 232C interface signals Signal Designation Meaning Transmitted Data Transmitted data; Transmission line is held by CP 341 on logic "1" in idle state. Received Data Received data;...
  • Page 26: X27 (Rs 422/485) Interface Of The Cp 341-Rs 422/485

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Description 1.4 Properties of the Serial Interface 1.4.3 X27 (RS 422/485) Interface of the CP 341-RS 422/485 Definition The X27 (RS 422/485) interface is a differential voltage interface for serial data transmission in compliance with the X27 standard. Properties The X27 (RS 422/485) interface has the following properties and meets following requirements:...
  • Page 27: Cables For Connecting The Communication Processor To A Communication Partner

    Cables for Connecting the Communication Processor to a Communication Partner Standard Cables Siemens offers standard cables in various lengths for point-to-point connection between the communication processor and a communication partner. Fabricating Your Own Cables If you are fabricating your own cables, there are a few points to take into consideration: Refer to section "Connecting cables (Page 221)"...
  • Page 28 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Description 1.5 Cables for Connecting the Communication Processor to a Communication Partner CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 29: Basic Principles Of Serial Data Transmission

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission Serial Transmission of a Character 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.
  • Page 30 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.1 Serial Transmission of a Character Bidirectional data traffic - operating modes The communication processor has two operating modes for bidirectional data traffic: ● Half-duplex mode (3964(R) procedure, ASCII driver, RK 512) Data is exchanged between one or more communication partners in both directions alternately.
  • Page 31: Figure 2-1 10-Bit Character Frame

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.1 Serial Transmission of a Character Character frame Data is transmitted between the the CP 341 and a communication partner via the serial interface in a character frame. Three data formats are available for each character frame. You can assign the desired format for data transmission in the CP 341: Point-to-Point Communication, Parameter Assignment parameter assignment interface.
  • Page 32: Figure 2-2 Character Delay Time

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.1 Serial Transmission of a Character 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. Figure 2-2 Character delay time CP 341 Point-to-Point Communication, Installation and Parameter Assignment...
  • Page 33: Transmission Procedure With A Point-To-Point Connection

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.2 Transmission Procedure with a Point-to-Point Connection Transmission Procedure with a Point-to-Point Connection When data is transmitted, all communication partners must adhere to a fixed set of rules for handling and implementing data traffic. ISO has defined a 7-layer model, which is recognized as the basis for a worldwide standardization of transmission protocols.
  • Page 34 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.2 Transmission Procedure with a Point-to-Point Connection ISO 7-layer reference model The reference model defines the external behavior of the communication partners. Each protocol layer, except for the lowest one, is embedded in the next one down. The individual layers are defined as follows: 1.
  • Page 35: Transmission Integrity

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.3 Transmission integrity Transmission integrity Transmission integrity plays an important role in the transmission of data and in selection of the transmission procedure. Generally speaking, the more layers of the reference model are applied, the greater the transmission integrity.
  • Page 36 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.3 Transmission integrity Transmission Integrity with the Printer Driver Data integrity when using the printer driver: ● No data integrity precautions are taken for data transport with the printer driver. ●...
  • Page 37 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.3 Transmission integrity Performance limits with 3964R ● Further processing of the send/receive data by the PLC program in the communication partner is not guaranteed. You can only ensure this by using a programmable acknowledgment mechanism.
  • Page 38: Data Transmission With The 3964(R) Procedure

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.4 Data Transmission with the 3964(R) Procedure Data Transmission with the 3964(R) Procedure 2.4.1 Principle of the Data Transmission with the 3964(R) Procedure The 3964(R) procedure controls the data transmission in a point-to-point connection between the communication processor and a communication partner.
  • Page 39: Block Checksum

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.4 Data Transmission with the 3964(R) Procedure 2.4.3 Block Checksum Block Checksum With the 3964R transmission protocol, data integrity is increased by the additional sending of a block check character (BCC). Figure 2-4 Block Checksum The block checksum is the even longitudinal parity (EXOR operation on all data bytes) of a...
  • Page 40: Sending Data With 3964(R)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.4 Data Transmission with the 3964(R) Procedure 2.4.4 Sending Data with 3964(R) Sending data with 3964(R) The figure below illustrates the transmission sequence when data is sent with the 3964(R) procedure.
  • Page 41 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.4 Data Transmission with the 3964(R) Procedure Connection release for sending Once the contents of the buffer have been sent, the procedure adds the DLE and ETX characters and, with 3964R only, the block checksum BCC as the end identifier, and waits for an acknowledgment character.
  • Page 42: Receiving Data With 3964(R)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.4 Data Transmission with the 3964(R) Procedure 2.4.5 Receiving Data with 3964(R) Receiving data with 3964(R) The figure below illustrates the transmission sequence when data is received with the 3964(R) procedure. Figure 2-6 Data traffic when receiving with the 3964(R) procedure Note...
  • Page 43 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.4 Data Transmission with the 3964(R) Procedure Receiving data After a successful connection setup, the receive characters that arrive are stored in the receive buffer. If two consecutive DLE characters are received, only one of these is stored in the receive buffer.
  • Page 44: Handling Erroneous Data

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.4 Data Transmission with the 3964(R) Procedure 2.4.6 Handling Erroneous Data Handling erroneous data The figure below illustrates how erroneous data is handled with the 3964(R) procedure. Figure 2-7 Data traffic when erroneous data is received After receipt of DLE, ETX, BCC, the CP 341 compares the BCC of the communication partner with its own internally calculated value.
  • Page 45: Figure 2-8 Data Traffic In The Event Of An Initialization Conflict

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.4 Data Transmission with the 3964(R) Procedure Initialization conflict The figure below illustrates the data transmission sequence during an initialization conflict. Figure 2-8 Data traffic in the event of an initialization conflict If a device responds to the communication partner's send request (STX) within the acknowledgment delay time by sending the STX character instead of the DLE or NAK acknowledgment, an initialization conflict occurs.
  • Page 46: Figure 2-9 Flow Diagram Of The Start-Up Of The 3964(R) Procedure

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.4 Data Transmission with the 3964(R) Procedure Procedure errors The procedure recognizes both errors caused by faulty communication partner behavior and errors caused by faults on the line. In both cases, the procedure initially attempts to send/receive the data block correctly. If the data block cannot be sent or received error-free within the maximum specified number of transmission attempts (or if a new error status occurs), the procedure cancels the send or receive operation.
  • Page 47: Figure 2-10 Flow Diagram Of Sending With The 3964(R) Procedure

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.4 Data Transmission with the 3964(R) Procedure Sending with the 3964(R) procedure The figure below illustrates sending with the 3964(R) procedure. Figure 2-10 Flow Diagram of Sending with the 3964(R) Procedure CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 48: Figure 2-11 Flow Diagram For Receiving With The 3964(R) Procedure (Part 1)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.4 Data Transmission with the 3964(R) Procedure Receiving with 3964(R) procedure (Part 1) The figure below illustrates receiving with the 3964(R) procedure. Figure 2-11 Flow Diagram for Receiving with the 3964(R) Procedure (Part 1) CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 49: Figure 2-12 Flow Diagram For Receiving With The 3964(R) Procedure (Part 2)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.4 Data Transmission with the 3964(R) Procedure Receiving with 3964(R) procedure (Part 2) The figure below illustrates receiving with the 3964(R) procedure. Figure 2-12 Flow diagram for receiving with the 3964(R) procedure (Part 2) CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 50: Data Transmission With The Rk 512 Computer Connection

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.5 Data Transmission with the RK 512 Computer Connection Data Transmission with the RK 512 Computer Connection The RK 512 computer link controls data transmission in the case of a point-to-point connection between the CP 341 and a communication partner.
  • Page 51: Table 2- 1 Structure Of Command Message Frame Header (Rk 512)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.5 Data Transmission with the RK 512 Computer Connection Structure of the message frame header The table below indicates the structure of the header of the command message frame. Table 2- 1 Structure of command message frame header (RK 512) Byte Meaning...
  • Page 52: Table 2- 2 Monitoring Time Dependent On Transmission Rate For Response Message Frame

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.5 Data Transmission with the RK 512 Computer Connection Response message frame Once the command message frame has been transmitted, the RK 512 waits for a response message frame from the communication partner within the monitoring time. The duration of the monitoring time depends by default on the transmission rate 20 s.
  • Page 53: Sending Data With Rk 512

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.5 Data Transmission with the RK 512 Computer Connection 2.5.1 Sending Data with RK 512 Sending data with RK 512 The figure below shows the transmission sequence when sending data with a response message frame using the RK 512 computer link.
  • Page 54 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.5 Data Transmission with the RK 512 Computer Connection Sending data The SEND request is executed in the following sequence: ● Active partner Sends a SEND message frame. This contains the message frame header and data. ●...
  • Page 55: Figure 2-14 Sequence Of A Continuation Send Message Frame With A Continuation Response Message Frame

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.5 Data Transmission with the RK 512 Computer Connection Continuation SEND message frames A continuation SEND message frame is started if the volume of data exceeds 128 bytes. The sequence is the same as for the SEND message frame. If more than 128 bytes are sent, the extra bytes are automatically transmitted in one or more continuation message frames.
  • Page 56: Fetching Data With Rk 512

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.5 Data Transmission with the RK 512 Computer Connection 2.5.2 Fetching Data with RK 512 Fetching data with RK 512 The figure below shows the transmission process when fetching data with a response message frame using the RK 512 computer link.
  • Page 57 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.5 Data Transmission with the RK 512 Computer Connection Fetching data The FETCH request is executed in the following sequence: ● Active partner Sends a FETCH message frame. This contains the message frame header. ●...
  • Page 58: Figure 2-16 Sequence Of A Continuation Fetch Message Frame With A Continuation Response Message Frame

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.5 Data Transmission with the RK 512 Computer Connection Continuation FETCH message frame The figure below shows the transmission sequence when fetching data with a continuation response message frame. Figure 2-16 Sequence of a continuation FETCH message frame with a continuation response message frame CP 341 Point-to-Point Communication, Installation and Parameter Assignment...
  • Page 59: Quasi-Full-Duplex Operation

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.5 Data Transmission with the RK 512 Computer Connection 2.5.3 Quasi-Full-Duplex Operation Quasi-full-duplex mode Quasi full-duplex mode means: The partners can send command and response message frames at any time as long as the other partner is not sending. The maximum nesting depth for command and response message frames is "1".
  • Page 60: Rk 512 Cpu Requests

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.5 Data Transmission with the RK 512 Computer Connection 2.5.4 RK 512 CPU Requests Processes involved in the RK 512 when CPU requests are made The figure below shows the processes involved in the RK 512 computer connection when CPU requests are made.
  • Page 61: Figure 2-19 Flow Diagram Of Data Transmission With The Rk 512 When Partner Requests Are Made

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.5 Data Transmission with the RK 512 Computer Connection RK 512 Partner Requests The figure below shows the processes involved in the RK 512 computer connection when partner requests are made. Figure 2-19 Flow diagram of data transmission with the RK 512 when partner requests are made Extended error display at the receive FB...
  • Page 62: Data Transmission With The Ascii Driver

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.6 Data Transmission with the ASCII Driver Data Transmission with the ASCII Driver 2.6.1 Principle of the Data Transmission with the ASCII Driver The ASCII driver controls data transmission via a point-to-point connection between the communication processor and a communication partner.
  • Page 63: Figure 2-20 Flowchart Of A Send Operation

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.6 Data Transmission with the ASCII Driver If you are working with the "Fixed message frame length" end criterion, the amount of data transferred in the send direction is as specified in the "LEN" parameter of the FB P_SND_RK.
  • Page 64: Receiving Data With The Ascii Driver

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.6 Data Transmission with the ASCII Driver 2.6.3 Receiving data with the ASCII driver Receiving data with ASCII driver For data transmission using the ASCII driver you can choose between three different end criteria for data receipt.
  • Page 65: Figure 2-21 Flow Diagram For Receiving With End Criterion "Expiration Of Character Delay Time

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.6 Data Transmission with the ASCII Driver End criterion "Expiration of character delay time" When data is received, the end of the message frame is recognized when the character delay time expires. The received data is accepted by the CPU. In this case the character delay time must be set such that it is certain to expire between two consecutive message frames.
  • Page 66 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.6 Data Transmission with the ASCII Driver End criterion end-of-text character When receiving data, the end of the message frame is recognized when the assigned end- of-text character(s) are received. The received data including the endoftext character(s) are accepted from the CPU.
  • Page 67: Figure 2-22 Flow Diagram For Receiving With End Criterion "End-Of-Text Character

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.6 Data Transmission with the ASCII Driver The figure below illustrates a receive operation with the end criterion "Endoftext character". Figure 2-22 Flow diagram for receiving with end criterion "End-of-text character" CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 68 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.6 Data Transmission with the ASCII Driver Fixed message frame length end criterion When receiving data, the end of the message frame is recognized when the assigned number of characters have been received. The received data is accepted by the CPU. If the character delay time expires before the assigned number of characters has been reached, the receive operation is ended.
  • Page 69: Figure 2-23 Flow Diagram For Receiving With End Criterion "Fixed Message Frame Length

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.6 Data Transmission with the ASCII Driver The figure below illustrates a receive operation with the end criterion "Fixed message frame length". Figure 2-23 Flow diagram for receiving with end criterion "Fixed message frame length" CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 70 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.6 Data Transmission with the ASCII Driver Receive buffer on CP 341 The CP 341 receive buffer accommodates 4096 bytes. During parameter assignment, you can specify whether overwriting of data in the receive buffer is to be prevented. You can also specify the range of values (1 to 250) for the number of buffered receive message frames.
  • Page 71: Rs 485 Mode

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.6 Data Transmission with the ASCII Driver 2.6.4 RS 485 mode RS 485 mode When you run the ASCII driver in RS 485 mode (half-duplex, two-wire mode), you must take steps in the user program to ensure that only one station sends data at any one time.
  • Page 72 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.6 Data Transmission with the ASCII Driver Automatic control of accompanying signals Automatic control of the RS 232C accompanying signals is implemented on the CP 341 as follows: ● As soon as the CP 341 is assigned for operation in a mode with automatic control of the RS 232C accompanying signals, it sets the RTS line to OFF and the DTR line to ON (CP 341 ready for operation).
  • Page 73: Figure 2-24 Timing Diagram Of Automatic Control Of The Rs 232C Accompanying Signals

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.6 Data Transmission with the ASCII Driver Timing diagram The figure illustrates the chronological sequence of a send request. Figure 2-24 Timing diagram of automatic control of the RS 232C accompanying signals CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 74 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.6 Data Transmission with the ASCII Driver Data flow control/Handshaking Handshaking controls the data flow between two communication partners. Handshaking ensures that data is not lost in transmissions between devices that work at different speeds. There are essentially two types of handshaking: ●...
  • Page 75: Data Transmission With The Printer Driver

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.7 Data transmission with the printer driver Data transmission with the printer driver Introduction The printer driver allows you to output date- and time-stamped message texts to a printer. This enables you to monitor simple processes, print error or fault messages, or issue instructions to operating personnel, for example.
  • Page 76 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.7 Data transmission with the printer driver Format string The format string allows you to define the display type and composition of a message text. The format string can consist of: ●...
  • Page 77: Figure 2-25 Flow Chart Of Printout

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.7 Data transmission with the printer driver Printout To output n bytes of user data to a printer, specify the block number of a pointer DB when calling the P_PRINT function block. The pointers to the data blocks are stored in the pointer DB together with the format string and the variables and in a specific order.
  • Page 78 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.7 Data transmission with the printer driver Data flow control/Handshaking Handshaking controls the data flow between two communication partners. Handshaking ensures that data is not lost in transmissions between devices that work at different speeds. You can also send message texts with data flow control during printout.
  • Page 79: Configuration Data

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Configuration data By selecting different protocols, you can adjust your CP 341 communication processor to suit the properties of the communication partner. The sections that follow describe the parameter assignment data for the 3964(R) procedure, RK 512 computer link, ASCII driver, and printer driver.
  • Page 80: Table 2- 4 3964(R) Protocol

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Protocol The table below describes the protocol. Table 2- 4 3964(R) protocol Parameters Description Default value Default values are assigned to the protocol parameters. 3964 with default •...
  • Page 81: Table 2- 5 Protocol Parameters (3964(R) Procedure)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Protocol parameters You can only assign the protocol parameters if you have not specified the default values for the protocol. Table 2- 5 Protocol parameters (3964(R) procedure) Parameters Description Range of values...
  • Page 82: Table 2- 6 Baud Rate/Character Frame (3964(R) Procedure)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Baud rate/Character frame The table below describes the baud rate/character frame. Table 2- 6 Baud rate/Character frame (3964(R) procedure) Parameters Description Range of values Default value Baud rate Data transmission rate in bps (baud) •...
  • Page 83: Table 2- 7 Receive Buffer On Cp (3964(R) Procedure)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Extended error display at the receive FB Table 2- 7 Receive Buffer on CP (3964(R) Procedure) Parameters Description Range of Default value values Extended error display at the Activate the parameter "Display receive error at FB"...
  • Page 84: Figure 2-26 Wiring Of The Receiver At The X27 (Rs 422) Interface (3964(R) Procedure)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Receive line initial state The figure illustrates the wiring of the receiver at the X27 (RS 422) interface: Figure 2-26 Wiring of the receiver at the X27 (RS 422) interface (3964(R) procedure) CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 85: Configuration Data Of The Rk 512 Computer Connection

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data 2.8.2 Configuration Data of the RK 512 Computer Connection You can use the parameter assignment data of the RK 512 computer link to adjust the CP 341 to suit the properties of the communication partner. Parameter Assignment Data of the RK 512 Computer Link The parameters are identical to those of the 3964(R) procedure because the 3964(R) procedure is a subset of the RK 512 computer link in the ISO 7-layer reference model (see...
  • Page 86: Table 2- 10 Receive Buffer On Cp (3964(R) Procedure)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Extended error display at the receive FB Table 2- 10 Receive Buffer on CP (3964(R) Procedure) Parameters Description Range of Default value values Extended error display at the receive Activate the parameter "Display receive error at •...
  • Page 87: Configuration Data Of The Ascii Driver

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data 2.8.3 Configuration data of the ASCII Driver Using the parameter assignment data of the ASCII driver, you can adjust the communication processor to suit the properties of the communication partner. Parameter assignment data of the ASCII driver With the CP 341: Point-to-Point Communication, Parameter Assignment parameter assignment interface, you specify the parameters for the physical layer (layer 1) of the ASCII...
  • Page 88: Table 2- 11 Protocol Parameters (Ascii Driver)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Protocol parameters The table below describes the protocol parameters. Table 2- 11 Protocol Parameters (ASCII Driver) Parameters Description Range of values Default value After expiration of the Indicator for end of Defines which criterion signals the •...
  • Page 89: Table 2- 12 Baud Rate/Character Frame (Ascii Driver)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Baud rate/Character frame The table below contains descriptions of and specifies ranges of values for the relevant parameters. Table 2- 12 Baud rate/Character frame (ASCII driver) Parameters Description Range of values Default value...
  • Page 90: Table 2- 13 Data Flow Control (Ascii Driver)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Data flow control The table below contains a description of the parameters for data flow control. Data flow control is not possible with the RS 485 interface. Data flow control with "RTS/CTS" and "automatic operation of V24 signals"...
  • Page 91: Table 2- 14 Receive Buffer On Cp (Ascii Driver)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Receive buffer on CP The table below describes the parameters for the CP receive buffer. Table 2- 14 Receive buffer on CP (ASCII driver) Parameters Description Range of values Default value Delete CP receive You can specify whether the CP receive buffer...
  • Page 92: Table 2- 15 X27 (Rs 422/485) Interface (Ascii Driver)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data X27 (RS 422/485) interface You will find a description of the parameters for the X27 (RS 422/485) interface in the table below. Table 2- 15 X27 (RS 422/485) interface (ASCII driver) Parameters Description Range of values...
  • Page 93: Figure 2-27 Wiring Of The Receiver At The X27 (Rs 422/485) Interface (Ascii Driver)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Receive line initial state The figure illustrates the wiring of the receiver at the X27 (RS 422/485) interface: Figure 2-27 Wiring of the receiver at the X27 (RS 422/485) interface (ASCII driver) CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 94: Parameter Assignment Data Of The Printer Driver

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data 2.8.4 Parameter assignment data of the printer driver Introduction You can use the parameter assignment data of the printer driver to generate the transmission-specific parameters and the message texts for printout. Parameter assignment data of the printer driver With the CP 341: Point-to-Point Communication, Parameter Assignment parameter assignment interface, you can specify:...
  • Page 95: Table 2- 17 Data Flow Control (Printer Driver)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Data flow control The table below contains a description of the parameters for data flow control. Data flow control is not possible with the RS 485 interface. RTS/CTS data flow control is only supported with the RS 232C interface.
  • Page 96: Table 2- 19 Page Layout (Printer Driver)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Page layout The table below contains a description of the parameters for the page layout. Table 2- 19 Page layout (printer driver) Parameters Description Range of values Default value Left margin (number of Number of spaces to...
  • Page 97: Table 2- 20 Character Set (Printer Driver)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Character set The table below contains a description of the parameters for the character set. Table 2- 20 Character set (printer driver) Parameters Description Range of values Default value Printer character set Set "IBM"...
  • Page 98: Table 2- 22 Message Texts (Printer Driver)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Message texts The table below contains a description of the parameters for configuring message texts (using the CP 341: Point-to-Point Communication, Parameter Assignment parameter assignment interface). Table 2- 22 Message texts (printer driver) Parameters Description...
  • Page 99: Conversion And Control Statements For Printout

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data 2.8.5 Conversion and control statements for printout Introduction The output of a message text with variables and control statements (e.g., for bold, condensed, expanded, or italic type and underlining) is defined by means of a format string. In the format string you can also define statements to execute other useful functions for printout (e.g., to set a page number or start a new page).
  • Page 100: Figure 2-29 Schematic Structure Of A Conversion Statement

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Conversion statement The figure illustrates the structure of a conversion statement schematically. Figure 2-29 Schematic structure of a conversion statement Flag None = Right-justified output – = Left-justified output Width None = Output in the default display = Exactly n characters are output (up to 255 characters are possible);...
  • Page 101: Table 2- 23 Display Types In The Conversion Statement

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Display type The table below describes the possible display types for the values of the variables. Display types N and P are exceptions and are explained below the table. The display type supports both uppercase and lowercase letters.
  • Page 102 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Output by means of message text number (%N) Use the N display type to start printing message texts stored on the CP 341. The conversion statement variable contains the number of the message text. Example: The pressure in the chamber "is falling"...
  • Page 103 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Notes about conversion statements Please note the following in relation to conversion statements: ● Whenever a maximum length is specified for the default display, the actual output can also be shorter.
  • Page 104 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Examples of invalid conversion statements Below are several examples of invalid conversion statements. Example 1: ******.2R Format string = %303.2R Variable 1 = 1.2345E6 Error: Invalid width in the R display type. The maximum permissible value for all display types is 255.
  • Page 105 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Examples of correct conversion statements Below are some examples of correct conversion statements. Example 1: ..31.10.1996 Format string = %15.4A Variable 1 = D#1996–10–31 A width of 15 with a precision of 4 (width of the year) and right-justified formatting were selected.
  • Page 106: Figure 2-30 Schematic Structure Of Control Statements

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Control statements Control statements are used to achieve specific results in the printout (e.g., underlining). In addition to the standard control statements (for bold, condensed, expanded, or italic type and underlining), you can also use other control characters if you enter them in the control character table on the CP 341: Point-to-Point Communication, Parameter Assignment parameter assignment interface prior to assigning parameters to CP 341.
  • Page 107 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data Starting a new page (\F) Taking into account the assigned page layout, i.e. the configured headers and footers and the number of lines per page, the \F control statement can be used to begin a new page. This differs from a pure form feed on the printer.
  • Page 108 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Basic Principles of Serial Data Transmission 2.8 Configuration data CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 109: Commissioning The Cp 341

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Commissioning the CP 341 To commission the communication processor, you will need to perform the following operations in the order given: 1. Mounting the CP 341 2. Configuring the CP 341 3. Assigning Parameters to the CP 341 4.
  • Page 110 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Commissioning the CP 341 Creating a User Program for the CP 341 Programming of the CP 341 involves the program interface of the CP 341 to the associated CPU using the STEP 7 user program. You program the CP 341 using the language editors of the STEP 7 software.
  • Page 111: Mounting The Cp 341

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Mounting the CP 341 CP 341 slots The following section describes the rules you must observe when positioning the CP 341 in the rack (mounting rail). Position of the CP 341 in the rack (mounting rail) The following rules apply when positioning the CP 341 in the rack (mounting rail): ●...
  • Page 112: Mounting And Dismounting The Cp 341

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Mounting the CP 341 4.2 Mounting and Dismounting the CP 341 Mounting and Dismounting the CP 341 When installing and removing the CP 341, you must observe certain rules. Tool For installing and removing the CP 341, you require a 4.5 mm cylindrical screwdriver. 24 V DC load power supply The CP 341 has an external 24 V DC load power supply.
  • Page 113: Removal Steps

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Mounting the CP 341 4.2 Mounting and Dismounting the CP 341 Connection terminals Figure 4-1 Connection terminal ● Connect the positive cable of the 24 V supply to terminal L+. ● Connect the negative cable of the 24 V supply to terminal M. ●...
  • Page 114 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Mounting the CP 341 4.2 Mounting and Dismounting the CP 341 CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 115: Configuring And Parameter Assignment The Cp 341

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Configuring and Parameter Assignment the CP 341 Parameter Assignment Options Configuration options You configure and assign the module variants of the CP 341 using STEP 7 or the CP 341: Point-to-Point Communication, Parameter Assignment parameter assignment interface. Table 5- 1 Configuration options for the CP 341 Product...
  • Page 116: Installing The Programming Interface

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Configuring and Parameter Assignment the CP 341 5.2 Installing the Programming Interface Installing the Programming Interface Installation The CP 341: Point-to-Point Communication, Parameter Assignment parameter assignment interface is located on the CD along with the function blocks and programming example. To install the parameter assignment interface: 1.
  • Page 117: Configuring The Cp 341

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Configuring and Parameter Assignment the CP 341 5.3 Configuring the CP 341 Configuring the CP 341 Once you have mounted the CP 341 you must inform the programmable controller that it is there. This process is known as "configuring". Requirements The CP 341:Point-to-Point Communication, Parameter Assignment: parameter assignment interface is installed in the STEP 7 software on your programming device or PC (see section...
  • Page 118: Assigning Parameters To The Communications Protocols

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Configuring and Parameter Assignment the CP 341 5.4 Assigning Parameters to the Communications Protocols Assigning Parameters to the Communications Protocols You must parameterize the CP 341 and its serial interface after having entered the CP 341 in the configuration table.
  • Page 119: Identification Data

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Configuring and Parameter Assignment the CP 341 5.5 Identification data Identification data Definition Identification data represent information stored on the module and support you in: ● Troubleshooting a plant ● Verifying your plant configuration ● Locating hardware modifications in a plant This ID data allows the unambiguous identification of modules in online mode.
  • Page 120: Table 5- 4 Identification Data Of The Cp 341 Module

    Manufacturer Read 00 2A hex (= 42 dec) The name of the manufacturer is saved to (2 bytes) this parameter (42 dec = Siemens AG). Device name Read 6ES7341–1xH02–0AE0 Order number of the module (20 bytes) x = A(RS232), B(TTY), C(RS422/485)
  • Page 121: Managing The Parameter Data

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Configuring and Parameter Assignment the CP 341 5.6 Managing the Parameter Data Managing the Parameter Data The configuration and parameter assignment data of the communication processor is saved in the current project (on the hard disk of the programming device/PC). Data management When you exit the configuration table by selecting the Station >...
  • Page 122: Subsequent Loading Of Drivers (Transmission Protocols)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Configuring and Parameter Assignment the CP 341 5.7 Subsequent Loading of Drivers (Transmission Protocols) Subsequent Loading of Drivers (Transmission Protocols) To extend the functionality of the CP 341 and adapt it to the communication partner, you can load other transmission protocols onto the CP 341 (loadable drivers) in addition to the standard protocols in the module firmware (ASCII, 3964(R), RK 512).
  • Page 123: Firmware Updates

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Configuring and Parameter Assignment the CP 341 5.8 Firmware updates Firmware updates 5.8.1 Subsequent Loading of Firmware Updates You can download the firmware update to the operating system memory of the CP 341 in order to expand its functionality and for error handling. Requirements The requirements for loading firmware updates are as follows: ●...
  • Page 124 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Configuring and Parameter Assignment the CP 341 5.8 Firmware updates Loading firmware with the CP 341 parameter assignment interface (valid for order numbers 6ES7341-1_H00-0AE0 and 6ES7341-1_H01-0AE0) The firmware is transferred to the CP 341 using the CP 341:Point-to-Point Communication, Parameter Assignment parameter assignment interface (as of V5.0).
  • Page 125: Table 5- 5 Led Indicators For Firmware Update

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Configuring and Parameter Assignment the CP 341 5.8 Firmware updates LED indicators LED indicators when loading a firmware update: Table 5- 5 LED indicators for firmware update Status Comment Remedy Firmware update in progress Firmware update completed CP 341 without module Flashing Module firmware...
  • Page 126: Viewing The Firmware Version

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Configuring and Parameter Assignment the CP 341 5.8 Firmware updates 5.8.2 Viewing the Firmware Version Viewing the hardware and firmware version You can view the current hardware and firmware version on the CP 341 in STEP 7 in the "Module Information"...
  • Page 127: Communication Via Function Blocks

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks Communication between the CPU, the CP 341 and a communication partner takes place via the function blocks and the protocols of the CP 341. Communication between CPU and CP 341 The function blocks form the software interface between the CPU and the CP 341. They must be called in cycles from the user program.
  • Page 128: Overview Of The Function Blocks

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.1 Overview of the Function Blocks Overview of the Function Blocks The S7-300 programmable controller provides you with a number of function blocks which initiate and control communication between the CPU and the CP 341 in the user program. Function blocks/functions The table below lists the function blocks/functions of the CP 341 and describes their purpose.
  • Page 129 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.1 Overview of the Function Blocks Permissible versions of the FBs and FCs Note the following regarding permissible function blocks and functions: WARNING For the CP 341, you can use only the FC 5 V24_STAT and FC 6 V24_SET functions with version ≥...
  • Page 130: Using Function Blocks

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.2 Using function blocks Using function blocks The following sections describe the factors to be considered when assigning parameters for the function blocks. STATUS Indicator on the FB Note the following regarding the STATUS indicator on the function blocks: Note The DONE, NDR, ERROR, and STATUS parameters are valid for only one block cycle.
  • Page 131: Using The Function Blocks With The 3964(R) Procedure

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.3 Using the Function Blocks with the 3964(R) Procedure Using the Function Blocks with the 3964(R) Procedure The function blocks available for connection to a communication partner with the 3964(R) procedure are as follows: ●...
  • Page 132: S7 Sends Data To A Communication Partner

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.3 Using the Function Blocks with the 3964(R) Procedure 6.3.1 S7 Sends Data to a Communication Partner The FB P_SND_RK transmits data from a data block, specified by the DB_NO, DBB_NO and LEN parameters, to the CP 341.
  • Page 133 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.3 Using the Function Blocks with the 3964(R) Procedure What is to be done? Block call STL representation LAD representation CALL P_SND_RK, I_P_SND_RK REQ: LADDR: DB_NO: DBB_NO: LEN: R_CPU_NO: R_TYP: R_NO: R_OFFSET: R_CF_BYT R_CF_BIT DONE:...
  • Page 134: Table 6- 2 Fb P_Snd_Rk Parameters

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.3 Using the Function Blocks with the 3964(R) Procedure FB P_SND_RK parameters The table below lists the parameters of the FB P_SND_RK. Note The R_CPU_NO, R_TYP, R_NO, R_OFFSET, R_CF_BYT, and R_CF_BIT parameters are irrelevant for the 3964(R) procedure and do not have to be assigned.
  • Page 135: Figure 6-1 Time Sequence Chart Of Fb 8 P_Snd_Rk

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.3 Using the Function Blocks with the 3964(R) Procedure Time sequence chart of FB P_SND_RK The figure below illustrates the behavior of the DONE and ERROR parameters depending on the input circuit of REQ and R. Figure 6-1 Time sequence chart of FB 8 P_SND_RK Note...
  • Page 136: S7 Receives Data From A Communication Partner

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.3 Using the Function Blocks with the 3964(R) Procedure 6.3.2 S7 receives data from a communication partner The FB P_RCV_RK transmits data from the CP 341 to an S7 data area, specified by the DB_NO, DBB_NO, and LEN parameters.
  • Page 137 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.3 Using the Function Blocks with the 3964(R) Procedure What is to be done? Block call STL representation LAD representation CALL P_RCV_RK, I_RCV_RK EN_R: LADDR: DB_NO: DBB_NO: L_TYP: L_NO: L_OFFSET: L_CF_BYT L_CF_BIT NDR: ERROR: LEN:...
  • Page 138: Table 6- 3 Fb P_Rcv_Rk Parameters

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.3 Using the Function Blocks with the 3964(R) Procedure FB P_RCV_RK parameters The table below lists the parameters of the FB P_RCV_RK. Note The L_TYP, L_NO, L_OFFSET, L_CF_BYT, and L_CF_BIT parameters are irrelevant for the 3964(R) procedure and do not have to be assigned.
  • Page 139 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.3 Using the Function Blocks with the 3964(R) Procedure Time sequence chart of FB P_RCV_RK The figure below illustrates the behavior of the NDR, LEN, and ERROR parameters depending on the input circuit of EN_R and R. Figure 6-2 Time sequence chart of FB 7 P_RCV_RK Note...
  • Page 140: Using The Function Blocks With The Rk 512 Computer Connection

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Using the Function Blocks with the RK 512 Computer Connection The function blocks available for connection to a communication partner with the RK 512 procedure are as follows: ●...
  • Page 141 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Data consistency The block size limits the data consistency for data transmission between the CPU and CP 341 to 32 bytes. If you want consistent data transmission exceeding 32 bytes, you must take the following into account: ●...
  • Page 142: Sending Data With Fb P_Snd_Rk (Active Request)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection 6.4.1 Sending Data with FB P_SND_RK (Active Request) The FB P_SND_RK function block can be used with parameter setting SF = 'S' to transmit data from an S7 data area to a CP 341.
  • Page 143 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Special features for sending data Note the following special features with regard to sending data: ● RK 512 allows only an even-numbered amount of data to be sent. If you specify an odd- numbered amount of data for the length (LEN), an additional filler byte with a value of "0"...
  • Page 144: Table 6- 4 Fb 8 P_Snd_Rk Parameters For "Send Data" Request

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Assignment in the data area The FB P_SND_RK works together with an I_SND_RK instance DB. The DB number is passed on with the call. The instance data block is 62 bytes long. Access to the data in the instance DB is not allowed.
  • Page 145: Table 6- 5 Information In The Rk 512 Message Frame Header For "Send Data" Request

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Information in the message frame header The table below shows the information in the message frame header of the RK 512 message frame.
  • Page 146 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Note The REQ input is edge-triggered. A positive edge at the REQ input is sufficient. The result of the logic operation must not be at "1" at any point during transfer. CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 147: Receiving Data With Fb P_Rcv_Rk (Passive Request)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection 6.4.2 Receiving Data with FB P_RCV_RK (Passive Request) The FB P_RCV_RK transmits data from the CP 341 to an S7 data area. For purposes of data transmission, the FB P_RCV_RK is called cyclically or, alternatively, statically in a time- driven program (without conditions).
  • Page 148 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection What is to be done? Block call STL representation LAD representation CALL P_RCV_RK, I_RCV_RK EN_R: LADDR: DB_NO: DBB_NO: L_TYP: L_NO: L_OFFSET: L_CF_BYT L_CF_BIT NDR:...
  • Page 149: Table 6- 6 Fb 7 P_Rcv_Rk Parameters For "Receive Data" Request

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection FB P_RCV_RK parameters The table below lists the parameters of the FB 7 P_RCV_RK for the "Receive data" request. Table 6- 6 FB 7 P_RCV_RK parameters for "Receive data"...
  • Page 150 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Time sequence chart of FB P_RCV_RK The figure below illustrates the behavior of the NDR, LEN, and ERROR parameters depending on the input circuit of EN_R and R. Figure 6-4 Time sequence chart of FB 7 P_RCV_RK for "Receive data"...
  • Page 151: Readying Data With Fb P_Rcv_Rk (Passive Request)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection 6.4.3 Readying Data with FB P_RCV_RK (Passive Request) The FB P_RCV_RK function block must be called if the communication partner executes a "Fetch data"...
  • Page 152 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Use of interprocessor communication flags Following receipt of the message frame, the interprocessor communication flags specified in the RK 512 message frame header are checked. The data is not provided unless the value of the interprocessor communication flag is "0".
  • Page 153: Table 6- 7 Fb 7 P_Rcv_Rk Parameters For "Provide Data" Request

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Assignment in the data area The FB P_RCV_RK works together with an I_RCV_RK instance DB. The DB number is passed on with the call. The instance data block is 60 bytes long. Access to the data in the instance DB is not allowed.
  • Page 154 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Time sequence chart of FB P_RCV_RK The figure below illustrates the behavior of the NDR, LEN, and ERROR parameters depending on the input circuit of EN_R and R. Figure 6-5 Time sequence chart of FB 7 P_RCV_RK for "Provide data"...
  • Page 155: Fetching Data With P_Snd_Rk Fb (Active Request)

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection 6.4.4 Fetching Data with P_SND_RK FB (Active Request) Principle of operation of the FB P_SND_RK function block The FB P_SND_RK function block can be used with parameter setting SF = F to fetch data from a remote communication partner and place it in an S7 data area of your programmable controller.
  • Page 156 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Special features for (expanded) data blocks Note the following special features with regard to fetching data from data blocks and expanded data blocks: ●...
  • Page 157: Table 6- 8 Fb 8 P_Snd_Rk Parameters For "Fetch Data" Request

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Assignment in the data area The FB P_SND_RK works together with an I_SND_RK instance DB. The DB number is passed on with the call. The instance data block is 62 bytes long. Access to the data in the instance DB is not allowed.
  • Page 158: Table 6- 9 Transmittable Data Types For "Fetch Data" Request

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Parameters in the FB for data source (Partner CPU) The following table lists the data types that can be transmitted. Table 6- 9 Transmittable data types for "Fetch data"...
  • Page 159 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.4 Using the Function Blocks with the RK 512 Computer Connection Time sequence chart of FB P_SND_RK The figure below illustrates the behavior of the DONE and ERROR parameters depending on the input circuit of REQ and R. Figure 6-6 Time sequence chart of FB 8 P_SND_RK for "Fetch data"...
  • Page 160: Using The System Function Blocks With The Ascii Driver

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.5 Using the System Function Blocks with the ASCII Driver Using the System Function Blocks with the ASCII Driver 6.5.1 Function blocks with ASCII driver The same functions can be used for data transmission with the ASCII driver as with the 3964(R) procedure.
  • Page 161: Interface Status Of The Cp 341, Checking

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.5 Using the System Function Blocks with the ASCII Driver 6.5.2 Interface status of the CP 341, checking The FC V24_STAT reads the RS 232C accompanying signals from the CP 341 and makes them available to the user in the block parameters.
  • Page 162: Table 6- 11 Fc 5 V24_Stat Parameters

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.5 Using the System Function Blocks with the ASCII Driver FC 5 V24_STAT parameters The following table lists the parameters of the FC 5 V24_STAT. Table 6- 11 FC 5 V24_STAT parameters Name Sort Data type...
  • Page 163: Interface Outputs Of The Cp 341, Setting/Resetting

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.5 Using the System Function Blocks with the ASCII Driver 6.5.3 Interface outputs of the CP 341, setting/resetting FC V24_SET The user can use the parameter inputs of the FC V24_SET function to set or reset the corresponding interface outputs.
  • Page 164: Table 6- 12 Fc 6 V24_Set Parameters

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.5 Using the System Function Blocks with the ASCII Driver FC 6 V24_SET parameters The following table lists the parameters of the FC 6 V24_SET. Table 6- 12 FC 6 V24_SET parameters Name Sort Data type...
  • Page 165: Use Of Function Blocks To Output Message Texts To A Printer

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.6 Use of function blocks to output message texts to a printer Use of function blocks to output message texts to a printer Introduction The FB 13 P_PRINT_RK function block is available for printing message texts. The FB 13 P_PRINT_RK transmits a process message to the CP 341, for example.
  • Page 166 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.6 Use of function blocks to output message texts to a printer Block call STL representation LAD representation CALL P_PRINT_RK, I_PRINT REQ: LADDR: DB_NO: DBB_NO: DONE: ERROR: STATUS: Note The parameters EN and ENO are only present in the graphical representation (LAD or FBD). To process these parameters, the compiler uses the binary result BR.
  • Page 167 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.6 Use of function blocks to output message texts to a printer Assignment in the data area, pointer DB The FB P_PRINT_RK uses the DB_NO and DBB_NO parameters to access a pointer DB in which the pointers to the data blocks containing the message texts and variables are stored in a fixed sequence.
  • Page 168: Table 6- 13 Fb 13 P_Print_Rk Parameters

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.6 Use of function blocks to output message texts to a printer Permissible length The length information in the pointer DB must be adapted for the particular display type (data types) and according to the precision used. FB 13 P_PRINT_RK parameters The following table lists the parameters of the FB 13 P_PRINT_RK.
  • Page 169 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.6 Use of function blocks to output message texts to a printer Time sequence chart for FB 13 P_PRINT_RK The figure below illustrates the behavior of the DONE and ERROR parameters depending on the input circuit of REQ and R.
  • Page 170: Parameter Assignment Of The Function Blocks

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.7 Parameter assignment of the Function Blocks Parameter assignment of the Function Blocks 6.7.1 General Information on Data Block Assignment Introduction This section is intended for users upgrading from SIMATIC S5 to SIMATIC S7. The following sections contain important information on what you need to take into account when programming function blocks in STEP 7.
  • Page 171 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.7 Parameter assignment of the Function Blocks Examples Conversion of STEP 5 data operands (left table column) into STEP 7 data operands (right table column). STEP 5 STEP 7 DW 10 DBW 20 DL 10 DBB 20 DR 10...
  • Page 172: Supplying The Block Parameters

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.7 Parameter assignment of the Function Blocks 6.7.2 Supplying the block parameters Direct/indirect parameter assignment Unlike in STEP 5, indirect parameter assignment of the blocks for STEP 7 (parameters transferred in the currently selected data block) is not possible. All block parameters accept both constants and variables, so the distinction between direct and indirect parameter assignment is no longer necessary with STEP 7.
  • Page 173 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.7 Parameter assignment of the Function Blocks Example of "Indirect Parameter Assignment" Call of FB 8 in accordance with the rules for "indirect parameter assignment": Network 1: CALL FB 8, DB8 := S //Send request := M 0.6 //Activates SEND...
  • Page 174 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.7 Parameter assignment of the Function Blocks Parameter assignment of data words The specification of data words (partially qualified specification) is not allowed because (depending on the actual operands) the currently selected data block can no longer be determined in the standard function.
  • Page 175 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.7 Parameter assignment of the Function Blocks Example of an "Actual operand with absolute addressing" Call of FB 8 with actual operands with absolute addressing: Network 1: CALL FB 8, DB8 := S //Send request := M 0.6 //Activates SEND...
  • Page 176 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.7 Parameter assignment of the Function Blocks Example of an "Actual operand with symbolic addressing" Call of FB 8 with actual operands with symbolic addressing: Network 1: CALL FB 8, DB8 := S //Send request := M 0.6 //Activates SEND...
  • Page 177: General Information On Program Processing

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.8 General Information on Program Processing General Information on Program Processing Start-up Characteristics of the CP 341 Programmable Controller The configuration data is created with the aid of the CP 341: Point-to-Point Communication, Parameter Assignment parameter assignment and transferred to the CPU with the STEP 7 software.
  • Page 178: Technical Specifications Of The Function Blocks

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.9 Technical Specifications of the Function Blocks Technical Specifications of the Function Blocks Memory requirements The table below shows the memory requirements of the CP 341 function blocks/functions. Table 6- 14 Memory requirements of the function blocks/functions in bytes Block Name Version...
  • Page 179 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.9 Technical Specifications of the Function Blocks System functions used The following system functions are used in the blocks: ● SFB 52 (RDREC), Read data set ● SFB 53 (WRREC), Write data set NOTICE The new standard function blocks of the CP341 •...
  • Page 180 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Communication via Function Blocks 6.9 Technical Specifications of the Function Blocks CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 181: Start-Up Characteristics And Operating Mode Transitions Of The Cp 341

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Start-up Characteristics and Operating Mode Transitions of the CP 341 Operating Modes of the CP 341 The CP 341 has the operating modes STOP, parameter reassignment, and RUN. STOP When the CP 341 is in STOP mode, no protocol driver is active and all send and receive requests from the CPU are given a negative acknowledgment.
  • Page 182: Startup Characteristics Of The Cp 341

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Start-up Characteristics and Operating Mode Transitions of the CP 341 7.2 Startup Characteristics of the CP 341 Startup Characteristics of the CP 341 CP 341b start-up The CP 341 start-up is divided into two phases: ● Initialization (CP 341 in POWER ON mode) ●...
  • Page 183 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Start-up Characteristics and Operating Mode Transitions of the CP 341 7.2 Startup Characteristics of the CP 341 The procedure for the CPUs listed below is as follows: Order number Procedure 6ES7313-1AD01-0AB0 Switch the CPU to STOP mode and then back to RUN mode.
  • Page 184: Behavior Of The Cp 341 On Operating Mode Transitions Of The Cpu

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Start-up Characteristics and Operating Mode Transitions of the CP 341 7.3 Behavior of the CP 341 on Operating Mode Transitions of the CPU Behavior of the CP 341 on Operating Mode Transitions of the CPU Once the CP 341 has been started up, all data is exchanged between the CPU and the CP 341 by means of the function blocks.
  • Page 185: Diagnostics With The Cp 341

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 Diagnostics Functions of the CP 341 The diagnostics functions of the CP 341 enable you to quickly localize any errors which occur. The following diagnostics options are available: ● Diagnostics via Display Elements of the CP 341 ●...
  • Page 186: Diagnostics Via The Display Elements Of The Cp 341

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Diagnostic interrupt The CP 341 can trigger a diagnostic interrupt on the CPU assigned to it. CP 341 provides 4 bytes of diagnostics information at the S7–300 backplane bus. This information is analyzed via the user program (OB 82) or using a programming device to read from the CPU diagnostic buffer.
  • Page 187: Diagnostics Messages Of The Function Blocks

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 8.1.2 Diagnostics Messages of the Function Blocks 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 188: Table 8- 1 Event Classes And Event Numbers

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Event classes The table below describes the various event classes and numbers. Table 8- 1 Event classes and event numbers Event class 0 (00H): "CP start-up"...
  • Page 189 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Event Class 4 (04H): "CP detected error in data traffic CP - CPU" Event no. Event text Remedy (04)03H Incorrect, unknown or illegal data type Check program, e.g.
  • Page 190 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Event Class 4 (04H): "CP detected error in data traffic CP - CPU" Event no. Event text Remedy (04)0AH An error has occurred during data transmission Create destination DB in the user program or increase between the CPU and CP.
  • Page 191 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Event class 5 (05H): "Error while processing CPU request" Event no. Event Remedy (05)0DH Printer driver only: Correct the specified width of the variable in the conversion statement on the basis of the variable's Width in conversion statement too small or too maximum possible number of characters in text-...
  • Page 192 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Event class 6 (06H): "Error when processing a partner job" only for RK 512 Event no. Event text Remedy (06)01H Error in 1st command byte (not 00 or FFH) Basic header structure error on partner.
  • Page 193 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Event class 6 (06H): "Error when processing a partner job" only for RK 512 Event no. Event text Remedy (06)0EH Synchronous fault of partner This error may be reported after your own automation system is restarted in the case of long message frames New (continuation) command message...
  • Page 194 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Event class 7 (07H): "Send error" Event no. Event Remedy (07)04H 3964(R) only: Check whether the partner also indicates an error; possibly it has not received all of the transmitted Cancellation by partner: data (for example, due to an interrupted data link), or One or more characters were received from the...
  • Page 195 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Event class 8 (08H): "Receive error" Event no. Event Remedy (08)02H 3964(R) only: Check for malfunction of the partner device, possibly by using interface test device interconnected in the Error establishing connection: data link.
  • Page 196 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Event class 8 (08H): "Receive error" Event no. Event Remedy (08)15H Discrepancy between settings for transmission Set the same number of transmission attempts for attempts of the CP and the communication partner.
  • Page 197 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Event class 9 (09H): "Response message frame received from interconnection partner with errors or error message frame" Event no. Event text Remedy (09)08H Only for RK 512: This error occurs at the restart of your own programmable controller or of the partner.
  • Page 198 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Event class 10 (0AH): "Errors in response message frame of the partner detected by the CP" (0A)01H Only for RK 512: This error is reported after your own programming device is restarted in the case of long message Synchronization error of partner, because: frames or when the partner is restarted.
  • Page 199: Table 8- 2 Event Class 30

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Displaying and evaluating the STATUS output You can display and evaluate the actual addresses in the STATUS output of the function block. Note An error message is only output if the ERROR bit (request completed with error) is set at the same time.
  • Page 200: Error Numbers In The Response Message Frame

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 8.1.3 Error Numbers in the Response Message Frame If you are working with the RK 512 computer link and an error occurs at the communication partner in a SEND or FETCH message frame, the communication partner sends a response message frame with an error number in the 4th byte.
  • Page 201: Diagnostics Via The Diagnostic Buffer Of The Cp 341

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 8.1.4 Diagnostics via the diagnostic buffer of the CP 341 Diagnostic buffer of the CP 341 The CP 341 has its own diagnostic buffer in which all the diagnostic events of the CP 341 are entered in the order in which they occur.
  • Page 202 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 Outputting the diagnostic buffer on the programming device The content of the diagnostic buffer of the CP 341 can be read by means of the STEP 7 information functions.
  • Page 203: Diagnostic Interrupt

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 8.1.5 Diagnostic Interrupt The CP 341 can trigger a diagnostics alarm on the assigned CPU, thus indicating a malfunction of the CP 341. You can specify at parameterization whether the CP 341 is to trigger a diagnostics alarm or not in the event of serious errors.
  • Page 204 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Diagnostics with the CP 341 8.1 Diagnostics Functions of the CP 341 1st, 3rd, and 4th bytes: The 1st, 3rd, and 4th bytes of the diagnostic data represent the error that has occurred. Bit 0 in the 1st byte is the group error display (SF). Bit 0 is always set to "1" if at least one bit from bits 1 to 7 is set to "1", i.e.
  • Page 205: Programming Example For Standard Function Blocks

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming Example for Standard Function Blocks General Information The programming example given here and included in the zXX21_01_PtP_Com_CP34x project describes standard functions for operating the CP 341 communications processor. Objective The programming example ● aims to show examples of the most important functions ●...
  • Page 206: Device Configuration

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming Example for Standard Function Blocks 9.2 Device Configuration Device Configuration Application To try out the program example, you could use the following devices: ● An S7-300 automation system (rack, power supply, CPU) ● A CP 341 module with a communications partner (e.g., a second CP), or insertion of a "short-circuit connector", i.e.
  • Page 207: Settings

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming Example for Standard Function Blocks 9.3 Settings 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 ●...
  • Page 208: Blocks Used

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming Example for Standard Function Blocks 9.4 Blocks Used Blocks Used Blocks used The table below shows the blocks used for the sample program. Block Symbol Description OB 1 CYCLE Cyclic program processing OB 100 RESTART Cold restart processing DB 21 SEND IDB...
  • Page 209: Installation, Error Messages

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming Example for Standard Function Blocks 9.5 Installation, Error Messages Installation, Error Messages Scope of supply and installation The programming example of the CP 341, together with the CP 341: Point-to-Point Communication, Parameter Assignment parameter assignment interface and the function blocks is located on the CD supplied with the module.
  • Page 210: Activation, Start-Up Program And Cyclic Program

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming Example for Standard Function Blocks 9.6 Activation, Start-Up Program and Cyclic Program Activation, Start-Up Program and Cyclic Program Activation, start-up program The start-up program is located in OB 100. The control bits and the counters are reset in the start-up procedure Cyclic program The cyclic program is in OB 1.
  • Page 211 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming Example for Standard Function Blocks 9.6 Activation, Start-Up Program and Cyclic Program Description of FC 22 (RECEIVE) Program section "Enable receive data": In order to receive data, the P_RCV_RK EN_R receive enable at the P_RCV_RK block must be set to 1.
  • Page 212 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming Example for Standard Function Blocks 9.6 Activation, Start-Up Program and Cyclic Program CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 213: Technical Specifications

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Technical Specifications Technical Specifications of the CP 341 General technical specifications The following table contains the general technical specifications of the CP 341. You will find more general technical specifications for the SIMATIC S7-300 in the reference S7-300 Programmable Controllers, Module Specifications manual entitled Table A- 1...
  • Page 214 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Technical Specifications A.1 Technical Specifications of the CP 341 Technical specifications Transmission rate with ASCII driver 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 76800, 115200 bps Transmission rate with printer driver 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 76800, 115200 bps Character frame •...
  • Page 215 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Technical Specifications A.1 Technical Specifications of the CP 341 Technical specifications for the X27 (RS 422/485) Interface The table below shows the technical specifications for the X27 (RS 422/485) interface of the CP 341–RS 422/485. Table A- 4 Technical specifications of the X27 (RS 422/485) interface Technical specifications Interface...
  • Page 216 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Technical Specifications A.1 Technical Specifications of the CP 341 Technical specifications for RK 512 computer link The table below shows the technical specifications for the RK 512 computer link. Table A- 6 Technical specifications of the RK 512 computer link RK 512 computer link Max.
  • Page 217 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Technical Specifications A.1 Technical Specifications of the CP 341 Table A- 8 Additional parameters of end-of-frame detection ASCII driver with end-of-frame detection after expiration of character delay time Parameters No other parameter assignments need to be made. The end of a frame is detected when the programmed character delay time elapses.
  • Page 218: Table A- 10 Transmission Times For The Ascii Driver

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Technical Specifications A.2 Transmission Rates Transmission Rates Transmission Rates The tables below indicate the transmission times required depending on the transmission protocol selected. Two S7-300 stations, each with a CPU 315-2DP (6ES7315-2AF01-0AB0) and a CP 341 were used to measure the times.
  • Page 219: Table A- 12 Transmission Times With The Rk 512 Computer Link

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Technical Specifications A.2 Transmission Rates RK 512 computer link Table A- 12 Transmission times with the RK 512 computer link User data Baud rate (bd) 76800 57600 38400 19200 9600 4800 2400 1200 1 bytes 0.027 s 0.029 s 0.030 s 0.038 s...
  • Page 220 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Technical Specifications A.2 Transmission Rates CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 221: B Connecting Cables

    Please note that you must only use shielded connector casings. 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. CAUTION Never connect the cable shield with the GND, as this could destroy the interfaces.
  • Page 222 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.1 RS 232C Interface of the CP 341-RS 232C RS 232C connecting cables (S7 (CP 341) - S7 (CP 340/ CP 341/CP 441)) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and a CP 340/CP 341/CP 441.
  • Page 223 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.1 RS 232C Interface of the CP 341-RS 232C RS 232C connecting cables (S7 (CP 341) - CP 544, CP 524, CPU 928B, CPU 945, CPU 948) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and a CP 544, CP 524, CPU 928B, CPU 945 or CPU 948.
  • Page 224 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.1 RS 232C Interface of the CP 341-RS 232C RS 232C connecting cables (S7 (CP 341) - CP 521 SI/CP 521 BASIC) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and a CP 521 SI/CP 521 BASIC.
  • Page 225 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.1 RS 232C Interface of the CP 341-RS 232C RS 232C connecting cables (S7 (CP 341) - CP 523) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and a CP 523. For the connecting cables you will require the following female/male connectors: ●...
  • Page 226 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.1 RS 232C Interface of the CP 341-RS 232C RS 232C connecting cable (S7 (CP 341) - IBM-Proprinter (PT 88), DR 230) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and an IBM Proprinter with serial interface (PT 88 or IBM-compatible printer).
  • Page 227 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.1 RS 232C Interface of the CP 341-RS 232C RS 232C connecting cable (S7 (CP 341) - laser printer) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and a laser printer with serial interface (PT 10 or Laserjet series II). For the connecting cable you will require the following female/male connectors: ●...
  • Page 228: Table B- 2 Pin Assignment For The 9-Pin Sub D Female Connector Of The Integrated Interface Of The Cp 341-20Ma-Tty

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.2 20 mA TTY interface on the CP 341-20mA-TTY 20 mA TTY interface on the CP 341-20mA-TTY Pin assignment The table below shows the pin assignment for the 9-pin sub D female connector in the front panel of the CP 341-20mA-TTY.
  • Page 229 Please note that you must only use shielded connector casings. 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. CAUTION Never connect the cable shield with the GND, as this could destroy the interface modules.
  • Page 230 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.2 20 mA TTY interface on the CP 341-20mA-TTY 20mA-TTY connecting cable (S7 (CP 341) - S7 (CP 340/ CP 341/CP 441)) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and a CP 340/CP 341/CP 441.
  • Page 231 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.2 20 mA TTY interface on the CP 341-20mA-TTY 20mA-TTY connecting cable (S7 (CP 341) - CP 544, CP 524, CPU 928B, CPU 945, CPU 948) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and a CP 544, CP 524, CPU 928B, CPU 945 or CPU 948.
  • Page 232 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.2 20 mA TTY interface on the CP 341-20mA-TTY 20mA-TTY connecting cable (S7 (CP 341) - CP 523) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and a CP 523. For the connecting cables you will require the following male connectors: ●...
  • Page 233 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.2 20 mA TTY interface on the CP 341-20mA-TTY 20mA-TTY connecting cable (S7 (CP 341) - CP 521 SI/CP 521 BASIC/ IBM-compatible printer) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and a CP 521 SI/CP 521 BASIC.
  • Page 234 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.2 20 mA TTY interface on the CP 341-20mA-TTY 20mA-TTY connecting cable (S7 (CP 341) - CPU 944/AG 95) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and a CPU 944/AG 95. For the connecting cables you will require the following male connectors: ●...
  • Page 235: X27 (Rs 422/485) Interface Of The Cp 341-Rs 422/485

    Please note that you must only use shielded connector casings. 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. CAUTION Never connect the cable shield with the GND, as this could destroy the interface modules.
  • Page 236 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.3 X27 (RS 422/485) Interface of the CP 341-RS 422/485 In the following On the following pages you will find examples of connecting cables for a point-to-point connection between the CP 341-RS 422/485 and S7 modules or SIMATIC S5. X 27 connecting cable (S7 (CP 341) - CP 340/CP 341/CP 441) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and a CP 340/CP 341/CP 441 for RS 422 mode.
  • Page 237 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.3 X27 (RS 422/485) Interface of the CP 341-RS 422/485 X 27 connecting cable (S7 (CP 341) - CP 340/CP 341/CP 441) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and a CP 340/CP 341/CP 441 for RS 485 mode.
  • Page 238 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Connecting cables B.3 X27 (RS 422/485) Interface of the CP 341-RS 422/485 Connecting cable X 27 (S7 (CP 341) - CP 544, CP 524, CPU 928B, CPU 945, CPU 948) The figure below illustrates the connecting cable for a point-to-point connection between a CP 341 and a CP 544, CP 524, CPU 928B, CPU 945, CPU 948 for RS 422 mode.
  • Page 239: C Accessories And Order Numbers

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Accessories and order numbers Module variants The table below contains the different variants of the CP 341. Table C- 1 Order numbers of the module variants of the CP 341 Product Order number CP 341–RS 232C 6ES7341–1AH02–0AE0 CP 341–20mA–TTY 6ES7341–1BH02–0AE0...
  • Page 240 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Accessories and order numbers CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 241: D Literature On Simatic S7

    S7 CPU. It is intended to Programming with STEP 7 give first-time users of an S7-300/400 an overview of the programming (http://support.automation.siemens.com/W methodology, thereby providing a basis on which they can build their user W/view/en/18652056) programs.
  • Page 242 Literature on SIMATIC S7 D.1 Literature on SIMATIC S7 Title Content Reference Manual S7-SCL for S7-300/400 (http://support.automation.siemens.com/W W/view/en/5581793) Manual The GRAPH, HiGraph and CFC languages support additional options for implementing sequential controls, state controls, or graphic interconnections S7–GRAPH for S7-300/400 Programming of blocks.
  • Page 243: Glossary

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Glossary Address The address indicates the physical storage space and enables direct access to the operand that is stored under this address. Block Blocks are parts of the user program that are separated by their function, structure or purpose.
  • Page 244 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Glossary Cycle time The cycle time is the time that the CPU requires to process the user program once. Cyclic program processing In cyclic program processing the user program runs in program loop, or cycle, that is constantly repeated.
  • Page 245 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Glossary Downloading to the programming device Uploading of load objects (e.g. code blocks) from the load memory of the central processing unit into the programming device. Function blocks (FBs) Function blocks are components of the user program and are, according to IEC standard, "blocks with memory".
  • Page 246 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Glossary Operating mode The SIMATIC S7 programmable controllers have three different operating modes: STOP, START-UP and RUN. The functionality of the CPU is different in the various operating modes. Operating system of the CPU The operating system of the CPU organizes all the functions and process of the CPU that are not connected to a special control task.
  • Page 247 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Glossary S7–300 backplane bus The S7 300 backplane bus for module intercommunication, and power distribution to the modules. Software Software refers to the entirety of all programs that are used on a computing system. The operating system and user programs belong to this. Startup The START-UP operating mode forms the transition from STOP mode to RUN mode.
  • Page 248 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Glossary CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 249: Index

    www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Index Bus connector for the S7 backplane bus, 21 BUSY signal, 78 20mA-TTY interface, 25 20mA-TTY interface Properties, 25 Calling the SFCERR variable, 199 20-mA-TTY interface, 228 Character delay time, 32, 81, 88 Character frame, 31, 82, 89 Code transparency, 64 Command message frame, 50 Communication via function blocks, 127...
  • Page 250 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Index Parameters, 168 Time sequence chart, 169 Half-duplex mode, 30 FB 7 P_RCV_RK, 128 Handshaking, 74 FB 8 P_SND_RK, 128 Hardware components, 22 FB P_PRINT_RK Message texts, 165 FB P_PRINT_RK instance DB, 166 FB P_PRINT_RK Indicator for end of receive message frame, 88 Assignment in the data area, pointer DB, 167 Initialization, 182 FB P_RCV_RK...
  • Page 251 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Index Block call, 148, 152 Partner requests, 61 P_SND_RK RK 512 Block call, 143, 156 Transmission process, 60 Parameter assignment, 172, 182 RK 512 Direct, 172 FB 8 P_SND_RK, 140 Indirect, 172 RK 512 computer link of data words, 174 Command message frame, 50, 51 Parameter assignment data, 79...
  • Page 252 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Index with ASCII driver, 36 with the RK 512, 37 Transmission Rates 3964(R) procedure, 218 ASCII driver, 218 RK 512 computer link, 219 Uses of the CP 341, 18 X27 (RS 422/485) interface, 235 Properties, 26 CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...
  • Page 253 www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual, 09/2008, A5E02191071-01...

Table of Contents