background image

 

PtP coupling and configuration of CP 340  
Manual, 04/2011, A5E00369892-03 

7

 

Table of contents 

 
 

Preface ...................................................................................................................................................... 

Product Description ................................................................................................................................. 11 
1.1 

Uses of the CP 340......................................................................................................................11 

1.2 

Components for a Point-to-Point Connection with the CP 340....................................................14 

1.2.1 

Required Hardware Components ................................................................................................14 

1.2.2 

Software Components for a Point-to-Point Connection with the CP 340 ....................................15 

1.3 

Design of the CP 340...................................................................................................................16 

1.4 

Properties of the serial interface ..................................................................................................18 

1.4.1 

RS 232C interface of the CP 340–RS 232C ................................................................................18 

1.4.2 

20mA–TTY interface on the CP 340–20mA-TTY.........................................................................20 

1.4.3 

X27 (RS 422/485) Interface of the CP 340–RS 422/485 .............................................................21 

Basic Principles of Serial Data Transmission........................................................................................... 23 
2.1 

Serial Transmission of a Character .............................................................................................23 

2.2 

Transmission mode in Point-to-Point Communication.................................................................28 

2.3 

Transmission integrity ..................................................................................................................30 

2.4 

Data Transmission with the 3964(R) Procedure..........................................................................32 

2.4.1 

Control characters........................................................................................................................32 

2.4.2 

Block Checksum ..........................................................................................................................33 

2.4.3 

Sending Data with 3964(R)..........................................................................................................34 

2.4.4 

Receiving Data with 3964(R) .......................................................................................................38 

2.4.5 

Handling Errored Data .................................................................................................................43 

2.5 

Data transfer using the ASCII driver ............................................................................................46 

2.5.1 

RS 232C accompanying signals..................................................................................................46 

2.5.2 

Sending Data with the ASCII Driver.............................................................................................50 

2.5.3 

Receiving Data with the ASCII Driver ..........................................................................................51 

2.5.4 

BREAK - Monitoring on CP 340...................................................................................................55 

2.5.5 

Receive Buffer on CP 340 ...........................................................................................................55 

2.6 

Data transmission with the printer driver .....................................................................................56 

2.7 

Parameterization Data .................................................................................................................61 

2.7.1 

Basic parameters of the CP 340..................................................................................................61 

2.7.2 

Parameterization Data of the 3964(R) Procedure .......................................................................62 

2.7.3 

Parameterization data of the ASCII driver ...................................................................................66 

2.7.4 

Parameterization data of the printer driver ..................................................................................72 

2.7.5 

Conversion and Control Statements for Printer Output ...............................................................77 

Содержание SIMATIC CP 340

Страница 1: ..._________________ SIMATIC S7 300 PtP coupling and configuration of CP 340 Manual 04 2011 A5E00369892 03 Preface Product Description 1 Basic Principles of Serial Data Transmission 2 Starting up the CP 340 3 Mounting the CP 340 4 Configuring and Parameterizing the CP 340 5 Communication using function blocks 6 Startup 7 Diagnostics with the CP 340 8 Programming Example for Standard Function Blocks 9...

Страница 2: ...nce with the relevant documentation in particular its warning notices and safety instructions Qualified personnel are those who based on their training and experience are capable of identifying risks and avoiding potential hazards when working with these products systems Proper use of Siemens products Note the following WARNING Siemens products may only be used for the applications described in th...

Страница 3: ... Topics 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 Troubleshooting Application example Features and technical specifications Scope of the manual The manual is relevant for Product Order number From edition CP 340 RS 232C 6ES7 340 1AH02 0AE0 01 CP 340 20mA TTY 6ES7 340 1BH02 0AE0 01 CP 340 RS 422 485 6ES7 ...

Страница 4: ...l At the end of the manual a comprehensive index facilitates quick access to information relating to specific subjects Additional assistance Please contact your local Siemens representative if you have any queries about the products described in this manual You will find contact details for your representative at http www siemens com automation partner You will find the guide to the technical docu...

Страница 5: ...rt is available in the Internet at http www siemens com automation service support Service Support on the Internet Supplementary to our documentation offers we provide a comprehensive online knowledge base on the Internet http www siemens com automation service support There you will find The newsletter which is constantly updated to provide you with the latest information about your products The ...

Страница 6: ...Preface PtP coupling and configuration of CP 340 6 Manual 04 2011 A5E00369892 03 ...

Страница 7: ...smission mode in Point to Point Communication 28 2 3 Transmission integrity 30 2 4 Data Transmission with the 3964 R Procedure 32 2 4 1 Control characters 32 2 4 2 Block Checksum 33 2 4 3 Sending Data with 3964 R 34 2 4 4 Receiving Data with 3964 R 38 2 4 5 Handling Errored Data 43 2 5 Data transfer using the ASCII driver 46 2 5 1 RS 232C accompanying signals 46 2 5 2 Sending Data with the ASCII D...

Страница 8: ...he function blocks for connecting to a communications processor 105 6 3 1 S7 sends data to a communication partner 105 6 3 2 S7 receives data from a communication partner 109 6 4 Using function blocks for the output of message texts to a printer 113 6 5 Use of function blocks for reading and controlling the RS 2332C secondary signals 118 6 6 Delete receive buffer FB12 P_RESET 121 6 7 General Infor...

Страница 9: ...ing the CP 340 Inputs Outputs 153 9 6 Installation Error Messages 155 9 7 Activation Start Up Program and Cyclic Program 156 A Technical Specifications 159 A 1 Technical Specifications of the CP 340 159 A 2 Recycling and Disposal 164 B Connecting Cables 165 B 1 RS 232C interface of the CP 340 RS 232C 165 B 2 20 mA TTY interface on the CP 340 20mA TTY 173 B 3 X27 RS 422 485 Interface of the CP 340 ...

Страница 10: ...Table of contents PtP coupling and configuration of CP 340 10 Manual 04 2011 A5E00369892 03 ...

Страница 11: ...Printer driver Adaptation of transmission protocols by means of parameter assignment with the CP 340 parameter assignment user interface Point to point communication parameter assignment Integrated serial interface Three module variants are available each having a different interface type that is suitable for different communication partners see Module variants table Module variants The following ...

Страница 12: ...ications for the CP 340 The CP 340 communication processor supports point to point communication with various Siemens modules and with non Siemens products SIMATIC S5 via the 3964 R driver with corresponding interface module on S5 side Siemens BDE terminals 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 SIMOVERT and SIMORE...

Страница 13: ...Manual 04 2011 A5E00369892 03 13 The CP 340 can also be operated in a distributed configuration using the ET 200M IM153 I O device Note The CP 340 modules 6ES7 340 1xH0y 0AE0 cannot be operated downstream from the external communication CPs CP 342 5 PROFIBUS DP and CP 343 1 PROFINET IO ...

Страница 14: ... point connection Table 1 3 Hardware Components for a Point to Point Connection with the CP 340 Components Function Diagram Mounting rack provides the mechanical and electrical connections of the S7 300 Power supply module PS converts the line voltage 120 230 VAC into the operating voltage of 24 VDC required to supply the S7 300 Central Processing Unit CPU Accessories Memory Card Backup battery ex...

Страница 15: ...on with the CP 340 Software components The following table lists the software components required for establishing a point to point connection with the CP 340 Table 1 4 Software components for a point to point connection with the CP 340 Components Function Diagram STEP 7 software package configures assigns parameters programs and tests the S7 300 LFHQVH Parameter assignment interface Assigning par...

Страница 16: ...0 communication processor is supplied with an integrated serial interface Positions of module elements The figure shows the positions of the module elements on the front panel of the CP 340 communication processor QGLFDWRU HOHPHQWV URQW SDQHO GRRU QWHJUDWHG LQWHUIDFH L LQJ VFUHZ 6 7 5 Figure 1 1 Positions of the module elements on the CP 340 communication processor ...

Страница 17: ...ee variants with different interface types RS 232C X27 RS 422 485 20mA TTY The interface types are indicated on the front of the CP 340 A detailed interface description can be found in Section Properties of the serial interface Page 18 Bus connector for the S7 rear panel bus A bus connector is supplied with the CP 340 The bus connector is plugged onto the back panel of the CP 340 when it is mounte...

Страница 18: ... standard connecting cables in various lengths 1 4 1 RS 232C interface of the CP 340 RS 232C Features The RS 232C interface is a voltage interface used for serial data transmission in compliance with the RS 232C standard Type Voltage interface Front connector 9 pin sub D male connector with screw locking RS 232C signals TXD RXD RTS CTS DTR DSR RI DCD GND all isolated from the S7 internal power sup...

Страница 19: ...RTS Request To Send RTS ON Communication processor is ready to send RTS OFF Communication processor is not sending CTS Clear to send Communication partner can receive data from the communication processor The communication processor expects this signal in response to RTS ON DTR Data terminal ready DTR ON Communication processor is active and ready for operation DTR OFF Communication processor is n...

Страница 20: ...on Features The 20mA TTY interface has the following features and meets the following requirements Type Current loop interface Front connector 9 pin sub D socket with screw locking 20mA TTY signals Two isolated 20 mA current sources receiving loop RX and send loop TX and all isolated from the S7 internal power supply Max baud rate Baud rate 9 6 kbps Max cable length 100 m active 1000 m passive Cab...

Страница 21: ...d fulfills the following requirements Type Differential voltage interface Front connector 15 pin sub D female with screwed interlock RS 422 Signals T A R A T B R B GND All isolated against the S7 internal power supply RS 485 Signals R T A R T B GND All isolated against the S7 internal power supply Max baud rate 19 2 kbps 3964 R procedure 9 6 kbps ASCII driver printer driver Max cable length 1 200 ...

