• 沒有找到結果。

CP 340 Point-to-Point Communication

在文檔中 The AS-i Master 2 (頁 65-75)

Blocks 6

Start-up Characteristics and Operating Mode Transitions of

the CP 340 7

Diagnostics with the CP 340 8

Programming Example for

Standard Function Blocks 9

Appendices

Technical Specifications A

Connecting Cables B

Communication Matrix of the

Protocols C

Accessories and Order Numbers D

SIMATIC S7 Reference Literature E

Glossary, Index Edition 06/2002

A5E00053578-05

CP 340 Point-to-Point Communication

Installation and Parameter Assignment

Manual

This manual has the order number:

6ES7340-1AH00-8BA0

SIMATIC

如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

This manual contains notices which you should observe to ensure your own personal safety, as well as to protect the product and connected equipment. These notices are highlighted in the manual by a warning triangle and are marked as follows according to the level of danger:

!

Dangerindicates that death, severe personal injury or substantial property damage will result if proper precautions are not taken.

!

Warningindicates that death, severe personal injury or substantial property damage can result if proper precautions are not taken.

!

Cautionindicates that minor personal injury or property damage can result if proper precautions are not taken.

Note

draws your attention to particularly important information on the product, handling the product, or to a particular part of the documentation.

The device/system may only be set up and operated in conjunction with this manual.

Only qualified personnel should be allowed to install and work on this equipment. Qualified persons are defined as persons who are authorized to commission, to ground, and to tag circuits, equipment, and sys

tems in accordance with established safety practices and standards.

Note the following:

!

WarningThis device and its components may only be used for the applications described in the catalog or the technical description, and only in connection with devices or components from other manufacturers which have been approved or recommended by Siemens.

This product can only function correctly and safely if it is transported, stored, set up, and installed correctly, and operated and maintained as recommended.

SIMATIC, SIMATIC NET and SIMATIC HMI are registered trademarks of SIEMENS AG.

Third parties using for their own purposes any other names in this document which refer to trademarks might infringe upon the rights of the trademark owners.

We have checked the contents of this manual for agreement with the hardware and software described. Since deviations cannot be precluded entirely, we cannot guarantee full agreement. However, the data in this manual are reviewed regularly and any necessary corrections included in subsequent editions. Suggestions for improvement are welcomed.

Technical data subject to change.

 Siemens AG 1997-2002 Disclaimer of Liability Copyright  Siemens AG 1997-2002 All rights reserved

The reproduction, transmission or use of this document or its contents is not permitted without express written authority. Offenders will be liable for damages. All rights, including rights created by patent grant or registration of a utility model or design, are reserved.

Siemens AG

Bereich Automation and Drives

Geschaeftsgebiet Industrial Automation Systems Postfach 4848,D90327 Nuernberg

iii

CP 340 Point-to-Point Communication ASE00053578-05

Preface

This manual explains how to establish and operate a point-to-point connec-tion.

The manual, which is divided into a main section and a reference section (appendices), describes the hardware and software of the CP 340 commu-nications processor and how it is integrated into the S7-300 programmable controller.

The following subjects are covered:

• The basics of point-to-point connections with the CP 340

• Starting up the CP 340

• Mounting the CP 340

• Communication via the CP 340

• Debugging

• Application example

• Attributes and technical specifications

The manual is relevant for:

Product Order Number From Edition

CP 340-RS 232C 6ES7 340-1AH01-0AE0 01

CP 340-20mA TTY 6ES7 340-1BH00-0AE0 01

CP 340-RS 422/485 6ES7 340-1CH00-0AE0 01

Note

The description of the CP 340 communications processor contained in this manual is correct at the date of publication. We reserve the right to describe changes to module functionality in a product information sheet.

Purpose

Contents

Scope of This Manual

如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

iv CP 340 Point-to-Point Communication ASE00053578-05

Since edition 01 of this manual, CP 340 Point-to-Point Communication, Installation and Parameter Assignment, descriptions of the following have been added:

• The CP 340-RS 422/485 and CP 340-20mA TTY module variants

• The output of message texts to a printer

• Diagnostics by means of the diagnostic buffer of the CP 340