Страница 22: ...Product Description 1 4 Properties of the serial interface PtP coupling and configuration of CP 340 22 Manual 04 2011 A5E00369892 03 ...

Страница 23: ...erred via serial interface Serial Transmission In serial transmission the individual bits of each byte of information are transmitted one after the other in a fixed order Unidirectional Bidirectional Data Traffic The CP 340 itself handles data transmission with communication partners via the serial interface The CP 340 is equipped with three different drivers for this purpose Unidirectional data t...

Страница 24: ... You can choose between half duplex operation RS 485 and full duplex operation RS 422 when using the CP 340 RS 422 485 module variant Asynchronous Data Transmission With the communications processor serial transmission occurs asynchronously The so called timebase synchronism a fixed timing code used in the transmission of a fixed character string is only upheld during transmission of a character E...

Страница 25: ... format you require using the CP 340 Point to Point Communication Parameter Assignment parameterization interface 10 Bit Character Frame The figure below shows the three possible data formats for an 10 bit character frame 6LJQDO VWDWXV 6LJQDO VWDWXV 6LJQDO VWDWXV VWDUW ELW GDWD ELWV VWRS ELWV VWDUW ELW GDWD ELWV SDULW ELW VWRS ELW VWRS ELW VWDUW ELW GDWD ELWV GDWD ELWV VWDUW ELW GDWD ELWV VWRS ELW...

Страница 26: ...ts for an 11 bit character frame 6LJQDO VWDWXV 6LJQDO VWDWXV 6LJQDO VWDWXV VWDUW ELW GDWD ELWV SDULW ELW VWRS ELWV VWDUW ELW GDWD ELWV SDULW ELW VWRS ELW VWDUW ELW GDWD ELWV VWRS ELWV GDWD ELWV VWDUW ELW GDWD ELWV SDULW ELW VWRS ELWV 6LJQDO VWDWXV GDWD ELWV VWDUW ELW GDWD ELWV SDULW ELW VWRS ELW 6LJQDO VWDWXV GDWD ELWV VWDUW ELW GDWD ELWV VWRS ELW 6LJQDO VWDWXV 1 2 8 9 10 11 1 2 9 10 11 1 2 9 11 1...

Страница 27: ...guration of CP 340 Manual 04 2011 A5E00369892 03 27 Character Delay Time The figure below shows the maximum time permitted between two characters received within a telegram This is known as the character delay time 6LJQDO 7LPH W KDUDFWHU GHOD WLPH QWK FKDUDFWHU Q WK FKDUDFWHU Figure 2 3 Character Delay Time ...

Страница 28: ...Data Transmission All communication partners must adhere to a fixed set of rules for handling and implementing data traffic Such rules are called protocols Protocol A protocol defines the following points Operating mode Half duplex or full duplex operation Initiative Which communication partners can initiate the transmission and under what conditions Control characters Which control characters are...

Страница 29: ...ween two partners 4 Transport layer Error recognition procedure Debugging Handshaking 5 Session layer Establishing communication Communication control Terminating communication 6 Presentation layer Conversion of the standard form of data representation of the communication system into a device specific form data interpretation rules 7 Application layer Defining the communication task and the funct...

Страница 30: ...OD HU 7KH GDWD E WHV DUH WUDQVPLWWHG ZLWK 5 6WDUW DQG VWRS ELWV DUH DGGHG LQ WKH HYHQW RI DQ HUURU WKH WUDQVPLVVLRQ PD EH UHSHDWHG 3K VLFDO D HU HILQLQJ WKH SK VLFDO WUDQVPLVVLRQ RI GDWD E WHV Figure 2 4 Position of the Supplied Protocols of the CP 340 in the ISO Reference Model Transmission Integrity with the Printer Driver Data Integrity When Using the Printer Driver No data integrity precaution...

Страница 31: ...ty with the 3964 R Procedure The Hamming distance with the 3964 R is 3 This measures the integrity of data transmission The 3964 R procedure ensures high transmission integrity on the data line This high integrity is achieved by means of a fixed message frame set up and clear down as well as the use of a block check character BCC Two different procedures for data transmission can be used either wi...

Страница 32: ... complete and without errors The control characters of the 3964 R Procedure The 3964 R procedure analyzes the following control codes STX Start of Text Start of the string to be transmitted DLE Data Link Escape Data Link Escape ETX End of Text End of string to be transmitted BCC Block Check Character only with 3964R Block Check Character NAK Negative Acknowledgement Negative Acknowledgement Note I...

Страница 33: ...l sending of a block check character BCC ඎ 25 25 25 25 ඎ ඎ ඎ ඎ ඎ ඎ 67 7 DWD 0HVVDJH IUDPH Figure 2 5 Block Checksum The block checksum is the even longitudinal parity EXOR operation on all data bytes of a sent or received block Its calculation begins with the first byte of user data first byte of the message frame after the connection setup and ends after the DLE ETX code on connection release Not...

Страница 34: ...code STX If the communication partner responds with the DLE code before the acknowledgment delay time expires the procedure switches to send mode If the communication partner answers with NAK or with any other control code except for DLE or the acknowledgment delay time expires without a response the procedure repeats the connection setup After the defined number of unsuccessful connection attempt...

Страница 35: ...h the connection setup STX Once the contents of the buffer have been sent the procedure adds the codes DLE ETX and with the 3964R only the block checksum BCC as the end identifier and waits for an acknowledgment code If the communication partner sends the DLE code within the acknowledgment delay time the data block has been received without errors If the communication partner responds with NAK any...

Страница 36: ...s Yes Yes Yes With NAK Yes Intercom ja Yes Yes Yes No No Yes No No Send NAK No No faulty not DLE or STX No A A m ax W W m ax No Send request Sending with procedure 3964 R Send STX Send NAK Add QVZ Character received Send character with DLE doubling Own priority high Initialization conflict own priority low QVZ expired More characters to send Send DLE ETX Send BCC Add QVZ With BCC 3964 R Faulty not...

Страница 37: ...nsmission 2 4 Data Transmission with the 3964 R Procedure PtP coupling and configuration of CP 340 Manual 04 2011 A5E00369892 03 37 C Counter for connection attempts R Counter for retries D Default state W Waiting for character reception ...

Страница 38: ...except for STX or NAK it waits for the character delay time to expire then sends the code NAK receiving data If the procedure receives the STX code and an empty receive buffer is available it responds with DLE Incoming receive characters are now stored in the receive buffer If two consecutive DLE codes are received only one of these is stored in the receive buffer After each receive character the ...

Страница 39: ... the function block P_RCV output parameter STATUS When the 3964 procedure detects a DLE ETX character string it stops receiving and confirms that the block has been successfully received by sending a DLE character to the communication partner When errors are found in the received data it outputs a NAK signal to the communication partner A repetition is then expected If the 3964R procedure detects ...

Страница 40: ...cedure 3964 R part 1 Character not equal to STX or faulty character Send request NAK or BREAK Waiting for character time delay Send NAK Initialization conflict own priority low STX received after expected repeat Yes Add waiting time to free receiving buffer No Has waiting time of 400 ms expired No Send NAK Send DLE Is receiving buffer free Waiting 50 ms G 1 STX G 2 3 4 W 0 W 1 Figure 2 9 Flow diag...

Страница 41: ...LE doubling No Yes No Yes No Initialization conflict own priority low Yes Yes No No no errors not DLE Add character delay time Character received Note NAK faulty DLE combination not permitted Yes No with BCC 3964 R Add character delay time BCC received BCC correct NAK noted Character delay time expired Send NAK Send NAK W W max Add repeat time STX received Repeat time expired Receiving with proced...

Страница 42: ...f Serial Data Transmission 2 4 Data Transmission with the 3964 R Procedure PtP coupling and configuration of CP 340 42 Manual 04 2011 A5E00369892 03 R Counter for retries D Default state W Waiting for character reception ...

Страница 43: ... 3RV DFNQRZOHGJPHQW RQQHFWLRQ VHWXS 8VHU GDWD RQQHFWLRQ UHOHDVH 5HFHLYLQJ GDWD 1HZ VHWXS DWWHPSW Figure 2 11 Data traffic when receiving errored data When DLE ETX BCC is received the CP 340 compares the BCC of the communication partner with its own internally calculated value If the BCC is correct and no other receive errors occur the CP 340 responds with DLE Otherwise it responds with an NAK and ...

Страница 44: ...LRQ VHWXS 8VHU GDWD RQQHFWLRQ UHOHDVH Figure 2 12 Data traffic during an initialization conflict If a device responds to the communication partner s send request code STX within the acknowledgment delay time by sending the code STX instead of the acknowledgment DLE or NAK an initialization conflict occurs Both devices want to execute a send request The device with the lower priority withdraws its ...

Страница 45: ...e high repetition frequency balances this out however In this case you are advised to check the transmission link for possible sources of interference because frequent repetitions reduce the user data rate and integrity of the transmission The disturbance could also be caused however by a malfunction on the part of the communication partner If the receive line is interrupted the system program rep...

Страница 46: ... all other characters from 00 through FFH with 8 data bit character frames or from 00 through 7FH with 7 data bit character frames to be sent and received 2 5 1 RS 232C accompanying signals RS 232C accompanying signals The following RS 232C accompanying signals are available on the CP 340 RS 232C DCD input Data carrier detect Data carrier detected DTR output Data terminal ready CP 34x ready for op...

Страница 47: ...evaluating RS 232C accompanying signals Automatic control of accompanying signals Automatic control of RS 232C accompanying signals on the CP 340 is implemented as follows As soon as the CP 340 is configured 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 340 ready for operation This prevents the transfer of t...

Страница 48: ...rom ON to OFF The message DSR OFF automatic use of V24 signals is entered in the diagnostic buffer of the CP 340 Note When automatic control of the RS 232C accompanying signals is configured neither RTS CTS data flow control nor RTS and DTR control by means of the V24_SET FC are possible Timing diagram The figure illustrates the chronological sequence of a send job 576 2 21 76 21 7 576 21 76 21 76...

Страница 49: ...ner ignores this state and continues transmission an error message is generated if the receive buffer overflows The data received in the last telegram will be discarded As soon as a telegram is fetched by the S7 CPU and the receive buffer is ready to receive the CP 340 sends the XON character or sets the RTS line to ON The CP 340 interrupts transmission if it receives the XOFF character or when co...

Страница 50: ...eiving data the ASCII driver will pause between two frames even when sending You can call the P_SEND FB at any time but the ASCII driver does not begin its output until a period longer than the parameterized character delay time has elapsed since the last frame was sent Note When XON XOFF flow control is parameterized the user data must not contain the parameterized XON or XOFF characters The defa...

Страница 51: ...ssage is defined by a pause on the line expiration of character delay time On Receipt of End Character s The end of the message frame is marked by one or two defined end of text characters On Receipt of Fixed Number of Characters The length of the receive message frames is always identical Code transparency The code transparency of the procedure depends on the choice of configured end criterion an...

Страница 52: ...he end of the message frame is not falsely identified whenever the partner in the link takes a send pause within a message frame The figure below illustrates a receive operation with the end criterion Expiration of character delay time DLWLQJ IRU FKDUDFWHU KDUDFWHU DUULYHG KDUDFWHU UHFHLYHG ZLWK FKDUDFWHU GHOD WLPH PRQLWRULQJ 0HVVDJH IUDPH HQWHUHG LQ UHFHLYH EXIIHU UURU HQWHUHG LQ UHFHLYH EXIIHU D...

Страница 53: ... the message frame fragment is discarded If you are working with end of text characters transmission is not code transparent and you must make sure that the end code s do not appear in the user data of the user The figure below illustrates a receive operation with the end criterion End of text character DLWLQJ IRU FKDUDFWHU KDUDFWHU UHFHLYHG ZLWK HQG FRQWURO DQG FKDUDFWHU GHOD WLPH 0HVVDJH IUDPH H...

Страница 54: ...ceive operation is terminated An error message is issued and the message frame fragment is discarded The figure below illustrates a receive operation with the end criterion Fixed message frame length DLWLQJ IRU FKDUDFWHU KDUDFWHU UHFHLYHG ZLWK OHQJWK FRQWURO DQG FKDUDFWHU GHOD WLPH 0HVVDJH IUDPH HQWHUHG LQ UHFHLYH EXIIHU 0HVVDJH IUDPH FRPSOHWH KDUDFWHU DUULYHG KDUDFWHU GHOD WLPH H SLUHG DLWLQJ IRU...

Страница 55: ...mber of buffered received telegrams The receive buffer on the CP 340 is a ring buffer If multiple telegrams are written to the CP 340 s receive buffer The CP 340 always sends the oldest telegram to the CPU If you only ever want to transfer the last telegram received to the CPU you must assign the value 1 for the number of buffered telegrams and deactivate overwrite protection Note If continuous re...

Страница 56: ...exts You can configure message texts with variables and control statements e g for bold condensed expanded or italic type and underlining Each message text is assigned a number during configuration A message text is printed if its number is specified in a format string when the P_PRINT function block is called You must have stored the format string and variables in data blocks beforehand see Chapt...

Страница 57: ...ge text number x where x is the value of a variable see example 2 below There must be one and only one conversion statement for each variable in the format string or configured message text The conversion statements are applied to the variables in the sequence in which they occur Control statements with control characters for bold condensed expanded italic and underlining e g B bold type on or wit...

Страница 58: ...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 see Chapter Using function blocks for the output of message texts to a printer Page 113 During output the data is edited for printing Print editing is performed as configured in the CP 340 Point t...

Страница 59: ... message texts with data flow control during printout There are essentially two types of handshaking Software handshaking e g XON XOFF Hardware handshaking e g RTS CTS Data flow control is implemented as follows on the CP 340 during printout As soon as the CP 340 is switched to the operating mode with flow control by means of parameterization it sends the XON character or sets the RTS line to ON C...

Страница 60: ... The printer indicates to the CP 340 that it is ready to receive CP 340 20mA TTY current on RxD line CP 340 RS 232C and CP 340 RS 422 485 CTS signal ON Note When RTS CTS flow control is parameterized you must set the polarity of the BUSY signal on the printer as follows BUSY signal CTS OFF Please note that some printers use the DTR signal to display the BUSY signal In such cases you must wire the ...

Страница 61: ...re ASCII driver and printer driver 2 7 1 Basic parameters of the CP 340 Introduction You can define in this parameter whether the CP 340 is to generate a diagnostics interrupt when fatal errors occur Basic Parameters Enter the basic parameter using the STEP 7 dialog Properties CP 340 Double click on the CP 340 in the STEP 7 configuration table to open the dialog Chapter Parameterizing the Communic...

Страница 62: ...nt Communication Parameter Assignment user interface you can specify the parameters for the physical layer layer 1 and for the data connection layer layer 2 of the 3964 R procedure You will find a detailed description of the parameters below The section Parameterizing the Communications Protocols Page 94 describes how to enter the parameter assignment data using the CP 340 Point to Point Communica...

Страница 63: ...ps receiving If the BCC is correct and no other receive errors have occurred the CP 340 sends the code DLE to the communication partner If the BCC is correct and no other receive errors have occurred the CP 340 sends the DLE code to the communication partner the NAK code is sent if an error occurs 3964 assignable without block check The protocol parameters are freely programmable If the CP 340 rec...

Страница 64: ...r termination time between DLE ETX and partner s DLE acknowledgment 10 ms to 65530 ms in 10 ms increments 2000 ms 550 ms for 3964 without block check Connection attempts This parameter defines the maximum number of attempts the CP 340 is allowed in order to establish a connection 1 to 255 6 Transmission attempts The parameter defines the maximum number of attempts to transfer a message frame inclu...

Страница 65: ...tivate BREAK monitoring You can choose whether monitoring for an interrupted receive line should be activated or deactivated If BREAK monitoring is deactivated in the event of a BREAK No entry will be made in the diagnostic buffer nor will the RECV FB be activated with set ERROR bit and corresponding STATUS entry Activated send jobs will be sent without an error message being generated for the use...

Страница 66: ...ignment interface specify the parameters for the physical layer layer 1 of the ASCII driver You will find a detailed description of the parameters below The section Parameterizing the Communications Protocols Page 94 describes how to enter the parameter assignment data using the CP 340 Point to Point Communication Parameter Assignment interface X27 RS 422 485 interface Please note the following wi...

Страница 67: ...ter delay time defines the maximum permissible time interval between 2 characters received consecutively 1 4 ms to 65 535 ms 4 ms End of text character 1 2 First end code At 7 data bits 0 to 7FH Hex 3 8 data bits 0 to FFH hex 3 3 End of text character 2 2 Second end code if specified At 7 data bits 0 to 7FH Hex 3 8 data bits 0 to FFH hex 3 0 Message frame length when received 4 When the end criter...

Страница 68: ...rity bit The addition of its value 0 or 1 brings the value of all the bits up to a defined status This improves data integrity A parity of none means that no parity bit is sent Any parity indicates that the CP 340 has set the send parity to a value of 0 Parity is not checked when data is received None Odd Even Any Even Depending on the HW variant used and the operating mode selected RS 232 Yes TTY...

Страница 69: ...7 data bits 0 to 7FH hex 2 8 data bits 0 to FFH hex 2 DC3 Waiting for XON after XOFF wait time for CTS ON 3 Period of time for which the CP 340 should wait for the XON code or for CTS ON of the communication partner when sending 20 ms to 65530 ms in 10 ms increments 20 ms Time to RTS off Only with automatic control of RS 232C accompanying signals Time to wait following transfer before the CP 340 s...

Страница 70: ...d be sent to the CPU Yes No Yes Buffered receive message frames Where the buffering of multiple message frames is concerned CP 340 works in accordance with the FIFO principle when transferring message frames to the CPU ring buffer You can specify the number of received message frames to be buffered in the CP receive buffer If you specify 1 here and deactivate the following parameter prevent overwr...

Страница 71: ...to be run in full duplex mode RS 422 or half duplex mode RS 485 see Chapter Serial Transmission of a Character Page 23 Full duplex RS 422 four wire mode Half duplex RS 485 two wire mode Full duplex RS 422 four wire mode Receive line initial state This initial state corresponds to idle state no senders active in half duplex RS 485 two wire mode R A 5V R B 0V R A 0V R B 5V R A 5V R B 0V Receive line...

Страница 72: ...Baud rate Character frame The table below contains descriptions of and specifies ranges of values for the relevant parameters Table 2 11 Baud rate Character frame printer driver Parameter Description Range of values Default value Baud rate Data transmission rate in bps 2400 4800 9600 9600 Start bit During transmission a start bit is prefixed to each character to be sent 1 fixed value 1 Data bits N...

Страница 73: ... the Interface folder 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 on the RS 232C interface Table 2 12 Data flow control printer driver Parameter Description Range of values Default value Data flow control Defines which data flow control proced...

Страница 74: ...al state does not support break detection R A 5V R B 0V R A 0V R B 5V R A 5V R B 0V Page layout The table below contains a description of the parameters for the page layout Table 2 14 Page layout printer driver Parameter Description Range of values Default value Left margin number of characters Number of spaces to precede each line in the body of the text header or footer It is up to you to ensure...