Appendix E contains a list of further publications on the S7-300 and other programmable controllers.

The entire set of SIMATIC S7 documentation is available on CD-ROM.

To help you to quickly find the information you require, this manual offers the following:

• A comprehensive list of contents followed by lists of all figures and tables which appear in the manual.

• In the main body of the text, the information in the left-hand column of each page summarizes the contents of each section.

• Following the appendices, a glossary defines important technical terms used in the manual.

• Finally, a comprehensive index allows quick access to information on specific subjects.

Please contact your local Siemens representative if you have any queries about the products described in this manual. A list of Siemens representatives worldwide is contained, for example, in the ”Siemens Worldwide” Appendix of the manual S7-300 Programmable Controller, Hardware and Installation.

If you have any questions or suggestions concerning this manual, please fill out the form at the back and return it to the specified address. Please feel free to enter your personal assessment of the manual in the form provided.

We offer a range of courses to help get you started with the SIMATIC S7 pro-grammable controller. Please contact your local training center or the central training center in Nuremberg, D-90027 Germany, Tel. +49 911 895 3200.

The abbreviation CP 340 is used in the documentation when information ap-plies to all three module variants: CP 340-RS 232C, CP 340-20mA TTY and CP 340-RS 422/485.

v

CP 340 Point-to-Point Communication ASE00053578-05

Available worldwide, around the clock:

Johnson City

Local time: 0:00 to 24:00 / 365 days Phone: +49 (0) 180 5050-222 Fax: +49 (0) 180 5050-223 E-Mail: adsupport@

siemens.com GMT: +1:00

Europe / Africa (Nuremberg) Authorization

Local time: Mon.-Fri. 7:00 to 17:00 Phone: +49 (0) 180 5050–222 Fax: +49 (0) 180 5050-223 E-Mail: adsupport@

Local time: Mon.-Fri. 8:00 to 17:00 Phone: +1 (0) 770 740 3505 Fax: +1 (0) 770 740 3699 E-Mail: isd-callcenter@

sea.siemens.com GMT: –5:00

Asia / Australia (Singapore) Technical Support and Authorization

Local time: Mon.-Fri. 8:30 to 17:30 Phone: +65 (0) 740-7000 Fax: +65 (0) 740-7001 E-Mail: simatic.hotline@

sea.siemens.com.sg GMT: +8:00

The languages of the SIMATIC Hotlines and the authorization hotline are generally German and English.

A&D Technical Support

Preface 如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

vi CP 340 Point-to-Point Communication ASE00053578-05

In addition to our documentation, we offer our Know-how online on the internet at:

http://www.siemens.com/automation/service&support where you will find the following:

• The newsletter, which constantly provides you with up–to–date informa-tion on your products.

• The right documents via our Search function in Service & Support.

• A forum, where users and experts from all over the world exchange their experiences.

• Your local representative for Automation & Drives via our representatives database.

• Information on field service, repairs, spare parts and more under

“Services”.

Service &

Support on the Internet

Preface 如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

vii

CP 340 Point-to-Point Communication ASE00053578-05

Contents

1 Product Description . . . 1-1 1.1 Uses of the CP 340. . . 1-2 1.2 Components Required for a Point-to-Point Connection with the CP 340 . 1-5 1.3 Design of the CP 340 . . . 1-7 1.4 Attributes of the Serial Interface . . . 1-9 1.4.1 RS 232C Interface of the CP 340-RS 232C . . . 1-9 1.4.2 20 mA TTY Interface of the CP 340-20mA TTY. . . 1-10 1.4.3 X27 (RS 422/485) Interface of the CP 340-RS 422/485 . . . 1-11 1.5 Cables for Connecting the CP 340 to a Communication Partner . . . 1-12 2 Basic Principles of Serial Data Transmission . . . 2-1 2.1 Serial Transmission of a Character . . . 2-2 2.2 Transmission Procedure with a Point-to-Point Connection. . . 2-7 2.2.1 ISO 7-Layer Reference Model for Data Transmission. . . 2-7 2.2.2 Data Transmission with the 3964(R) Procedure. . . 2-12 2.2.3 Data Transmission with the ASCII Driver . . . 2-21 2.2.4 Data Transmission with the Printer Driver. . . 2-32 2.3 Parameterization Data . . . 2-36 2.3.1 Basic Parameter of the CP 340 . . . 2-36 2.3.2 Parameterization Data of the 3964(R) Procedure . . . 2-37 2.3.3 Parameterization Data of the ASCII Driver . . . 2-43 2.3.4 Parameterization Data of the Printer Driver . . . 2-50 2.3.5 Conversion and Control Statements for Printer Output. . . 2-56 3 Starting Up the CP 340 . . . 3-1 4 Mounting the CP 340. . . 4-1 4.1 CP 340 Slots . . . 4-2 4.2 Mounting and Dismounting the CP 340 . . . 4-3 5 Configuring and Parameterizing the CP 340 . . . 5-1 5.1 Configuring the CP 340 . . . 5-2 5.2 Parameterizing the Communications Protocols . . . 5-3 5.3 Managing the Parameter Data . . . 5-4