Страница 75: ...ters ASCII characters text P output conversion statement for page numbers max 60 characters Character set The table below contains a description of the parameters for the character set Table 2 15 Character set printer driver Parameter Description Range of values Default value Printer character set Set IBM to convert the set Windows ANSI character set into the printer character set If you set User ...

Страница 76: ...P 340 serial interface must be saved to a text SDB for parameter assignment You can also save configured message texts to an external text file ASCII characters max 8 characters Version number Version number of the text SDB text file 1 to 255 9 Message texts All the message texts stored in the text block are displayed here together with their message text numbers you can change a selected message ...

Страница 77: ...the CP 340 Point to Point Communication Parameter Assignment user interface Format string The figure illustrates the structure of the format string schematically A format string can contain normal text and or conversion statements for variables and or control instructions Normal text conversion statements and control instructions can occur in any sequence in the format string There must be one and...

Страница 78: ...are possible blanks may be added before right justified output or after left justified output Precision Precision is only relevant to display types A D F and R It is ignored otherwise Without Output in the standard representation see table below 0 No output of decimal points and decimals in real R and floating point F format n Output of decimal point and n 1 to 99 significant decimal positions in ...

Страница 79: ... OF BYTE A B AB ABCD ABCDE ABCDE 1 2 4 Alphanumeric characters D DATE WORD 1996 06 10 American 10 Date format according to ICE 61131 3 F REAL DWORD 0 123456 8 Floating point without exponent H All data types incl ARRAY OF BYTE In accordance with the data type In accordance with the data type Hexadecimal format I INT WORD DINT DWORD 32767 2147483647 Max 6 Max 11 Integer range N 1 WORD text number M...

Страница 80: ...d in the format string P is not permitted in configurable message texts 3 The current time and date must be read first by means of the SFC 1 READ_CLOCK system function and stored in the user memory bit memory data Output by means of message text number N Use the N display type to start printing message texts stored on the CP 340 The conversion statement variable contains the number of the message ...

Страница 81: ...ength of the data to be printed depends on the length of the variables For example in the case of the I display type a maximum of 6 characters can be output for the INT data type and a maximum of 11 characters for the DINT data type A width of 0 is not permissible in conversion statements This is printed out as with the valid conversion statement If the specified width is too small in the case of ...

Страница 82: ...e 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 Example 2 Format string 4 1I Variable 1 12 345 DEC Error The selected width was too small for the variable value to be output The precision is not relevant to display type I Example 3 96 10 3 F...

Страница 83: ...ed Example 2 12345 Format string 6I Variable 1 12 345 DEC The selected width was one character greater than the variable value to be output left justified formatting Example 3 12d_0h_0m_23s_348ms Format string T Variable 1 T 12D23S348MS The IEC time is in the standard format unspecified time units are inserted with zeros Example 4 1 234560E 02 Format string 12 6R Variable 1 123 456 A width of 12 i...

Страница 84: ...before parameterizing the CP 340 The figure illustrates the structure of the control instruction schematically 8 2XWSXW RI WKH FKDUDFWHU VWDQGDUG FRQWURO VWDWHPHQW 2XWSXW RI WKH FKDUDFWHU 6ZLWFK RQ ROG W SH RQGHQVHG W SH SDQGHG W SH WDOLF W SH 6PDOO FDSLWDOV 8QGHUOLQLQJ 6ZLWFK RII Figure 2 22 Schematic structure of control instructions Examples Below are some examples with control instructions Exa...

Страница 85: ... x control instruction cancels the line break after a message text This means that you can print several message texts in a single line in order for example to display more variables in a line The x control instruction is appended at the end of the format string Example The level 200 l was reached at 17 30 hours Format string The level i l was reached at Z hours x Variable 1 time Variable 2 level ...

Страница 86: ...Basic Principles of Serial Data Transmission 2 7 Parameterization Data PtP coupling and configuration of CP 340 86 Manual 04 2011 A5E00369892 03 ...

Страница 87: ... automation system You can find a detailed description in Section Mounting the CP 340 Page 89 of this manual Configuring the communication processor The CP configuration includes its entry in the configuration table Configure your CP using STEP 7 software You can find a detailed description in Section Configuring the CP 340 Page 96 of this manual Assigning the communication processor parameters Pa...

Страница 88: ...n find a detailed description in Section Managing the Parameter Data Page 97 of the manual Creating a user program for the CP CP programming includes the connection of the CP to the associated CPU using the STEP 7 user program Program your CP using the language editors of the STEP 7 software A comprehensive programming example is available in the chapter Programming Example for Standard Function B...

Страница 89: ...ations modules can be inserted to the right of the CPU The number of pluggable communications modules is limited by the current consumption of the CP 340 from the S7 300 backplane bus depending on CPU and IM and by the expandability of the CPU for instance CPU 312 IFM in first tier or of the ET 200M IM 153 in a distributed configuration single tier mounting only Note The CP 340 can be operated in ...

Страница 90: ... unplug the cable to the integrated submodule on the CP 340 at any time However you must make sure that no data are being transmitted at the integrated interface when you do so otherwise data may be lost 4 2 1 Installation steps How to install the CP 340 in a rack To insert the CP 340 in a rack proceed as follows 1 Switch the CPU to STOP mode 2 A bus connector is supplied with the CP 340 Plug this...

Страница 91: ...892 03 91 4 2 2 Removal steps To remove the CP 340 To dismount the CP 340 from the rack proceed as follows 1 Switch the CPU to STOP mode 2 Open the front panel doors 3 Detach the sub D connector from the integrated interface 4 Undo the fastening screw on the module 5 Swing the module off the rail then take it out of the PLC ...

Страница 92: ...Mounting the CP 340 4 2 Installing and removing the CP 340 PtP coupling and configuration of CP 340 92 Manual 04 2011 A5E00369892 03 ...

Страница 93: ...mA TTY 6ES7 340 1BH00 0AE0 CP 340 RS 422 485 6ES7 340 1CH00 0AE0 As of V3 0 As of V3 0 CP 340 RS 232C 6ES7 340 1AH02 0AE0 CP 340 20mA TTY 6ES7 340 1BH02 0AE0 CP 340 RS 422 485 6ES7 340 1CH02 0AE0 as of version V5 1 5 As of V5 0 You can also use the parameter assignment user interface as of V3 0 to configure this module although you will then only be able to parameterize the drivers integrated into...

Страница 94: ...0 Point to Point Communication Parameter Assignment is installed on the PG PC under STEP 7 Parameter assignment The expression parameter assignment is used in the following to describe the setting of protocol specific parameters and the configuration of message texts This is done using the CP 340 Point to Point Communication Parameter Assignment user interface Double click the CP 340 in the STEP 7...

Страница 95: ...gramming device PC 2 In Microsoft Windows start the dialog for installing software by double clicking the Add and Remove Programs icon in the Control Panel 3 Select the drive from the dialog window and run the Setup exe file to start the installation procedure 4 Follow the on screen instructions provided by the setup program Further information The basic operation of the Point to Point Communicati...

Страница 96: ...u can enter the CP 340 in the configuration table of the STEP 7 software you must have created a project and a terminal with STEP 7 Configuration In the following configuration refers to the entry of the communications processor in the configuration table of the STEP 7 software In the configuration table enter the rack the slot and the order number of the communications processor STEP 7 then autom...

Страница 97: ...e configuration and parameterization data online from the programming device to the CPU menu command PLC Download The CPU accepts the parameters immediately after the download The module parameters are automatically transmitted to the communication processor When they are downloaded onto the CPU and as soon as the communication processor can be reached via the S7 300 backplane bus or When the CPU ...

Страница 98: ...cation data select PLC Module Information or Read Data Record see below Reading the identification data Users can access specific ID data by selecting Read Data Record The element of the ID data which is assigned to the corresponding index is found under the associated data record number All data records which contain ID data have a length of 64 bytes The table below shows the structure of those d...

Страница 99: ...is parameter This structure allows the unique identification of the module Hardware revision Read 2 bytes Provides information about the product version of the module Software revision Read 4 bytes Provides information about the firmware version of the module Statistical revision no Read 2 bytes Not supported Profile_ID Read 2 bytes F6 00 hex Internal parameter to PROFIBUS DP Profile specific type...

Страница 100: ... must be available on your PG PC file system Downloading firmware To update the firmware 1 Open HW Config then select the relevant CP 340 module 2 Select the menu command PLC Update Firmware For further information on procedures refer to the STEP 7 online help The system outputs a message to indicate successful completion of the update and immediately enables the new firmware After you have comple...

Страница 101: ...z Off Off Module firmware deleted firmware update was cancelled firmware update still possible Reloading the firmware Hardware error during firmware update Flashes 2 Hz Flashes 2 Hz Flashes 2 Hz Delete write operation failed Switch module power off and on and try to download the firmware again Check whether the module is defective Viewing the HW and FW versions To view the current hardware and fir...

Страница 102: ...Configuring and Parameterizing the CP 340 5 6 Download of firmware updates PtP coupling and configuration of CP 340 102 Manual 04 2011 A5E00369892 03 ...

Страница 103: ... 340 The function blocks form the software interface between the CPU and the CP 340 They must be called up cyclically from the user program Communication between CP 340 and a Communication Partner The protocol conversion takes place on the CP 340 The protocol 3964 R procedure ASCII driver or printer driver is used to adapt the CP 340 interface to that of the communication partner This enables the ...

Страница 104: ...a data block to a communication partner FB 4 P_PRINT The P_PRINT function block allows you to output a message text containing up to 4 variables to a printer FC 5 V24_STAT The V24_STAT function allows you to read the signal states at the RS 232C interface of the CP 340 RS 232C FC 6 V24_SET The V24_SET function allows you to read the signal states at the RS 232C interface of the CP 340 RS 232C Scop...

Страница 105: ...n for the internal FB sequence 6 3 1 S7 sends data to a communication partner Sending data The P_SEND FB transmits a subframe from a data block specified by the parameters DB_NO DBB_NO and LEN to the CP 340 The P_SEND FB is called statically without conditions for data transmission in the cycle or alternatively in a time controlled program The data transfer is initiated by a positive edge at the R...

Страница 106: ...ck P_SEND does not have a parameter check that is if there are invalid parameters the CPU branches to the STOP mode Before the CP 340 can process an activated request after the CPU has changed from STOP to RUN mode the CP CPU startup mechanism of the P_SEND function block must have been completed see Chapter General Information on Program Processing Page 124 Any requests initiated in the meantime ...

Страница 107: ...able below lists the parameters of P_SEND FB 3 Table 6 2 P_SEND FB 3 parameters Name Type Data type Comment Permitted values comment REQ INPUT BOOL Initiates request at positive edge R INPUT BOOL Cancels request Current request is aborted Sending is locked LADDR INPUT INT Basic address of CP 340 The start address is taken from STEP 7 DB_NO INPUT INT Data block number Send DB no CPU specific zero n...

Страница 108: ... and ERROR parameters depending on how the REQ and R inputs are wired 5 4 5 21 5525 6HQGLQJ UHTXHVW 7HUPLQDWLRQ ZLWKRXW HUURU 7UDQVIHU 5 6 7 7UDQVIHU 5 6 7 7HUPLQDWLRQ ZLWKRXW HUURU 5HTXHVW LV QRW H HFXWHG 6HQGLQJ LV WXUQHG RII 7HUPLQDWLRQ ZLWK HUURU VW QWK 6 1 SDUW Figure 6 1 Time Sequence Chart for P_SEND FB 3 Note The REQ input is edge triggered A positive edge at the REQ input is sufficient Th...

Страница 109: ...parameter the current send job is aborted and the P_RCV FB is set to the initial state Receiving is disabled as long as the signal state at the R parameter is 1 If the signal state returns to 0 the canceled message frame is received again from the beginning The LADDR parameter defines the CP 340 to be addressed The NDR output shows Request completed without errors data accepted all data read ERROR...

Страница 110: ...piler uses the binary result BR The binary result is set to signal state 1 if the block was terminated without errors If there was an error the BR is set to 0 Assignment in the data area The P_RCV FB works together with an Instance DB for I_RCV The DB number is specified in the call The instance data block is 40 bytes long Access to the data in the instance DB is not permitted Note Exception If th...

Страница 111: ... The start address is taken from STEP 7 DB_NO INPUT INT Data block number Receive DB No CPU specific zero is not permitted DBB_NO INPUT INT Data byte number 0 DBB_NO 8190 Received data as of data byte NDR 1 OUTPUT BOOL Request completed without errors data accepted STATUS parameter 16 00 ERROR 1 OUTPUT BOOL Request completed with errors Error information is written to the STATUS parameter LEN 1 OU...

Страница 112: ...arameters NDR LEN and ERROR depending on how the EN_R and R inputs are wired 1 5 1B5 5 5525 QDEOH UHFHLYH 7HUPLQDWLRQ ZLWKRXW HUURU 5HFHLYLQJ 7HUPLQDWLRQ ZLWK HUURU 5HFHLYLQJ LV VZLWFKHG RII 1RW UHFHLYLQJ 5 6 7 7HUPLQDWLRQ ZLWKRXW HUURU 5HFHLYLQJ 7HUPLQDWLRQ ZLWK HUURU 1 OHQJWK Figure 6 2 Time Sequence Chart FB_2_P_RCV Note The EN_R input must be set statically to 1 The EN_R parameter must be supp...

Страница 113: ...lically or alternatively statically without conditions in a time controlled program The pointers to data blocks for the format string and the four variables can be reached by means of the DB_NO and DBB_NO parameters The pointers must be stored without gaps and in a specific sequence in the configured data block This is the pointer DB see Figure Pointer DB The transmission of the message text is in...

Страница 114: ...es not have a parameter check which means that if there are invalid parameters the CPU may switch to STOP mode Before the CP 340 can process an activated request after the CPU has changed from STOP to RUN mode the CP CPU startup mechanism of the P_PRINT function block must have been completed see Chapter General Information on Program Processing Page 124 Any requests initiated in the meantime do n...

Страница 115: ...P_SEND P_RCV and P_PRINT Page 134 For detailed information refer to Calling variable SFCERR or SFCSTATUS Assignment in the data area pointer DB The P_PRINT FB 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 order You have to create the pointer DB The figure shows the structure of t...

Страница 116: ...ssible Length The entry length in the pointer DB is to be set for each display type data type independently from the precision used FB 4 P_PRINT Parameters The table below lists the parameters of the P_PRINT function block FB 4 Table 6 4 FB 4 P_PRINT Parameters Name Sort Data type Comment Permitted values comment REQ INPUT BOOL Initiates request on positive edge R INPUT BOOL Cancels request Curren...

Страница 117: ... parameters depending on how the REQ and R inputs are wired 6HQGLQJ UHTXHVW RPSOHWLRQ ZLWKRXW HUURUV VW QWK 35 17 SDUW 5 6 7 WUDQVPLWWHG RPSOHWLRQ ZLWK HUURUV 5 6 7 WUDQVPLWWHG RPSOHWLRQ ZLWKRXW HUURUV 35 17 UHTXHVW LV QRW H HFXWHG VHQGLQJ LV GLVDEOHG 5 4 5 21 5525 Figure 6 4 Time Sequence Chart for FB 4 P_PRINT Note The REQ input is edge triggered A positive edge at the REQ input is sufficient It...

Страница 118: ...S 232C secondary signals from the CP 340 and makes them available to the user in the block parameters The V24_STAT FC is called statically without conditions for data transmission in the cycle or alternatively in a time controlled program The RS 232C secondary signals are updated each time the function is called cyclic polling The CP 340 updates the status of the inputs outputs in a timebase of 20...

Страница 119: ...artner Assignment in the data area The function V24_STAT FC does not occupy any data areas V24_STAT FC 5 parameters The table below lists the parameters of the V24_STAT function FC 5 Table 6 5 V24_STAT FC 5 parameters Name Type Data type Comment Permitted values remark LADDR INPUT INT CP 340 base address The base address is taken from STEP 7 DTR_OUT OUTPUT BOOL Data terminal ready CP 340 ready CP ...

Страница 120: ...4_SET LADDR RTS DTR 1 12 5 576 75 9 B6 7 Note The EN and ENO parameters are only present in the graphical representation LAD or FBD To process these parameters the compiler uses the binary result The binary result is set to signal state 1 if the block was terminated without errors If there was an error the binary result is set to 0 Assignment in the data area The V24_SET function does not occupy a...

Страница 121: ...was an error the corresponding event number is displayed in STATUS If no error arises the STATUS has the value 0 If an error arises the binary result BR is reset If the block is terminated without errors the binary result has the status 1 Note The P_RESET FB function block does not have a parameter check which means that if there are invalid parameters the CPU may switch to STOP mode STL represent...

Страница 122: ... the SFCERR or SFCSTATUS variable for more information P_RESET FB parameters The table below lists the parameters of the P_RESET FB Table 6 7 P_RESET FB parameters Name Type Data type Description Permitted values remark REQ INPUT BOOL Initiates job on positive edge LADDR INPUT INT CP 340 base address The base address is taken from STEP 7 DONE 1 OUTPUT BOOL Job completed without errors STATUS param...

Страница 123: ...NE and ERROR parameters depending on the input circuit of REQ 5 4 21 5525 HOHWH UHFHLYH EXIIHU 7HUPLQDWLRQ ZLWKRXW HUURU 5 6 7 WUDQVIHUUHG 7HUPLQDWLRQ ZLWK HUURU 5 6 7 WUDQVIHUUHG 7HUPLQDWLRQ ZLWKRXW HUURU Figure 6 5 Time sequence chart for the P_RESET FB Note The REQ input is edge triggered A positive edge at the REQ input is adequate It is not required that the RLO result of logical operation is...

Страница 124: ... CPU and the CP 340 has been established the CP 340 must be initialized For each function block P_SEND P_RCV P_PRINT there is a separate start up coordination Before requests can be actively processed the accompanying start up procedure must be completed Disable interrupts The interrupts are not disabled in the function blocks Interrupt behavior The CP 340 module can trigger a diagnostics interrup...

Страница 125: ...4 2 Minimum number of CPU cycles The table below describes the minimum number of CPU cycles FB FC calls required to process a minimum job 14 bytes SEND 13 bytes RECEIVE for the quantity of user data transported per program cycle This only applies in centralized operation Table 6 9 Minimum number of CPU cycles Number of CPU cycles for processing Termination without error Termination with error RESE...

Страница 126: ...or SFB53 WRREC that are supported by the latest CPU versions only This conversion was necessary because the old system calls SFC58 WR_REC and SFC59 RD_REC are not suitable for operation following an IE PB link or a PROFINET header Users with older CPU versions that do not support SFB52 RDREC or SFB53 WRREC yet will find the older versions of FB2 FB3 and FB4 with the designations FB102 P_RCV_OLD2 F...

Страница 127: ...e g break invalid parameter Assignment of new parameters For new parameterization the protocol driver is initialized The SF LED is on during new parameterization Sending and receiving are not possible and send and receive frames stored in the CP 340 are lost when the driver is subjected to a warm restart Communication between the CP and the CPU is restarted active frames are cancelled At the end o...

Страница 128: ... default parameters the interface parameters are given preset values at the factory of the module As soon as the initialization is complete the CP 340 automatically starts up with the 3964R driver with block check by default The CP 340 is now ready for operation Parameterization During parameterization the CP 340 receives the module parameters assigned to the current slot which were generated usin...