如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

viii CP 340 Point-to-Point Communication ASE00053578-05

6 Communication via Function Blocks . . . 6-1 6.1 Communication via Function Blocks . . . 6-2 6.2 Overview of the Function Blocks . . . 6-3 6.3 Using the Function Blocks . . . 6-4 6.3.1 Connection to a Communication Partner. . . 6-4 6.3.2 Outputting Message Texts to a Printer. . . 6-12 6.3.3 Reading and Controlling the RS 232C Secondary Signals. . . 6-17 6.4 Parameterizing the Function Blocks. . . 6-21 6.4.1 General Information on Data Block Assignment . . . 6-21 6.4.2 Parameterizing the Data Blocks . . . 6-22 6.5 General Information on Program Processing . . . 6-25 6.6 Technical Specifications of the Function Blocks. . . 6-26 7 Start-up Characteristics and Operating Mode Transitions of the CP 340 . . . . 7-1 7.1 Operating Modes of the CP 340 . . . 7-2 7.2 Start-up Characteristics of the CP 340 . . . 7-3 7.3 Behavior of the CP 340 on Operating Mode Transitions of the CPU . . . . 7-4 8 Diagnostics with the CP 340. . . 8-1 8.1 Diagnostics Functions of the CP 340 . . . 8-2 8.2 Diagnosis via the Display Elements of the CP 340 . . . 8-3 8.3 Diagnostics Messages of the Function Blocks

P_SEND, P_RCV and P_PRINT . . . 8-4 8.4 Diagnosis via the S7-300 Backplane Bus . . . 8-12 8.5 Diagnosis by Means of the Diagnostic Buffer of the CP 340 . . . 8-15 9 Programming Example for Standard Function Blocks . . . 9-1 9.1 General Information . . . 9-2 9.2 Device Configuration. . . 9-3 9.3 Settings . . . 9-4 9.4 Blocks Used . . . 9-5 9.5 Example ”Point-to-Point Connection”. . . 9-6 9.6 Example ”Printing” and ”Reading and Controlling the CP 340

Inputs/Outputs” . . . 9-8 9.7 Installation, Error Messages . . . 9-10 9.8 Activation, Start-Up Program and Cyclic Program. . . 9-11

Contents 如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

ix

CP 340 Point-to-Point Communication ASE00053578-05

A Technical Specifications . . . A-1 A.1 Technical Specifications of the CP 340 . . . A-2 A.2 Certification and Application Areas. . . A-7 A.3 Recycling and Disposal . . . A-9 B Connecting Cables . . . B-1 B.1 RS 232C Interface of the CP 340-RS 232C . . . B-2 B.2 20 mA TTY Interface of the CP 340-20mA TTY . . . B-10 B.3 X27 (RS 422/485) Interface of the CP 340-RS 422/485 . . . B-17 C Communication Matrix of the Protocols . . . C-1 D Accessories and Order Numbers . . . D-1 E SIMATIC S7 Reference Literature . . . E-1 Glossary . . . Glossary-1 Index . . . Index-1

Contents 如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

x CP 340 Point-to-Point Communication ASE00053578-05

Contents 如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

1-1

CP 340 Point-to-Point Communication ASE00053578-05

在文檔中 The AS-i Master 2 (頁 65-75)