Страница 129: ...ive buffer is full CPU Startup At start up the CPU sends off the parameters generated with CP 340 Point to Point Communication Parameter Assignment parameterization interface The CP 340 only reparameterizes if the parameters have changed Through appropriate parameterization with the parameterizing software you can have the receive buffer on the CP 340 deleted automatically at CPU start up CPU RUN ...

Страница 130: ...es the receive buffer on the CP 340 is automatically deleted when the CPU mode changes from STOP to RUN If you select no as many message frames as you have parameterized are stored in the CP 340 receive buffer 1 to 250 If the CPU changes to STOP mode during transmission CP CPU the P_RCV FB reports the error current program interrupted request aborted due to BREAK restart reset after restart If Del...

Страница 131: ...he FBs The P_SEND P_RCV and P_PRINT function blocks have a STATUS output for error diagnostics Reading the STATUS output of the function blocks gives you information on errors which have occurred during communication You can evaluate the STATUS output in the user program see Chapter Diagnostics Messages of the Function Blocks P_SEND P_RCV and P_PRINT Page 134 The CP 340 also enters the diagnostic ...

Страница 132: ... the CP 340 s errors are entered in its diagnostic buffer In the same way as with the diagnostic buffer of the CPU you can also use the STEP 7 information functions on the programming device to display the user relevant information of the CP diagnostic buffer see Chapter Diagnostics by means of the diagnostic buffer of the CP 340 Page 144 ...

Страница 133: ...ing active lights up when the CP 340 is receiving user data via the interface Group error LED SF The group alarm LED SF always lights up after POWER ON and goes out after initialization If parameterization data has been generated for the CP 340 the SF LED again lights up briefly during reparameterization The group alarm LED SF lights up whenever the following occur Hardware faults Firmware errors ...

Страница 134: ...is used Numbering scheme for event class event number The figure below illustrates the structure of the STATUS parameter 67 786 LW 1R YHQW QXPEHU HUURU QXPEHU YHQW FODVV 6SDUH Figure 8 1 Structure of the STATUS parameter Example The figure below illustrates the content of the STATUS parameter for the Job aborted due to warm restart hot restart or reset event event class 1EH event number 0DH 67 786...

Страница 135: ...iables You have configured more variables than conversion statements Variables without associated conversion statements will not be output 05 0AH Only for printer drivers Unknown conversion statement Check the conversion statement Undefined or unsupported conversion statements are replaced in the printout with 05 0BH Only for printer drivers Unknown control statement Check the control statement Un...

Страница 136: ...ram or The partner requested a repetition by means of a negative acknowledgment character NAK A repetition is not an error but it can indicate that there is interference on the data link or the partner device has malfunctioned If the telegram still has not been transmitted after the maximum number of repetitions an error number is output that describes the first error that occurred 07 02H Only for...

Страница 137: ... e g break in the transmission line fatal errors are pending or the partner device has malfunctioned You may need to use an interface test device FOXPG interconnected in the data link to check this 07 07H Only for 3964 R Acknowledgment delay time exceeded at end of connection or response monitoring time exceeded after a send telegram After connection termination with DLE ETX no response received f...

Страница 138: ...ether the partner always duplicates the DLE in the telegram header and data string or the connection is terminated with DLE ETX Check for malfunction of the partner device you may need to use an interface test device FOXPG interconnected in the data link 08 06H Character delay time ZVZ exceeded Two successive characters were not received within character delay time or Only for 3964 R 1 character a...

Страница 139: ...hether both devices have the same setting for baud rate parity and number of stop bits 08 0DH BREAK Break in receive line to partner Reconnect or switch on partner 08 10H Only for ASCII drivers Parity error If the SF LED red and the RxD LED green light up there is a break in the connecting cable cable break between the two communication partners Check the connecting cables of the communication par...

Страница 140: ...restart or reset 1E 0EH Static error when calling RD_REC SFC or RDREC SFB The RET_VAL return value for the SFC SFB is made available to you for evaluation in the SFCERR or SFCSTATUS variable respectively on the instance DB Load the SFCERR or SFCSTATUS variable from the instance DB 1E 0FH Static error when calling WR_REC SFC or RDREC SFB The RET_VAL return value for the SFC SFB is made available to...

Страница 141: ...ymbolic access to the corresponding function block s instance DB The error messages written to the SFCERR variable are listed in the reference manual titled System Software for S7 300 400 System and Standard Functions under the SFC 58 WR_REC and SFC 59 RD_REC system functions refer to the error information or the chapter titled Evaluating errors with the RET_VAL output parameter The error messages...

Страница 142: ...to a diagnostics interrupt the CPU reads the system specific diagnostics data and enters it in its diagnostics buffer You can read the contents of the diagnostics buffer on the CPU using a programming device If a diagnostics alarm event occurs the SF LED red lights up In addition the OB 82 is called with this diagnostics data as start information Organization block OB 82 You have the option of pro...

Страница 143: ...rror 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 System error 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Diagnosis Information in KH Format The following table shows the 4 bytes diagnosis information of the CP 340 in the KH format Event 1 1st byte 2 2nd byte 3 3rd byte 4 4th byte Wire break 25H 0CH 02H 00H Incorrect parameter 81H 0CH 00H 00H No parameter 41H 0CH 00H 00H RAM error 03H 0CH ...

Страница 144: ... CP 340 or to trace the occurrence of individual diagnostic events Note The diagnostic buffer is a ring buffer for a maximum of 9 diagnostic entries When the diagnostic buffer is full the oldest entry is deleted when a new entry is made in it The most recent entry always comes first When the power of the CP 340 is switched off the content of the diagnostic buffer is lost Reading the diagnostic buf...

Страница 145: ... the CP 340 in the configuration table 4 Select the menu command PLC Module Information Result The Module Information dialog box for the CP 340 appears The first time the dialog is called the General tab appears default setting 5 Go to the Diagnostic Buffer tab Result The latest diagnostic events of the CP 340 are displayed in plain text on the Diagnostic Buffer tab Additional information about er...

Страница 146: ...Diagnostics with the CP 340 8 4 Diagnostics by means of the diagnostic buffer of the CP 340 PtP coupling and configuration of CP 340 146 Manual 04 2011 A5E00369892 03 ...

Страница 147: ...olled and monitored using the V24_STAT and V24_SET standard functions There are two SIMATIC stations in the example because the CP 340 has to be parameterized differently for sending receiving data and for printer output 1st station Computer link with the P_SEND and P_RCV function blocks 2nd station Printing and reading and controlling RS 232C secondary signals with the P_PRINT function block and ...

Страница 148: ...ne CP 340 module with a communications partner e g a second CP or printer or you could plug in a short circuit connector i e the send line is bridged to the receive line One simulator module with inputs and outputs or alternatively one digital input module and one digital output module One programming device e g PG 740 Note You do not need the digital inputs and outputs if all functions are execut...

Страница 149: ...t to Point Communication Assigning Parameters and then download those data to the CPU You can run the program example for the computer link without making changes in the application program with 3964 R procedure ASCII driver with on expiry of character delay time end criterion ASCII driver with on receipt of fixed telegram length end criterion For the ASCII driver with the on receipt of the end ch...

Страница 150: ...ormat string and variables DB 31 DB_VAR1 DB data for variable 1 DB 32 DB_VAR2 DB data for variable 2 DB 33 DB_VAR3 DB data for variable 3 DB 34 DB_VAR4 DB data for variable 4 DB 35 DB_STRING DB data for format string FB 2 P_RCV Standard FB for receiving data FB 3 P_SEND Standard FB for sending data FB 4 P_PRINT Standard FB for outputting message FC 5 V24_STAT Standard FC for reading CP outputs FC ...

Страница 151: ... RESET_SP I 0 2 M 0 2 Start RESET SEND RESET_R I 0 3 M 0 3 Start RESET RCV I 0 4 M 0 4 Free I 0 5 M 0 5 Free REQ_SP I 0 6 M 0 6 Start SEND job EN_R_R I 0 7 M 0 7 Enable receive AUFTR_1_SP I 1 0 M 1 0 Send job selection 1 job 1 AUFTR_2_SP I 1 1 M 1 1 Send job selection 1 job 2 AUFTR_1_R I 1 2 M 1 2 Enable receipt of job selection 1 job 1 AUFTR_2_R I 1 3 M 1 3 Enable receipt of job selection 1 job 2...

Страница 152: ...END_DONE M 26 0 BOOL SEND DONE parameter SEND_ERROR M 26 1 BOOL SEND ERROR parameter SEND_BIE M 26 2 BOOL SEND Binary result RCV_NDR M 29 0 BOOL RCV NDR parameter RCV_ERROR M 29 1 BOOL RCV ERROR parameter RCV_BIE M 29 2 BOOL RCV Binary result BGADR MW 21 INT Logical base address SEND_STATUS MW 27 WORD SEND STATUS parameter RCV_STATUS MW 30 WORD RCV STATUS parameter SEND_DBNO MW 40 INT SEND DB_NO p...

Страница 153: ... 2 Start RESET PRINT I 0 3 M 0 3 Free I 0 4 M 0 4 Free I 0 5 M 0 5 Free REQ_SP I 0 6 M 0 6 Start PRINT job EN_R_R I 0 7 M 0 7 Execute SET job AUFTR_1_DR I 1 0 M 1 0 Print job selection 1 job 1 AUFTR_2_DR I 1 1 M 1 1 Print job selection 1 job 2 AUFTR_3_DR I 1 2 M 1 2 Print job selection 1 job 3 AUFTR_4_DR I 1 3 M 1 3 Print job selection 1 job 4 I 1 4 M 1 4 Free I 1 5 M 1 5 Free STEU_DTR I 1 6 M 1 6...

Страница 154: ... Symbol Address Data format Comment BGADR MW 21 INT Logical base address V24_STAT_DTR_OUT M 13 0 BOOL STAT DTR_OUT parameter V24_STAT_DSR_IN M 13 1 BOOL STAT DSR_IN parameter V24_STAT_RTS_OUT M 13 2 BOOL STAT RTS_OUT parameter V24_STAT_CTS_IN M 13 3 BOOL STAT CTS_IN parameter V24_STAT_DCD_IN M 13 4 BOOL STAT DCD_IN parameter V24_STAT_RI_IN M 13 5 BOOL STAT RI_IN parameter PRINT_DBNO MW 56 INT PRIN...

Страница 155: ...d in the example is also included Download to the CPU The hardware for the example is completely set up and the programming device is connected After the overall reset of the CPU STOP operating mode transfer the complete example to the user memory Then use the mode selector switch to change from STOP to RUN Malfunction If an error occurs during start up the cyclically processed module calls are no...

Страница 156: ...DB 35 as data DBs The standard functions V24_STAT FC 5 and V24_SET FC 6 work with FC 14 Cyclic processing is organized in FC 10 In the example the standard function blocks are parameterized partly with constants and partly with symbolically addressed actual addresses Description of point to point communication For point to point communication the input I 0 0 must be showing the signal 1 and the in...

Страница 157: ... and the format string to be sent to the CP 340 Job 1 sends the data of variables 1 to 4 and the format string Data is read as follows Variable 1 is read from DB 31 starting at data double word DBD 0 Variable 2 is read from DB 32 starting at data word DBW 0 Variable 3 is read from DB 33 starting at data word DBW 0 Variable 4 is read from DB 34 starting at data word DBW 0 Format string is read from...

Страница 158: ...e is statically 1 the sending of data has been deactivated In the example the standard function V24_STAT is also still being called cyclically The state of the CP 340 inputs outputs is displayed at output byte QB 5 Example Example of a printout with the example program for the CP 340 SIMATIC S7 CP 340 Example for print mode At 23 32 07 754 hours Level reaches upper limit At 23 32 16 816 hours Leve...

Страница 159: ...22 485 max 165 mA Operating temperature 0 C to 60 C Storage temperature 40 C to 70 C Power loss Typ 0 85 W Dimensions W x H x D 40 x 125 x 120 mm Weight 0 3 kg Display elements LEDs for transmitting TXD receiving RXD and group faults SF Supplied protocol drivers ASCII driver 3964 R driver Printer driver Transmission rate with 3964 R protocol 2400 4800 9600 19200 bps half duplex Transmission rate w...

Страница 160: ... specifications for the 20 mA TTY interface of CP 340 20mA TTY Table A 3 Technical specifications for the 20mA TTY interface Technical specifications Interface 20 mA current loop TTY 9 pin sub D socket TTY signals Two isolated 20 mA current sources receive loop RX and send loop TX and all isolated from S7 internal power supply Max transmission distance 100 m active 1000 m passive Technical specifi...

Страница 161: ... without block check character Priority low high Transmission rate 2400 4800 9600 19200 bps Character frame 10 or 11 bits Delete CP receive buffer on startup Yes no 3964 R procedure with parameter assignment Max message frame length 1024 bytes Parameter The following can be configured With without block check character Priority low high Transmission rate 2400 4800 9600 19200 bps Character frame 10...

Страница 162: ...nals Data output wait time 20 ms to 65530 ms in 10 ms increments only for automat control of V 24 signals Delete CP receive buffer on startup Yes no Number of message frames to be buffered 1 to 250 Prevent overwriting yes no only when buffered receive message frames 1 Indicator for end of receive message frame After character delay time expires On receipt of end of text character s On receipt of a...

Страница 163: ...9600 bps Character frame 10 or 11 bits Flow control None XON XOFF RTS CTS XON XOFF characters with flow control XON XOFF only Wait for XON after XOFF wait time for CTS ON 20 ms to 65530 ms in 10 ms increments Message text max 150 characters max 250 characters when variables are displayed Left margin number of blanks 0 to 255 Lines per page with header and footer 1 to 255 or 0 continuous printing S...

Страница 164: ...a SIMATIC S7 300 for example Plastic housing with halogen free flame protection highly resistant to fire Laser inscriptions i e no labels Plastics identification in accordance with DIN 54840 Fewer materials used due to size reduction fewer parts due to integration in ASICs The SIMATIC S7 300 is recyclable due to its low contaminant content Please contact a certified waste disposal company for eco ...

Страница 165: ...minals ready 5 GND Ground Signal ground GNDint 6 DSR Data Set Ready Input Ready for operation 7 RTS Request To Send Output Activate transmitter 8 CTS Clear To Send Input Ready for sending 9 RI Ring Indicator Input Receiving call View from the front Connecting cables If you make your own connecting cables you must remember that unconnected inputs at the communication partner may have to be connecte...

Страница 166: ... CP 340 S7 CP 340 CP 441 The figure below illustrates the connecting cable for a point to point connection between a CP 340 and a CP 340 CP 441 For the connecting cables you require the following female connectors At the CP 340 end 9 pin D sub socket contact with screw interlock At communication partner 9 pin D sub socket contact with screw interlock 5 7 7 5 576 76 76 576 65 75 75 65 1 1 3 DEOH W ...

Страница 167: ...n between a CP 340 and a CP 544 CP 524 CPU 928B CPU 945 CPU 948 For the connecting cables you will require the following female male connectors At the CP 340 end 9 pin D sub socket contact with screw interlock At communication partner 25 pin sub D male connector with screw locking 5 7 7 5 576 76 76 576 65 75 75 65 1 1 3 DEOH W SH RPPXQLFDWLRQ SDUWQHU 5HFHLYHU 6HQGHU 6HQGHU 5HFHLYHU DVLQJ VKLHOG DV...

Страница 168: ...nection between a CP 340 and a CP 521 SI CP 521 BASIC For the connecting cables you will require the following female male connectors At the CP 340 end 9 pin D sub socket contact with screw interlock At communication partner 25 pin sub D male connector with screw locking 3 5 7 7 5 576 76 76 576 65 75 75 65 1 1 RPPXQLFDWLRQ SDUWQHU 5HFHLYHU 5HFHLYHU 6HQGHU 6HQGHU QFORVXUH VKLHOG QFORVXUH VKLHOG DEO...

Страница 169: ...oint connection between a CP 340 and a CP 523 For the connecting cables you will require the following female male connectors At the CP 340 end 9 pin D sub socket contact with screw interlock At communication partner 25 pin sub D male connector with screw locking 3 5 7 7 5 576 76 76 576 65 75 75 65 1 1 RPPXQLFDWLRQ SDUWQHU 5HFHLYHU 5HFHLYHU 6HQGHU 6HQGHU QFORVXUH VKLHOG QFORVXUH VKLHOG DEOH W SH F...

Страница 170: ...ecting cable for a point to point connection between a CP 340 and a printer DR 2xx with serial interface For the connecting cable you will require the following female male connectors At the CP 340 end 9 pin sub D socket With DR 2xx 25 pin sub D male connector 5 7 7 5 76 5 65 75 75 65 1 1 3 DEOH W SH 3ULQWHU 5HFHLYHU 6HQGHU 6HQGHU 5HFHLYHU DVLQJ VKLHOG DVLQJ VKLHOGG Figure B 5 RS 232C Connecting C...

Страница 171: ... point to point connection between a CP 340 and an IBM Proprinter with serial interface PT 88 or IBM compatible printer For the connecting cable you will require the following female male connectors At the CP 340 end 9 pin sub D socket With IBM Proprinter 25 pin sub D male connector 5 7 7 5 76 5 65 75 75 65 1 1 3 DEOH W SH 3ULQWHU 5HFHLYHU 6HQGHU 6HQGHU 5HFHLYHU DVLQJ VKLHOG DVLQJ VKLHOGG Figure B...

Страница 172: ...or a point to point connection between a CP 340 and a laser printer with a serial interface PT 10 or Laserjet series II For the connecting cable you will require the following female male connectors At the CP 340 end 9 pin sub D socket With IBM Proprinter 25 pin sub D male connector 3 5 7 7 5 1 1 76 65 75 3ULQWHU 5HFHLYHU 5HFHLYHU 6HQGHU 6HQGHU DVLQJ VKLHOG DVLQJ VKLHOG DEOH W SH Figure B 7 RS 232...

Страница 173: ...n the front panel of the CP 340 20mA TTY Table B 2 Pin assignment for the 9 pin sub D socket of the integrated interface of the CP 340 20mA TTY Socket to CP 340 20mA TTY Pin Designation Input Output Meaning 1 TxD Output Transmitted data 2 20 mA Input 5 V ground 3 20 mA I1 Output 20 mA current generator 1 4 20 mA I2 Output 20 mA current generator 2 5 RxD Input Received data 6 7 8 RxD Output Receive...

Страница 174: ...member that unconnected inputs at the communication partner may have to be connected to open circuit potential 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 c...

Страница 175: ... to point connection between a CP 340 and a CP 340 CP 441 For the connecting cables you will require the following male connectors At the CP 340 end 9 pin sub D male connector with screw locking At communication partner 9 pin sub D male connector with screw locking RPPXQLFDWLRQ SHHU QFORVXUH VKLHOG QFORVXUH VKLHOG 5HFHLYHU 5HFHLYHU 7UDQVPLWWHU 7UDQVPLWWHU DEOH W SH 3 5 7 5 7 5 7 5 7 P P P P 9FF 9 ...

Страница 176: ...ction between a CP 340 and a CP 544 CP 524 CPU 928B CPU 945 CPU 948 For the connecting cables you will require the following male connectors At the CP 340 end 9 pin sub D male connector with screw locking At communication partner 25 pin sub D male connector with shift latch RPPXQLFDWLRQ SHHU QFORVXUH VKLHOG QFORVXUH VKLHOG 5HFHLYHU 5HFHLYHU 7UDQVPLWWHU 7UDQVPLWWHU DEOH W SH 3 5 7 5 7 5 7 5 7 P P P...

Страница 177: ...oint connection between a CP 340 and a CP 523 For the connecting cables you will require the following male connectors At the CP 340 end 9 pin sub D male connector with screw locking At communication partner 25 pin sub D male connector with screw locking RPPXQLFDWLRQ SHHU QFORVXUH VKLHOG QFORVXUH VKLHOG DEOH VKLHOG 5HFHLYHU 5HFHLYHU 7UDQVPLWWHU 7UDQVPLWWHU DEOH W SH 3 5 7 5 7 5 7 5 7 P P 9 9 P P F...

Страница 178: ... to point connection between a CP 340 and a CP 521 SI CP 521 BASIC For the connecting cables you will require the following male connectors At the CP 340 end 9 pin sub D male connector with screw locking At communication partner 25 pin sub D male connector with screw locking RPPXQLFDWLRQ SHHU QFORVXUH VKLHOG QFORVXUH VKLHOG DEOH VKLHOG 5HFHLYHU 5HFHLYHU 7UDQVPLWWHU 7UDQVPLWWHU DEOH W SH 3 5 7 5 7 ...

Страница 179: ...nt connection between a CP 340 and a CPU 944 AG 95 For the connecting cables you will require the following male connectors At the CP 340 end 9 pin sub D male connector with screw locking At communication partner 15 pin sub D male connector with shift latch RPPXQLFDWLRQ SHHU QFORVXUH VKLHOG QFORVXUH VKLHOG DEOH VKLHOG 5HFHLYHU 5HFHLYHU 7UDQVPLWWHU 7UDQVPLWWHU DEOH W SH 3 5 7 5 7 5 7 5 7 P P 9 9 P ...

Страница 180: ... wire mode 5 6 7 8 GND Functional ground isolated 9 T B Output Transmitted data four wire mode 10 11 R B T B Input Input output Received data four wire mode Received transmitted data two wire mode 12 13 14 15 View from the front Connecting cables If you make your own connecting cables you must remember that unconnected inputs at the communication partner may have to be connected to open circuit po...

Страница 181: ...d a CP 340 CP 441 for RS 422 mode For the connecting cables you will require the following male connectors At the CP 340 end 15 pin sub D male connector with screw locking At communication partner 15 pin sub D male connector with screw locking 5 7 7 5 7 5 5 7 1 1 3 RPPXQLFDWLRQ SDUWQHU 6HQGHU 6KLHOG 5HFHLYHU DVLQJ VKLHOG 5HFHLYHU 6HQGHU DVLQJ VKLHOG DEOH W SH 7 7 DQG 5 5 WZLVWHG SDLU Q WKH FDVH RI...

Страница 182: ...nnector with screw locking 5 7 7 7 7 5 5 5 1 1 3 RPPXQLFDWLRQ SDUWQHU 6HQGHU 6KLHOG 5HFHLYHU DVLQJ VKLHOG 6HQGHU 5HFHLYHU DVLQJ VKLHOG DEOH W SH 5 5 WZLVWHG SDLUU Q WKH FDVH RI FDEOHV ORQJHU WKDQ P RX PXVW VROGHU LQ D WHUPLQDWLQJ UHVLVWRU RI DSSUR RQ WKH UHFHLYHU IRU WURXEOH IUHH GDWD WUDIILF Figure B 15 X27 Connecting Cable CP 340 CP 441 CP 340 RS 485 Operation Two Wire Mode Note The previous fig...

Страница 183: ...e For the connecting cables you will require the following male connectors At the CP 340 end 15 pin sub D male connector with screw locking At communication partner 15 pin sub D male connector with shift latch 5 7 7 5 7 5 5 7 1 1 3 RPPXQLFDWLRQ SDUWQHU 6HQGHU 6KLHOG 5HFHLYHU DVLQJ VKLHOG 5HFHLYHU 6HQGHU DVLQJ VKLHOG DEOH W SH 7 7 DQG 5 5 WZLVWHG SDLU Q WKH FDVH RI FDEOHV ORQJHU WKDQ P RX PXVW VROG...

Страница 184: ...Connecting Cables B 3 X27 RS 422 485 Interface of the CP 340 RS 422 485 PtP coupling and configuration of CP 340 184 Manual 04 2011 A5E00369892 03 ...

Страница 185: ...0AE0 Connecting cables Connecting cables are available in the commonly preferred lengths 5 m 10 m and 50 m Table C 2 Order numbers of the connecting cables Connecting cable for Variant Order number RS 232C interface RS 232C 5 m RS 232C 10 m RS 232C 15 m 6ES7902 1AB00 0AA0 6ES7902 1AC00 0AA0 6ES7902 1AD00 0AA0 20 mA TTY interface 20 mA TTY 5 m 20 mA TTY 10 m 20 mA TTY 50 m 6ES7902 2AB00 0AA0 6ES790...

Страница 186: ...Accessories and Order Numbers PtP coupling and configuration of CP 340 186 Manual 04 2011 A5E00369892 03 ...

Страница 187: ...ith STEP 7 http support automation siemens com W W view en 18652056 Manual This manual explains the basic principles behind the structure of the operating system and a user program on an S7 CPU It is intended to give first time users of an S7 300 400 an overview of the programming methodology thereby providing a basis on which they can build their user programs Configuring Hardware and Communicati...

Страница 188: ...port additional options for implementing sequential controls state controls of graphic interconnections of blocks The manuals feature both instructions for users and language descriptions If you are using the language for the first time we recommend that you refer to the manual in order to familiarize yourself with the programming methodology When working with the software you can also use the onl...

Страница 189: ... PROFIBUS DP Manual ET 200M distributed I O device ET 200S distributed I O device ET 200 handheld programming unit PROFIBUS Network Manual SINEC L2 DP interface on the S5 95U PLC Brochures The table lists brochures which will provide you with an overview of the S7 300 STEP 7 and distributed I Os in S7 Table D 3 Brochures for SIMATIC S7 STEP 7 and PROFIBUS DP Brochures S7 300 automation system Desi...

Страница 190: ...Literature on SIMATIC S7 PtP coupling and configuration of CP 340 190 Manual 04 2011 A5E00369892 03 ...

Страница 191: ...alled block Block parameter Block parameters are place holders within multiple use blocks which are supplied with updated valves during the calling up of the corresponding block Communications processor Communications processors are modules for point to point connections and bus connections Configuring Configuring refers to the configuration of separate modules of a programmable controller in the ...

Страница 192: ...e accessed absolutely or symbolically Complex data can be stored in structured form Data Type With the help of the data types you can specify how the value of a variable or constant in the user program is to be used The data types are divided into elementary and structured data types Default setting The default setting is a reasonable basic setting that can be used whenever no other value is speci...

Страница 193: ... instance data block is a block allocated to a function block which contains data for this special function block Interrupt Interrupt is a term that designates the interruption of the processing of a program in the processor of a programmable controller by an external alarm Loading from PC Downloading of load objects e g code blocks from the programming device into the load memory of the central p...

Страница 194: ...e 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 Parameterization Parameterization refers to the setting of a module s ...

Страница 195: ...ved in data transmission must follow fixed rules for handling and implementing the data traffic Such rules are called protocols S7 300 backplane bus The S7 300 backplane bus is a serial data bus via which the modules communicate with each other and via which they are supplied with the necessary voltage Software Software refers to the entirety of all programs that are used on a computing system The...

Страница 196: ...d into the operating system of the CPU and can be called up by the user whenever necessary User program The user program contains all instructions and declarations for processing the signals used for controlling a system or a process In SIMATIC S7 the user program is structured and divided into small units the blocks Variable A variable is an operand e g I 1 0 which can have a symbolic name and th...

Страница 197: ...FCERR or SFCSTATUS variable 141 Code transparency 51 Configuring the CP 340 96 Connecting cables RS 232C 166 CP 340 Parameter assignment 94 Technical specifications 159 CP 340 slots 89 CPU RUN 129 CPU Startup 129 CPU STOP 129 D Data flow control 59 Diagnostic buffer of the CP 340 144 Diagnostic Buffer of the CP 340 132 Diagnostics Diagnostic buffer 144 Diagnostics functions Diagnostics interrupt 1...

Страница 198: ...variants 11 CP 34x 20mA TTY 11 CP 34x RS 232C 11 CP 34x RS 422 485 11 Functions 12 Mounting rack position 89 O Operating mode transitions 129 Operating modes 127 Assignment of new parameters 127 RUN 127 STOP 127 Order numbers Connecting cables 185 Module variants 185 P P_PRINT FB Assignment in the data area pointer DB 115 Instance DB 115 Message texts 113 P_RESET FB Assignment in the data area 122...

Страница 199: ...interface Connecting cables 165 Pin assignment 165 Technical specifications 160 RS 232C secondary signals 47 RS 232C Secondary Signals 118 Reading and controlling 118 RXD 133 S S7 300 backplane bus 131 Sending with the 3964 R procedure 36 Service Support 5 Software components 15 Function blocks 15 Parameter assignment interface 15 STEP 7 software package 15 Special displays 133 Standard connecting...

Страница 200: ...Index PtP coupling and configuration of CP 340 200 Manual 04 2011 A5E00369892 03 ...

Отзывы: