Cp341 e
Cp341 e
Cp341 e
Product Description
Configuring and
Parameterizing the CP 341
Manual
6ES7 341-1AH00-8BA0
SIMATIC
CP 341
Point-to-Point Communication
Installation and Parameter
Assignment
Appendices
04/2000
C79000-G7076-C341
Edition 03
Technical Specifications
Connecting Cables
SIMATIC S7 Reference
Literature
Glossary, Index
!
!
!
Danger
indicates that death, severe personal injury or substantial property damage will result if proper precautions are not taken.
Warning
indicates that death, severe personal injury or substantial property damage can result if proper precautions are not taken.
Caution
indicates 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.
Qualified Personnel
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 systems in accordance with established safety practices and standards.
Correct Usage
Note the following:
Warning
This device and its components may only be used for the applications described in the catalog or the
technical descriptions, 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.
Trademarks
SIMATIC, SIMATIC HMI and SIMATIC NET are registered trademarks of SIEMENS AG.
Some of other designations used in these documents are also registered trademarks; the owners rights
may be violated if they are used by third parties for their own purposes.
Disclaimer of Liability
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.
Siemens AG
Bereich Automatisierungs- und Antriebstechnik
Geschaeftsgebiet Industrie-Automatisierungssysteme
Postfach 4848, D- 90327 Nuernberg
Index-2
Siemens
Aktiengesellschaft
Siemens AG 1998
Technical data subject to change.
Point-to-point connection CP 341Installation and Parameter Assignment
C79000-G7000-C341-02
C79000-G7076-C341
Preface
Purpose
This manual explains how to establish and operate a point-to-point connection.
Product
Order Number
As of product status
CP 341-RS 232C
6ES7 341-1AH01-0AE0
01
CP 341-20mA TTY
6ES7 341-1BH01-0AE0
01
CP 341-RS 422/485
6ES7 341-1CH01-0AE0
01
iii
Preface
Note
The descriptions of the CP 341 communication processors in this manual were
correct at the time of publication. We reserve the right to describe modifications to
the functionality of the modules in a separate Product Information.
Conventions
The abbreviation CP 341 is used in the documentation when information applies to
all three module variants: CP 341-RS 232C, CP 341-20mA TTY and
CP 341-RS 422/485.
iv
Preface
Electronic Manuals
The entire set of SIMATIC S7 documentation is available on CD-ROM.
Preface
Additional Assistance
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
programmable controller. Please contact your local training center or the central
training center in Nuremberg, D-90027 Germany, Tel. +49 911 895 3200.
vi
Preface
Nuremberg
Johnson City
Singapore
Simatic Hotline
Worldwide (Nuremberg)
Worldwide (Nuremberg)
Technical Support
Technical Support
(FreeContact)
Fax:
E-Mail:
techsupport@
ad.siemens.de
Phone:
Fax:
GMT:
+1:00
GMT:
+01:00
Authorization
Phone:
Fax:
Phone:
+1 423 461-2522
Phone:
+65 740-7000
Fax:
+1 423 461-2289
Fax:
+65 740-7001
E-Mail:
authorization@
nbgm.siemens.de
+1:00
E-Mail:
simatic.hotline@
sea.siemens.com
E-Mail:
GMT:
5:00
GMT:
simatic.hotline@
sae.siemens.com.sg
+8:00
GMT:
The languages of the SIMATIC Hotlines are generally German and English, in addition, French, Italian and Spanish are
spoken on the authorization hotline.
vii
Preface
viii
Contents
Product Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-1
1.1
1-2
1.2
1-4
1.3
1-6
1.4
1.4.1
1.4.2
1.4.3
1-8
1-8
1-10
1-11
1.5
1-12
2-1
2.1
2-2
2.2
2.2.1
2.2.2
2.2.3
2.2.4
2-6
2-6
2-11
2-23
2-35
2.3
2.3.1
2.3.2
2.3.3
Parameterization Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Parameterization Data of the 3964(R) Procedure . . . . . . . . . . . . . . . . . . . .
Parameterization Data of the RK 512 Computer Connection . . . . . . . . . . .
Parameterization Data of the ASCII Driver . . . . . . . . . . . . . . . . . . . . . . . . . .
2-49
2-49
2-54
2-55
3-1
4-1
4.1
CP 341 Slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4-2
4.2
4-2
4.3
Installation Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4-4
5-1
5.1
5-2
5.2
5-3
5.3
5-4
5.4
5-5
5.5
5-6
ix
Contents
6-1
6.1
6-2
6.2
6-2
6.3
6.3.1
6.3.2
6.3.3
6-4
6-4
6-14
6-38
6.4
6.4.1
6.4.2
6-42
6-42
6-43
6.5
6-47
6.6
6-48
7-1
7.1
7-2
7.2
7-2
7.3
7-4
8-1
8.1
8-2
8.2
8-3
8.3
8-4
8.4
8-17
8.5
8-19
8.6
Diagnostic Alarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8-21
9-1
9.1
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-2
9.2
Device Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-3
9.3
Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-3
9.4
Blocks Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-5
9.5
9-6
9.6
9-7
Contents
Technical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A-1
A.1
A-2
A.2
Transmission Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A-7
A.3
A-9
Connecting Cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B-1
B.1
B-2
B.2
B-9
B.3
B-16
C-1
D-1
E-1
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Glossary-1
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index-1
xi
Contents
xii
Product Description
In Section
on Page
1.1
1-2
1.2
1-4
1.3
1-6
1.4
1-8
1.5
1-12
1-1
Product Description
1.1
Module Variants
The following variants of the CP 341 communications processor are available:
Table 1-1
Module
1-2
Order Number
Integrated Interface
CP 341-RS 232C
6ES7 341-1AH01-0AE0
RS 232C interface
CP 341-20mA TTY
6ES7 341-1BH01-0AE0
20 mA TTY interface
CP 341-RS 422/485
6ES7 341-1CH01-0AE0
Product Description
RS 422*
RS 485*
yes
yes
yes
yes
yes
no
no
no
yes
no
no
no
yes
no
no
no
yes
yes
yes
no
3964(R) procedure
yes
yes
yes
no
yes
yes
yes
no
Function
ASCII driver
CP 341RS 232C
CP 341-RS 422/485
1-3
Product Description
1.2
Hardware Components
The following table lists the hardware components required for establishing a
point-to-point connection with the CP 341.
Table 1-3
Function
Rack
CPU
Accessories:
Memory card
Diagram
Back-up battery
CP 341 communications
processor
1-4
Product Description
Table 1-3
Function
Programming device or PC
Diagram
Software Components
The following table lists the software components required for establishing a
point-to-point connection with the CP 341.
Table 1-4
Function
Diagramm
Loadable drivers
Licence
CD
CD
Dongle
1-5
Product Description
1.3
Indicators
SF
TxD
RxD
Integrated interface
Front door
Connection for DC 24 V
supply
M
L+
M
Figure 1-1
1-6
Fastening screw
Product Description
LED indicators
The following LED indicators are located on the front panel of the CP 341:
SF(red) Error
TxD(green) interface transmitting
RxD(green) interface receiving
The operating modes and errors indicated by these LEDs are described in
Section 8.2. Section 5.5 contains information on LED displays which can occur
when you load firmware updates.
Integrated Interface
The CP 341 is available in three variants with different interface types:
RS 232C
X27 (RS 422/485)
20 mA TTY
The interface type is indicated on the front of the CP 341. You will find a detailed
description of the interfaces in Section 1.4.
Figure 1-2
Expansion Bus
1-7
Product Description
1.4
1.4.1
Definition
The RS 232C interface submodule is a voltage interface used for serial data
transmission in compliance with the RS 232C standard.
Attributes
The RS 232C interface has the following attributes and is in compliance with the
following requirements:
1-8
Type:
voltage interface
Front connector:
RS 232C signals:
76.8 kbaud
Standard:
Product Description
RS 232C Signals
Table 1-5 shows the meanings of the RS232C secondary signals.
Table 1-5
Signal
Meaning
TXD
Transmitted Data
RXD
Received Data
RTS
Request To Send
CTS
Clear To Send
DTR
DSR
RI
Ring Indicator
DCD
1-9
Product Description
1.4.2
Definition
The 20 mA TTY interface is a current-loop interface for serial data transmission.
Attributes
The 20 mA TTY interface has the following attributes and is in compliance with the
following requirements:
Type:
current-loop interface
Front connector:
20 mA TTY signals:
19.2 kbaud
Standard:
1-10
Product Description
1.4.3
Definition
The X27 (RS 422/485) interface is a differential voltage interface used for serial
data transmission in compliance with the X27 standard.
Attributes
The X27 (RS 422/485) interface has the following attributes and is in compliance
with the following requirements:
Type:
Front connector:
RS 422 signals:
TXD (A), RXD (A), TXD (B), RXD (B), GND; all
isolated against the S7-internal power supply
RS 485 signals:
76.8 kbaud
Standard:
Note
With the RK 512 and 3964(R) protocols, the X27 (RS 422/485) interface can only
be used in four-wire mode.
1-11
Product Description
1.5
1-12
2
on Page
2.1
2-2
2.2
2-6
2.3
Parameterization Data
2-49
2-1
2.1
Point-to-Point Connection
In a point-to-point connection the CP 341 communication processor forms the
interface between a programmable controller and a communication partner. In a
point-to-point connection with the CP 341, the data is transmitted serially.
2-2
Declarations
As well as the start and stop bits, further declarations must be made between the
two communication partners before serial transmission can take place. These
include:
Transmission speed (baud rate),
Character and acknowledgment delay times,
Parity,
Number of data bits and
Number of stop bits.
Sections 2.2 and 2.3 describe the importance of the declarations in the various
transmission procedures, and how they are parameterized.
2-3
Character Frames
Data is transmitted between the CP 341 and a communication partner via the
serial interface in a character frame. Three data formats are available for each
character frame. You can parameterize the format for data transmission with the
parameterization interface CP341: Point-to-Point Communication, Parameter
Assignment.
9 10
10
2 stop bits
7 data bits
1
1 start bit
Signal state 0
7 data bits, 1 start bit, 7 data bits, 1 parity bit, 1 stop bit
Signal state 1
1
1 stop bit
1 parity bit
1 start bit
7 data bits
Signal state 0
9 10
Figure 2-1
2-4
1 stop bit
8 data bits
1 start bit
Signal state 0
Signal
nth character
(n + 1) th character
Character delay time
1
Time t
Figure 2-2
2-5
2.2
2.2.1
Protocol
All communication partners involved in data transmission must follow fixed rules for
handling and implementing the data traffic. Such rules are called protocols.
A protocol defines the following points:
Operating mode
Half-duplex or full-duplex mode
Initiative
Which communication partners can initiate the transmission and under what
conditions
Control characters
Which control characters are to be used for data transmission
Character frame
Which character frames are to be used for data transmission
Data backup
The data backup procedure to be used
Character delay time
The time period within which an incoming character must be received
Transmission speed
The baud rate in bits/s
Procedure
This is the specific process according to which the data is transmitted.
2-6
2-7
Transmission Integrity
Transmission integrity plays an important role in the transmission of data and in
selection of the transmission procedure. Generally speaking, the more layers of the
reference model are applied, the greater the transmission integrity.
Transport layer
Layer 3
RK 512
Layer 4
Layer 1
Physical layer
The physical transmission of the
data bytes is defined.
Figure 2-3
2-8
ASCII driver
Layer 2
3964(R)
Position of the Supplied Protocols of the CP 341 in the ISO Reference Model
2-9
2-10
2.2.2
Control Characters
During data transmission, the 3964(R) procedure adds control characters to the
information data (data-link layer). These control characters allow the
communication partner to check whether the data has arrived complete and
without errors.
The 3964(R) procedure analyzes the following control codes:
STX
DLE
ETX
BCC
NAK
Note
If DLE is transmitted as an information string, it is sent twice so that it can be
distinguished from the control code DLE during connection setup and release on
the send line (DLE duplication). The receiver then reverses the DLE duplication.
Priority
With the 3964(R) procedure, one communication partner must be assigned a
higher priority and the other partner a lower priority. If both partners begin
connection setup at the same time, the partner with the lower priority will defer its
send request.
2-11
Block Checksum
With the 3964R transmission protocol, data integrity is increased by the additional
sending of a block check character (BCC).
Message
frame
STX
Data
DLE ETX
BCC
Figure 2-4
30
31
=
=
0011
0011
0000
0001
XOR
32
=
=
0000
0011
0001
0010
XOR
10
=
=
0011
0001
0011
0000
XOR
03
=
=
0010
0000
0011
0011
XOR
0010
0000
BCC
Block Checksum
The block checksum is the even longitudinal parity (EXOR logic operation of 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.
Note
If DLE duplication occurs, the DLE code is accounted for twice in the BCC
calculation.
2-12
CP 341
Start code (02H)
Pos. acknowledgment (10H)
Communication partner
STX
DLE
1st byte
2nd byte
nth byte
Figure 2-5
DLE
ETX
BCC
DLE
Connection
setup
User
data
Connection
release
2-13
Send data
If a connection is successfully established, the user data contained in the output
buffer of the CP 341 is sent to the communication partner with the chosen
transmission parameters. The partner monitors the times between incoming
characters. The interval between two characters must not exceed the character
delay time.
If the communication partner sends the NAK control code during an active send
operation, the procedure aborts its transmission of the block and tries again as
described above, beginning with connection setup. If a different code is sent, the
procedure first waits for the character delay time to expire and then sends the NAK
code to change the mode of the communication partner to idle. Then the procedure
starts to send the data again with the connection setup STX.
2-14
Communication partner
Connection
setup
User
data
Connection
release
Figure 2-6
CP 341
STX
DLE
1st byte
2nd byte
nth byte
DLE
ETX
BCC
DLE
Note
As soon as it is ready, the 3964(R) procedure sends a single NAK to the
communication partner to set the latter to idle.
2-15
Receive data
After a successful connection setup, the receive characters that are arrive are
stored in the receive buffer. If two consecutive DLE codes are received, only one of
these is stored in the receive buffer.
After each receive character, the procedure waits out the character delay time for
the next character. If this period expires before another character is received, an
NAK is sent to the communication partner. The system program reports the error
to the function block P_RCV_RK (output parameter STATUS). The 3964(R)
procedure does not initiate a repetition.
If transmission errors occur during receiving (lost character, frame error, parity
error, etc.), the procedure continues to receive until the connection is released,
then an NAK is sent to the communication partner. A repetition is then expected. If
the undamaged block still cannot be received after the number of transmission
attempts defined in the static parameter set, or if the communication partner does
not start the repetition within a block wait time of 4 seconds, the procedure aborts
the receive operation. The CP 341 reports the first errored transmission and the
final abort to the function block P_RCV_RK (output parameter STATUS)
2-16
Communication partner
CP 341
Receiving data
STX
DLE
1st byte
nth byte
Connection
setup
User
data
DLE
ETX
BCC
NAK
Connection
release
T
new setup attempt
Figure 2-7
When DLE, ETX, BCC is received, the CP 341 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 341 responds with DLE.
Otherwise, the CP 341 responds with an NAK and waits the block wait time (T) of
4 seconds for a new attempt. If after the defined number of transmission attempts
the block cannot be received, or if no further attempt is made within the block wait
time, the CP 341 aborts the receive operation.
2-17
Initialization Conflict
The figure below illustrates the transmission sequence during an initialization
conflict.
CP 341
(low priority)
Start code (02H)
Start code (02H)
Pos. acknowledgment (10H)
Communication partner
(higher priority)
STX
STX
DLE
1st byte
2nd byte
nth byte
Connection
setup
User
data
DLE
ETX
BCC
DLE
Connection
release
STX
DLE
Connection
setup
2-18
Procedure Errors
The procedure recognizes both errors which are caused by the communication
partner and errors caused by faults on the line.
In both cases, the procedure makes repeated attempts to send/receive the data
block correctly. If this is not possible within the maximum number of transmission
attempts set (or if a new error status occurs), the procedure aborts the send or
receive process. It reports the error number of the first recognized error and
returns to idle mode. These error messages are displayed in the STATUS output of
the FB.
If the system program frequently reports an error number in the STATUS output of
the FB for send and receive repetitions, this implies occasional disturbances in the
data traffic. The large number of transmission attempts compensates for this,
however. In this case you are advised to check the transmission connection 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 connection is interrupted, an error message is displayed at the
STATUS output of the function block. No repeat is started. The BREAK status in
the STATUS output of the FB is automatically reset as soon as the connection is
restored on the line.
For every recognized transmission error (lost character, frame or parity error), a
standard number is reported, regardless of whether the error was detected during
sending or receiving of a data block. The error is only reported, however, following
unsuccessful repetitions.
Evaluate parameter
assignment
Initialize interface
Send NAK
Figure 2-9
2-19
Send NAK
W=1
Send NAK
x>6
x <= 6
x>6
x=1
x <= 6
Send STX
W+1
Start TADT
x+1
T > TADT,
character except
Wait for DLE DLE, STX or
STX acknowledgm. invalid character
High
priority
Low
priority
DLE
Receipt not
permitted
Send block,
poss.
duplicate DLE
Send NAK
Send DLE,
ETX
3964R
3964
Send BCC
Start TADT
T > TADT,
character except
DLE or invalid
character
DLE
Sending completed
Figure 2-10
2-20
Intention to send
Receive
STX
Repetition
expected
Note
NAK
W+1
4
5
Initialization
conflict, low
priority
Start
TNAKTIM
Wait
T > TNAKTIM
Buffer free
Send DLE
Send NAK
TNAKTIM = 400 ms
W = transmission attempt count
Immediate return to initial state at line break (BREAK)
Figure 2-11
2-21
4
Start
Tchar. delay time
Correct character
except for DLE
Wait to
receive
characters
Note
NAK
Invalid character
T > Tchar. delay time
DLE
Dual DLE
Wait for
ETX
Note NAK
Characters
except ETX, DLE
ETX
3964R
3964
BCC
NAK noted
Initialization conflict
noted, low priority
Send DLE
Send NAK
Receipt completed
W>5
W <= 5
Note repetition
expected, start TBLOCK
3
G
Wait for
STX
Figure 2-12
2-22
T>
TBLOCK
STX
2.2.3
2-23
Byte
1
A (41H)
5
6
O (4FH)
E (45H)
E (45H)
M (4DH)
C (5AH)
=counter cells
10
RK 512 addressing describes the data source and destination with word limits.
Conversion to byte addresses in SIMATIC S7 is automatic.
2-24
10 seconds
Meaning
Displays 00H
The error number in the response message frame automatically causes an event number
at the STATUS output of the function blocks (see section 8.3).
2-25
CP 341
Communication partner
STX
DLE
(00H)
(00H)
SEND request (41H)
Data block (44H)
Data destination DB10 (0AH)
DW01 (01H)
Length (00H)
50 DW (32H)
No KM (FFH)
CPU1 only (1FH)
1st byte
2nd byte
3rd byte
4th byte
5th byte
6th byte
7th byte
8th byte
9th byte
10th byte
11th byte
12th byte
Connection
setup
Message
frame
header
User
data
nth byte
DLE
ETX
BCC
DLE
Connection
release
STX
DLE
Connection
setup
1st byte
2nd byte
3rd byte
4th byte
Response
message
frame
header
DLE
ETX
BCC
DLE
Connection
release
Figure 2-13
2-26
Send data
The SEND request is executed in the following sequence:
Active partner
Sends a SEND message frame containing the message frame header and
data.
Passive partner
Receives the message frame, checks the header and the data, and
acknowledges it with a response message frame after passing the data on to
the CPU.
Active partner
Receives the response message frame.
Sends user data.
If the volume of user data exceeds 128 bytes, the active partner sends a
continuation SEND message frame.
Passive partner
Receives the continuation SEND message frame, checks the header and the
data, and acknowledges it with a continuation response message frame after
passing the data on to the CPU.
Note
If the CPU receives an errored SEND message frame or if an error has occurred
in the message frame header, the communication partner enters an error number
in the 4th byte of the response message frame. This does not apply in the case of
protocol errors.
2-27
CP 341
Communication partner
STX
DLE
Connection
setup
1st byte
2nd byte
3rd byte
4th byte
Message
frame
header
5th byte
6th byte
nth byte
User
data
DLE
ETX
BCC
DLE
Connection
release
STX
DLE
Connection
setup
1st byte
2nd byte
3rd byte
4th byte
Response
message
frame
header
DLE
ETX
BCC
DLE
Connection
release
Figure 2-14
2-28
CP 341
Communication partner
STX
DLE
Connection
setup
(00H)
(00H)
FETCH request (45H)
Data block (44H)
Data source DB100 (64H)
DW100 (64H)
Length (00H)
50 DW (32H)
No KM (FFH)
CPU 1 only (1FH)
1st byte
2nd byte
3rd byte
4th byte
5th byte
6th byte
7th byte
8th byte
9th byte
10th byte
DLE
ETX
BCC
DLE
Connection
release
STX
DLE
Connection
setup
(00H)
(00H)
(00H)
Error code (00H)
1st byte
2nd byte
3rd byte
4th byte
Response
message
frame
header
5th byte
6th byte
nth byte
Message
frame
header
Figure 2-15
DLE
ETX
BCC
DLE
User
data
Connection
release
2-29
Fetching Data
The FETCH request is executed in the following sequence:
Active partner
Sends a FETCH message frame containing the header.
Passive partner
Receives the message frame, checks the header, fetches the data from the
CPU, and acknowledges this with a response message frame containing the
data.
Active partner
Receives the response message frame.
If the volume of user data exceeds 128 bytes, the active partner sends a
continuation FETCH message frame containing bytes 1 to 4 of the header.
Passive partner
Receives the continuation FETCH message frame, checks the header, fetches
the data from the CPU, and acknowledges this with a continuation response
message frame containing further data.
If there is an error number (not equal to 0) in the 4th byte, the response message
frame does not contain any data.
If more than 128 bytes are requested, the extra bytes are automatically fetched in
one or more continuation message frames.
Note
If the CPU receives an errored FETCH message frame or if an error has occurred
in the message frame header, the communication partner enters an error number
in the 4th byte of the response message frame. This does not apply in the case of
protocol errors.
2-30
CP 341
Communication partner
Connection
setup
Continuation message
frame (FFH) (00H)
FETCH request (45H)
Data block (44H)
1st byte
2nd byte
3rd byte
4th byte
Message
frame
header
DLE
ETX
BCC
DLE
Connection
release
STX
DLE
Connection
setup
Continuation response
message frame (FFH)
(00H)
(00H)
Error number (00H)
1st byte
2nd byte
3rd byte
4th byte
Response
message
frame
header
5th byte
6th byte
nth byte
Figure 2-16
DLE
ETX
BCC
DLE
User
data
Connection
release
2-31
Quasi-Full-Duplex Operation
Quasi full-duplex operation means: the partners can send command and response
message frames at any time as long as the other partner is not sending. The
maximum nesting depth for command and response message frames is 1. The
next command message frame, therefore, cannot be processed until the previous
one has been answered with a response message frame.
It is possible under certain circumstances if both partners want to send to
transmit a SEND message frame from the partner before the response message
frame. For example, if a SEND message frame from the partner was entered in the
output buffer of the CP 341 before the response message frame.
In the following figure the continuation response message frame to the first SEND
message frame is not sent until after the partners SEND message frame.
CP 341
Communication partner
Figure 2-17
2-32
Quasi-Full-Duplex Operation
CPU request
initial
position
CPU request
CPU command
frame
Start TRES
Wait for
response
frame
T > TRES
Error abortion
Response frame
received
All data transferred
CPU request completed
More
sub-blocks
Send
continuation
command frame
Start TRES
Wait for
cont. resp.
frame
Cont. response
frame received
Figure 2-18
Flow Diagram of Data Transmission with the RK 512 When CPU Requests Are
Made
2-33
Partner
request initial
position
Partner command
frame received
Send data to or
get data from the
AS
Error
Send response
frame without error
message
Send response
frame with error
message
Partner request completed
More
sub-blocks
Start TRES
Wait for
continuation
frame
Cont. response
frame received
Response frame monitoring time dependent on transmission
rate TREA = 5 s (7 s, 10 s)
AS = automation system
Figure 2-19
2-34
Flow Diagram of Data Transmission with the RK 512 When Partner Requests
Are Made
2.2.4
2-35
Note
When XON/XOFF flow control is parameterized, the user data must not contain
any of the parameterized XON or XOFF codes. The default settings are
DC1 = 11H for XON and DC3 = 13H for XOFF.
2-36
Send data
The figure below illustrates a send operation.
Request processed
Waiting for
send request
Sending user
data
Figure 2-20
2-37
Code Transparency
The code transparency of the procedure depends on the selection of the
parameterized end criterion and the flow control:
With one or two end-of-text characters
not code-transparent
When end criterion is character delay time or fixed message frame length
code-transparent
Code-transparent operation is not possible when XON/XOFF flow control is
used.
Code-transparent means that any character combinations can occur in the user
data without the end criterion being recognized.
2-38
Waiting for
character
The figure below illustrates a receive operation with the end criterion expiry of
character delay time.
Character
arrived
Character received
with character
delay time
monitoring
Message frame
complete (character
delay time expired)
Enter error in
STATUS output of
the FB
Figure 2-21
2-39
2-40
Waiting for
character
The figure below illustrates a receive operation with the end criterion end-of-text
character.
Character
arrived
Character received
with end control
and character delay
time
Error when receiving
Message
frame
complete
Figure 2-22
Enter error in
STATUS output of
the FB
2-41
2-42
Waiting for
character
The figure below illustrates a receive operation with the end criterion fixed
message frame length.
Character
arrived
Character received
with length control
and character delay
time
Error when receiving
Message
frame
complete
Enter message frame
in receive buffer
(max. 250 MFs or
1024 bytes)
Waiting for
parameterized
number of
characters
Character
delay time
expired
Enter error in
STATUS output of
the FB
Figure 2-23
2-43
Note
If the constant reading of the receive data in the user program is interrupted for a
while, you may find that when the receive data is requested again, the CP 341
transfers old message frames to the CPU before it transfers the latest one.
The old message frames are those on their way when transmission between the
CP 341 and the CPU was interrupted, or which had already been received by
the FB.
RS 485 Mode
When you run the ASCII driver in RS 485 mode (half-duplex, two-wire mode), you
must take steps in the user program to ensure that only one user sends data at
any one time. If two users send data simultaneously, the message frame is
corrupted.
2-44
DTR (output)
DSR (input)
RTS (output)
CTS (input)
RI (input)
When the CP 341-RS 232C is switched on, the output signals are in the OFF state
(inactive).
You can parameterize the way in which the DTR/DSR and RTS/CTS control
signals are used with the CP 341: Point-to-Point Communication, Parameter
Assignment parameterization interface or control them by means of function calls
(FCs) in the user program.
Note
When automatic use of the RS 232C secondary signals is parameterized, neither
RTS/CTS data flow control nor RTS and DTR control by means of
the V24_SET FC are possible.
When RTS/CTS data flow control is parameterized, RTS control by means of
the V24_SET FC is not possible.
On the other hand, it is always possible to read all RS 232C secondary signals by
means of the V24_STAT FC.
The sections that follow describe how the control and evaluation of the RS 232C
secondary signals is handled.
2-45
Note
Automatic use of the RS 232C secondary signals is only possible in half-duplex
mode.
When automatic use of the RS 232C secondary signals is parameterized, neither
RTS/CTS data flow control nor RTS and DTR control by means of
the V24_SET FC are possible.
Note
The time to RTS OFF must be set in the parameterization interface so that the
communication partner can receive the last characters of the message frame in
their entirety before RTS, and thus the send request, is taken away. The data
output waiting time must be set so that the communication partner can be ready
to receive before the time elapses.
2-46
Time Diagram
Figure 2-24 illustrates the chronological sequence of a send request.
RTS
CTS
TXD
ON
OFF
ON
OFF
1
0
t
Send request:
RTS = ON
Transmission
terminated
Partner:
CTS = ON
Figure 2-24
Partner:
CTS = OFF
Data output
waiting time
Time to RTS
OFF
2-47
Note
When RTS/CTS data flow control is parameterized, you must fully wire the
interface signals in the plug connection (see Appendix B).
When RTS/CTS data flow control is parameterized, RTS control by means of
the V24_SET FC is not possible.
2-48
2.3
Parameterization Data
By selecting different protocols, you can adjust your CP 341 communication
processor to suit the communication partner.
The sections that follow describe the parameterization data of the
3964(R) procedure, RK 512 computer connection and ASCII driver.
2.3.1
Note
In the case of the CP 341-RS 422/485 module variant, the 3964(R) procedure can
be used only in four-wire mode.
2-49
Protocol
The following table describes the 3964(R) protocol.
Table 2-2
3964(R) Protocol
Parameters
3964 with default values
and no block check
Description
Default Value
3964 programmable
without block check
3964R with
standard
values with
block check:
char. delay time
= 220 ms
NAK = 2000 ms
Setup
attempts = 6
Transmission
attempts = 6
2-50
Protocol Parameters
You can only set the protocol parameters if you have not set the default values in
the protocol.
Table 2-3
Parameters
Character delay
time
Description
The character delay time defines the
maximum amount of time permitted
between two incoming characters
within a message frame.
Value Range
20 ms to 655350 ms in
10 ms increments
220 ms
Acknowledgment
delay time (ADT)
Default Value
60 ms
40 ms
30 ms
20 ms
20 ms to 655350 ms in
10 ms increments
The shortest
acknowledgment delay
time (ADT) depends on
the baud rate:
300 bits/s
600 bits/s
1200 bits/s
2400 to
76800 bits/s
2000 ms
(550 ms with
3964 and no
block check)
60 ms
40 ms
30 ms
20 ms
Setup attempts
1 to 255
Transmission
attempts
1 to 255
2-51
Parameters
Baud rate
Start bit
Data bits
Stop bits
Parity
Value Range
300
Default Value
9600
600
1200
2400
4800
9600
19200
38400
57600
76800
1 (fixed
value)
7
1
8
8
1
none
odd
even
even
high
low
low
2-52
Parameters
Description
Value Range
none
R(A)5V/R(B)0V
R(A)0V/R(B)5V
Default Value
R(A)5V/R(B)0V
0V
R(B) +
R(A)5V/R(B)0V
R(A)
5V
5V
R(B) +
R(A)0V/R(B)5V
R(A)
0V
Figure 2-25
Wiring of the Receiver at the X27 (RS 422) Interface (3964(R) Procedure)
2-53
2.3.2
Note
Exception: The number of data bits per character is set permanently to 8 with the
RK 512 computer connection.
The parameters of the transport layer (layer 4) must be specified in the function
blocks (FB) used.
2-54
2.3.3
Note
In the case of the CP 341-RS 422/485 module variant, the ASCII driver can be
used in four-wire mode (RS 422) and two-wire mode (RS 485).
At parameterization, you must specify the type of interface (RS 422 or RS 485).
2-55
Protocol Parameters
The table below describes the protocol parameters.
Table 2-6
Parameters
Indicator for end
of receive
message frame
Description
Defines which criterion signals the
end of each message frame.
Value Range
Default Value
On receipt of
character delay
time
end-of-text character
On receipt of fixed
number of characters
Character delay
time
character
delay time
(ms)
300
130
600
65
1200
32
2400
16
4800
9600
19200
38400
57600
76800
End-of-text
character 11
4 ms
2 to 65535 ms
7 data
2
bits2:
3 (03H = ETX)
0 to 7FH (hex)
8 data bits2:
0 to FFH (hex)
End-of-text
character 21
7 data bits2:
0 to 7FH (hex)
8 data bits2:
0 to FFH (hex)
Message frame
length when
received3
1
2
3
1 to 1024 (bytes)
240
2-56
Parameters
Baud rate
Start bit
Data bits
Stop bits
Parity
Value Range
300
Default Value
9600
600
1200
2400
4800
9600
19200
38400
57600
76800
1 (fixed
value)
7
1
8
8
1
none
odd
even
even
2-57
Parameters
Data flow control
XON character1
Value Range
Default Value
None
None
XON/XOFF
RTS/CTS
Automatic use of V24
signals
7 data bits2:
11 (DC1)
0 to 7FH (hex)
8 data bits2:
0 to FFH (hex)
XOFF character1
7 data bits2:
13 (DC3)
0 to 7FH (hex)
8 data bits2:
0 to FFH (hex)
Waiting for XON
after XOFF (wait
time for CTS=ON)3
20 to 655350 ms
in 10 ms increments
0 to 655350 ms
in 10 ms steps
0 to 655350 ms
in 10 ms steps
20000 ms
10 ms
10 ms
Further Information
You will find more information on data flow control with XON/XOFF and RTS/CTS
and on automatic use of the RS 232C secondary signals in Section 2.2.4 as of the
subsection entitled RS 232C Secondary Signals.
2-58
Receive Buffer on CP
The table below describes the parameters for the CP receive buffer.
Table 2-9
Parameters
Buffered receive
message frames
Value Range
Default Value
250
yes
yes
no (only if buffered
receive message
frames = 1)
Further Information
In Section 2.2.4 you can find further information on handling the receive buffer
under Receive Buffer on CP 341.
2-59
Description
Specifies whether the
X27 (RS 422/485) interface is to be
run in full-duplex mode (RS 422) or
half-duplex mode (RS 485).
(See also Section 2.1).
Value Range
Full-duplex
(RS 422) four-wire
mode
Default Value
Full-duplex
(RS 422)
four-wire mode
Half-duplex
(RS 485) two-wire
mode
None:
R(A)5V /
R(B)0V2
R(A)5V/R(B)0V1
R(A)0V/R(B)5V
2-60
R(B) +
none
R(A)
0V
R(B) +
R(A)5V/R(B)0V
R(A)
5V
5V
R(B) +
R(A)0V/R(B)5V
R(A)
0V
Figure 2-26
Wiring of the Receiver at the X27 (RS 422/485) Interface (ASCII Driver)
2-61
2-62
Before starting up the CP 341 you will need to perform the following operations in
the order given.
1. Mount the CP 341
2. Configure the CP 341
3. Parameterize the CP 341
4. Store the parameterization data
5. Create a user program for the CP 341
3-1
/1/
3-2
on Page
4.1
CP 341 Slots
4-2
4.2
4-2
4.3
Installation Guidelines
4-4
4-1
4.1
CP 341 Slots
The following section describes the rules you must observe when positioning the
CP 341 in the rack.
4.2
Tool
For mounting and dismounting the CP 341 you require a 4.5 mm cylindrical
screwdriver.
Mounting Sequence
To insert the CP 341 in a rack, proceed as follows:
1. Switch the CPU to STOP mode.
2. Switch off the power supply.
3. The CP 341 is accompanied by an expansion bus. Plug this onto the backplane
connector of the module to the left of the CP 341.
4. If more modules are to be mounted to the right of the CP 341, plug the
expansion bus of the next module onto the right backplane connector of the
CP 341.
5. Mount the CP 341 on the rail and lower it into position.
6. Screw the CP 341 tight.
7. Connect the DC 24 V of the load power supply to the CP 341.
/2/
4-2
Terminals
Jumpers for
grounded
configuration
Functional ground
M (DC 24 V)
L+ (DC 24 V)
M (DC 24 V)
Figure 4-1
Terminals
4-3
Dismounting Sequence
To dismount the CP 341 from the rack, proceed as follows:
1. Switch the CPU to STOP mode.
2. Switch off the power supply.
3. Open the front doors.
4. Disconnect the connection to the DC 24V supply.
5. Disconnect the sub-D connector from the integral interface.
6. Release the securing screw on the module.
7. Tilt the module and remove it from the rail, and then remove it from the PLC.
Note
Before you mount or dismount the CP 341, you must switch the CPU to STOP
mode and switch off the power supply.
You can plug in or unplug the cable to the integrated submodule on the CP 341 at
any time. However, you must make sure that there is no data being transmitted via
the integrated interface when you do this. Otherwise, data may be lost.
4.3
Installation Guidelines
To be Observed
The general installation guidelines for S7-300 must be observed (see the S7-300
Programmable Controllers, Hardware and Installation manual).
To meet the EMC (electromagnetic compatibility) values, the cable shield must be
connected to a shield bus.
4-4
on Page
5.1
5-2
5.2
5-3
5.3
5-4
5.4
5-5
5.5
5-6
Parameterization Options
You configure and parameterize the module variants of the CP 341 using STEP 7
or the CP 341: Point-to-Point Communication, Parameter Assignment
parameterization interface.
Table 5-1
Product
Order Number
CP 341-RS 232C
6ES7 341-1AH01-0AE0
CP 341-20mA TTY
6ES7 341-1BH01-0AE0
CP 341-RS 422/485
6ES7 341-1CH01-0AE0
Parameterized
Using the
Parameterization
Interface
As of V5.0
Under STEP 7
As of V4.02
5-1
5.1
Requirements
The CP 341 Point-to-Point Communication, Parameter Assignment
parameterization interface must be installed on the programming device/PC under
STEP 7 (see also Table 5-1).
Installation
The CP 341: Point-to-Point Communication, Parameter Assignment
parameterization interface and the function blocks are supplied together with the
programming example on a CD. Proceed as follows to install the parameterization
interface:
1. Insert the CD into the CD drive of your programming device/PC.
2. Under Windows 95/NT, start the dialog for installing software by double-clicking
on the Software icon in Control panel.
3. In the dialog box, select the CD drive and the setup.exe file and start
installation.
4. Now follow the step-by-step instructions of the installation program.
Configuration
In the sense used here, configuration means entering the CP 341 in the
configuration table of the STEP 7 software. In the configuration table you enter the
rack, the slot and the order number of the CP 341. STEP 7 then automatically
assigns an address to the CP 341.
The CPU is now able to find the CP 341 in its slot in the rack by way of its address.
Requirements
Before you can enter the CP 341 in the configuration table of the STEP 7 software,
you must have created a project and a terminal with STEP 7.
Further Information
How to configure S7-300 modules is described in detail in the STEP 7 manual /3/.
In addition, the on-line help for STEP 7 provides sufficient support for configuring
an S7-300 module.
/3/
5-2
5.2
Parameterization
The term parameterization is used in the following to describe the setting of
protocol-specific parameters. You set these parameters with the CP 341:
Point-to-Point Communication, Parameter Assignment parameterization interface.
You start the parameterization interface by double-clicking the order number
(CP 341) in the configuration table or by selecting the CP 341 and choosing the
Edit > Object Properties menu command. The Properties - CP 341 dialog box
appears.
Click on the Parameters button to go to protocol selection. Set the protocol and
double-click the icon for the transmission protocol (an envelope). This takes you to
the dialog box for setting the protocol-specific parameters.
Further Information
The CP 341: Point-to-Point Communication, Parameter Assignment
parameterization interface is intuitive and easy to use; the procedure is the same
for all communications processors. For this reason, the parameterization interface
is not described in detail here.
Also, the on-line help provides sufficient support for working with the
parameterization interface.
5-3
5.3
Data Management
When you quit the configuration table (see Section 5.1) via the menu item
Station > Save or Station > Save As, the configuration and parameterization data
(including the module parameters) is automatically stored in the project/user file
you have created.
Further Information
The Manual for STEP 7 /3/ describes in detail how to
store the configuration and the parameters
load the configuration and the parameters into the CPU
read, modify, copy and print the configuration and parameters.
/3/
5-4
5.4
Requirements
The prerequisites for loading the drivers are:
STEP 7, V4.02 or higher
CP 341: Point-to-Point Communication, Parameter Assignment
parameterization interface, V5.0 or higher
The dongle provided with the driver must be connected to the port at the rear of
the CP 341.
The current parameterization is saved beforehand under HW config and
uploaded to the CPU.
5-5
5.5
Basic Firmware
The CP 341 is shipped with basic firmware preinstalled.
Requirements
The prerequisites for loading firmware updates are:
STEP 7, V4.02 or higher
CP 341: Point-to-Point Communication, Parameter Assignment
parameterization interface, V5.0 or higher
You must create a valid project under the hardware configuration and upload it
to the CPU before you can update the firmware of the communications
processor with the parameterization interface
The instructions accompanying the firmware update always detail the
destination directories for the files.
The ..\CP341.nnn path always identifies the firmware version.
5-6
Loading Firmware
You upload the firmware update to the CP 341 with the aid of the CP 341:
Point-to-Point Communication, Parameter Assignment parameterization interface.
Proceed as follows:
1. Switch the CPU to STOP mode.
2. Start the parameterization interface (see also section 5.2):
In SIMATIC Manager: File > Open Object > Project > Open Hardware Config
> double-click on CP 341 > select the Parameters button.
3. Select the menu command Options > Firmware Update.
Result:
If a connection can be established to the CP 341, the current module firmware
status is displayed.
If there is no firmware loaded on the CP 341, the display shows . This
can occur, for example, if a firmware update was canceled. The original
firmware is deleted prior to the cancellation. You have to upload firmware to the
module before it can be restarted.
4. Click on the Find File ... button to select the firmware to be loaded (*.UPD).
Note:
The basic firmware consists of three files each with a *.UPD extension. Select
only the file called HEADER.UPD for the basic firmware.
Result:
The version of the firmware you select is displayed under Status of selected
firmware.
5. Click on the Load Firmware button to start uploading to the CP 341. You are
prompted for confirmation. The upload procedure is canceled immediately if you
click on the Cancel button.
Note:
Before the basic firmware is deleted from the module, the CP 341 checks the
MLFB No. of the firmware to be downloaded in order to ensure that the
firmware is suitable for the CP 341.
Result:
The new firmware is loaded into the operating-system memory of the CP 341.
Done shows progress in bar-graph form and as a percentage. The module is
immediately ready for use as soon as the firmware update is completed.
5-7
LED Indicators
LED indicators for firmware update:
Table 5-2
Status
TXD
RXD
Comment
Remedy
Firmware update in
progress
on
on
on
Firmware update
completed
on
off
off
flashing
(2Hz)
off
off
Module firmware
deleted, firmware
update was
canceled, firmware
update still possible
flashing
(2Hz)
flashing
(2Hz)
flashing
(2Hz)
Delete/write failed
5-8
6
on Page
6.1
6-2
6.2
6-2
6.3
6-4
6.4
6-42
6.5
6-47
6.6
6-48
6-1
6.1
Interrupt Response
Calling the CP 341 function blocks in process (OB 40) or diagnostic (OB 82)
interrupts is not permitted.
6.2
Function Blocks/Functions
The table below lists the function blocks/functions of the CP 341 and describes
their purpose.
Table 6-1
FB/FC
Meaning
Protocol
FC 5 V24_STAT
(version 2.0)
ASCII driver
FC 6 V24_SET
(version 2.0)
ASCII driver
6-2
Table 6-1
FB/FC
Meaning
Protocol
FB 7 P_RCV_RK
3964(R)
procedure, ASCII
driver, RK 512
computer
connection
FB 8 P_SND_RK
For working with the function blocks, you only need to copy the required function
block in your project.
Warning
For the CP 341, the only permissible FC 5 V24_STAT and FC 6 V24_SET
functions are those with version 2.0. Data inconsistencies can occur if you use
version 1.0 of these functions.
Use only function blocks FB 7 P_RCV_RK and FB 8 P_SND_RK for data
transmission with the CP 341. Use of the function blocks FB 2 P_RCV and
FB 3 P_SEND of the CP 340 is not permitted, as their use can lead to data
inconsistencies.
6-3
6.3
Note
The parameters DONE, NDR, ERROR and STATUS are valid for only one module
run. To display the STATUS, you should therefore copy it to a free data area.
6.3.1
6-4
Data Consistency
Data consistency is limited to 32 bytes by the block size for data transmission
between CPU and CP 341.
The following applies to consistent data transmission of more than 32 bytes:
Sender: Do not access the transmit DB until all data has been transmitted
(DONE = 1).
Receiver: Do not access the receive DB until all data has been received
(NDR = 1). After receiving, block the receive DB (EN_R = 0) until you have
processed the data.
6-5
Note
The P_SND_RK function block does not have a parameter check, which means
that if there are invalid parameters, the CPU may switch to STOP mode.
Before the CP 341 can process an activated request after the CPU has changed
from STOP to RUN mode, the CP CPU start-up mechanism of the P_SND_RK FB
must be completed (see Section 6.5). Any requests initiated in the meantime do
not get lost. They are transmitted once the start-up coordination with the CP 341 is
finished.
What to Do
Block call
STL representation
LAD representation
CALL P_SND_RK,
I_P_SND_RK
SF:
REQ:
R:
LADDR:
=
=
=
=
DB_NO:
=
DBB_NO:
=
LEN:
=
R_CPU_NO: =
6-6
R_TYP:
R_NO:
R_OFFSET:
R_CF_BYT
=
=
=
=
R_CF_BIT
DONE:
ERROR:
=
=
=
STATUS:
I_SND_RK
P_SND_RK
EN
SF
ENO
DONE
REQ
R
LADDR
DB_NO
ERROR
STATUS
DBB_NO
LEN
R_CPU_NO
R_TYP
R_NO
R_OFFSET
R_CF_BYT
R_CF_BIT
Note
The parameters EN and ENO are only present in the graphical representation
(LAD or FBD). To process these parameters, the compiler uses the binary
result BR.
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.
Note
Exception: If the error STATUS == W#16#1E0F occurs, you can consult the
SFCERR variable for more details of the error (see Section 8.3). This error
variable can only be loaded via a symbolic access to the instance DB.
6-7
Parameters, FB P_SND_RK
The following table lists the parameters of the P_SND_RK FB:
Note
The R_CPU_NO, R_TYP, R_NO, R_OFFSET, R_CF_BYT and R_CF_BIT
parameters are of no significance for the 3964(R) procedure and can be ignored.
You can also ignore the SF parameter, because it defaults to S for send.
Table 6-2
Name
Data Type
Explanation
Permitted Values,
Comment
REQ
INPUT
BOOL
INPUT
BOOL
Aborts request
LADDR
INPUT
INT
DB_NO
INPUT
INT
DBB_NO
INPUT
INT
0 DBB_NO 8190
Transmitted data as of data word
LEN
INPUT
INT
Data length
DONE1
OUTPUT
BOOL
ERROR1
OUTPUT
BOOL
STATUS1
OUTPUT
WORD
Error specification
If ERROR == 1, STATUS
parameter contains error details
6-8
REQ
DONE
Figure 6-1
SEND request
not executed
(sending
deactivated)
Completion without
RESET transmitted
RESET transmitted
Completion without
Sending request
ERROR
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 1 during the whole
transmission procedure.
6-9
Note
The P_RCV_RK function block does not have a parameter check, which means
that if there are invalid parameters, the CPU may switch to STOP mode.
Before the CP 341 can receive a request after the CPU has changed from STOP
to RUN mode, the CP-CPU start-up mechanism of the P_RCV_RK FB must be
completed (see Section 6.5).
6-10
What to Do
Block call
STL representation
LAD representation
I_RCV_RK
EN_R:
R:
LADDR:
=
=
=
P_RCV_RK
EN
EN_R
ENO
NDR
DB_NO:
DBB_NO:
L_TYP:
L_NO:
=
=
=
=
R
LADDR
DB_NO
DBB_NO
ERROR
LEN
STATUS
L_TYP
L_OFFSET:
L_CF_BYT
L_CF_BIT
NDR:
=
=
=
=
ERROR:
LEN:
STATUS:
=
=
=
L_NO
L_OFFSET
L_CF_BYT
L_CF_BIT
Note
The parameters EN and ENO are only present in the graphical representation
(LAD or FBD). The compiler uses the binary result BR to process this parameter.
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.
Note
Exception: If the error STATUS == W#16#1E0E occurs, you can consult the
SFCERR variable for more details of the error (see Section 8.3). This error
variable can only be loaded via a symbolic access to the instance DB.
6-11
Parameters, FB P_RCV_RK
The following table lists the parameters of the P_RCV_RK FB:
Note
The L_TYP, L_NO, L_OFFSET, L_CF_BYT and L_CF_BIT parameters are of no
significance for the 3964(R) procedure and can be ignored.
Table 6-3
Name
FB P_RCV_RK Parameters
Type
Data Type
Explanation
Permitted Values,
Comment
EN_R
INPUT
BOOL
INPUT
BOOL
Aborts request
LADDR
INPUT
INT
DB_NO
INPUT
INT
Receive DB No.:
CPU-specific, zero is not
allowed
DBB_NO
INPUT
INT
NDR1
OUTPUT
BOOL
ERROR1
OUTPUT
BOOL
LEN1
OUTPUT
INT
STATUS1
OUTPUT
WORD
Error specification
If ERROR == 1, STATUS
parameter contains error details
6-12
EN_R
NDR
ERROR
Figure 6-2
Receiving
RESET
Completion without
No receive
Receiving deactivated
Receiving
Completion without
Enable receive
LEN
(length)
Note
The EN_R must be set to static 1. During the receive request, the EN_R
parameter must be supplied with RLO 1 (result of logic operation).
6-13
6.3.2
Transmission Options
Active requests:
Use the 8 P_SND_RK function block (FB) to send active requests to the CP 341 in
the user program of the CPU. You can
send data from your programmable controller to a remote communication
partner (see section Sending Data with FB P_SND_RK)
fetch data from a remote communication partner and place it in an S7 data area
of your programmable controller (see Fetching Data with FB P_SND_RK)
Note: If you fetch data from a CP 341, you must always program a P_RCV_RK
function block on the CP 341.
Passive requests:
Use the 7 P_RCV_RK function block (FB) to coordinate the reading and readying
of data on the CP 341 by means of passive requests. The communication partner
is active. You can
read data sent by the communication partner in the S7 data area of your
programmable controller (see section Receiving data with FB P_RCV_RK)
Ready data in your programmable controller for a remote communication
partner (see section Readying Data with FB P_RCV_RK)
6-14
Data Consistency
Data consistency is limited to 32 bytes by the block size for data transmission
between CPU and CP 341.
The following applies to consistent data transmission of more than 32 bytes:
Sender: Do not access the transmit DB until all data has been transmitted
(DONE = 1).
Fetcher: Do not access the transmit DB until all data has been transmitted
(DONE = 1).
Receiver: Use the interprocessor communication flag functionality. Do not
access the receive DB until all data has been received (analysis of the
interprocessor communication flag for this request: Interprocessor
communication flag is set for one cycle at the FB if NDR = 1). Do not reset the
interprocessor communication flag to 0 until you have processed the received
data.
Readier: Use the interprocessor communication flag functionality. Do not
access the readied data until all data has been fetched (analysis of the
interprocessor communication flag for this request. Interprocessor
communication flag is set for one cycle at the FB if NDR = 1). Do not reset the
interprocessor communication flag to 0 until you have processed the data to
be fetched.
If your partner fetches the data from the areas I (inputs), O (outputs), F (flags),
T (times) or C (counters), data consistency is limited to 32 bytes unless you use
the interprocessor communication flag to prevent access to these areas by other
instances in the user program while data transfer is in progress.
6-15
Note
The P_SND_RK function block (FB) does not have a parameter check, which
means that if there are invalid parameters, the CPU may switch to STOP mode.
6-16
6-17
What to Do
Block call
STL representation
LAD representation
I_SND_RK
SF:
REQ:
R:
=
=
=
P_SND_RK
EN
SF
ENO
DONE
LADDR:
DB_NO:
DBB_NO:
LEN:
=
=
=
=
REQ
R
LADDR
DB_NO
ERROR
STATUS
R_CPU_NO: =
R_TYP:
=
R_NO:
=
R_OFFSET: =
DBB_NO
LEN
R_CPU_NO
R_TYP
R_CF_BYT =
R_CF_BIT =
DONE:
=
R_NO
R_OFFSET
R_CF_BYT
R_CF_BIT
ERROR:
STATUS:
=
=
Note
The parameters EN and ENO are only present in the graphical representation
(LAD or FBD). To process these parameters, the compiler uses the binary
result BR.
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.
6-18
Parameters, FB P_SND_RK
The table below describes the parameters of the 8 P_SND_RK function block for
the send data request.
Table 6-4
Parameters of the 8 P_SND_RK Function Block for the Send Data Request
Name
Type
Data Type
Explanation
Permitted Values,
Comment
SF
INPUT
CHAR
REQ
INPUT
BOOL
INPUT
BOOL
Aborts request
LADDR
INPUT
INT
DB_NO
INPUT
INT
DBB_NO
INPUT
INT
LEN
INPUT
INT
R_CPU_NO INPUT
INT
0 R_CPU_NO 4,
only for multiprocessor operation,
default: 1
R_TYP
INPUT
CHAR
D: data block
X: extended data block
R_NO
INPUT
INT
0 R_NO 255
R_OFFSET
INPUT
INT
0 R_OFFSET 510,
even numbers only
R_CF_BYT
INPUT
INT
Interprocessor
communication flag byte
on partner CPU
0 R_CF_BYTE 255
default: 255 (means: without
interprocessor communication flag)
R_CF_BIT
INPUT
INT
Interprocessor
communication flag bit on
partner CPU
0 R_CF_BIT 7
DONE1
OUTPUT BOOL
ERROR1
OUTPUT BOOL
STATUS1
OUTPUT WORD
Error specification
SF = S (Send)
default: S
6-19
Specifications in the RK 512 Message Frame Header for the Send Data Request
To destination,
Source on your S7
programmable
bl
partner
t
CPU
controller (local CPU)
5/6 D-DBNO/D
offset
7/8 number in
Data block
Data block
AD
DB/DW
words
Data block
AD
DB/DW
words
Abbreviations:
6-20
D-DBNO
D-Offset
DW
Offset in words
REQ
DONE
Figure 6-3
SEND request
not executed
(sending
deactivated)
Completion without
RESET transmitted
RESET transmitted
Completion without
Sending request
ERROR
Time Sequence Chart of the 8 P_SND_RK Function Block for the Send Data
Request
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 1 during the whole
transmission procedure.
6-21
Note
If you fetch data from a CP 341, you must always program a P_RCV_RK function
block on the CP 341.
The data transmission is initiated by a positive edge at the REQ input. A data
transmission operation can run over several calls (program cycles), depending on
the amount of data involved (LEN).
The LADDR parameter specifies the address of the CP 341 to be addressed.
The communication partner from which you want to fetch data is specified by the
CPU number (R_CPU_NO, relevant only for multiprocessor communication).: The
following data types (R_TYP) are permissible sources for the data to be fetched:
data blocks, extended data blocks, flags, inputs, outputs, counters and times. The
source is fully specified by the data type (R_TYP), the data block number (R_NO,
relevant only for data blocks and extended data blocks) and the offset
(R_OFFSET) of the first data byte to be sent in this area.
R_CF_BYT and R_CF_BIT define the interprocessor communication flag byte and
bit on the partner CPU.
The only permissible destinations are data blocks (DB). The destination is fully
specified by the data block number (DB_NO) and the offset (DBB_NO) of the first
data byte to be written in this data block.
The P_SND_RK function block (FB) can be called in the cycle when the signal
state at the R parameter input is 1. This aborts the transmission from the CP 341
and sets the P_SND_RK FB back to its initial state. If the R input is statically
showing the signal state 1, this means that fetching is deactivated.
6-22
Note
The P_SND_RK function block (FB) does not have a parameter check, which
means that if there are invalid parameters, the CPU may switch to STOP mode.
6-23
What to Do
Block call
STL representation
LAD representation
I_SND_RK
SF:
REQ:
R:
=
=
=
P_SND_RK
EN
SF
ENO
DONE
LADDR:
DB_NO:
DBB_NO:
LEN:
=
=
=
=
REQ
R
LADDR
DB_NO
ERROR
STATUS
R_CPU_NO: =
R_TYP:
=
R_NO:
=
R_OFFSET: =
DBB_NO
LEN
R_CPU_NO
R_TYP
R_CF_BYT =
R_CF_BIT =
DONE:
=
R_NO
R_OFFSET
R_CF_BYT
R_CF_BIT
ERROR:
STATUS:
=
=
Note
The parameters EN and ENO are only present in the graphical representation
(LAD or FBD). To process these parameters, the compiler uses the binary
result BR.
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.
6-24
Parameters, FB P_SND_RK
The table below describes the parameters of the 8 P_SND_RK function block for
the fetch data request.
Table 6-6
Name
Parameters of the 8 P_SND_RK Function Block for the Fetch Data Request
Type
Data
Type
Explanation
Permitted Values,
Comment
SF
INPUT
CHAR
REQ
INPUT
BOOL
INPUT
BOOL
Aborts request
LADDR
INPUT
INT
DB_NO
INPUT
INT
Destination data block number Send DB No.; CPU-specific, (zero is not allowed)
DBB_NO
INPUT
INT
LEN
INPUT
INT
R_CPU_NO
INPUT
INT
R_TYP
INPUT
CHAR
D: data block
X: extended data block
F: flag
I: inputs
O: outputs
C: counters
T: times
R_NO
INPUT
INT
0 R_NO 255
R_OFFSET
INPUT
INT
R_CF_BYT
INPUT
INT
Interprocessor
communication flag byte on
partner CPU
0 CF_BYTE 255
default: 255 (means: without interprocessor
communication flag)
R_CF_BIT
INPUT
INT
Interprocessor
communication flag bit on
partner CPU
0 CF_BIT 7
DONE1
OUTPUT
BOOL
ERROR1
OUTPUT
BOOL
STATUS1
OUTPUT
WORD
Error specification
1
2
SF = F (Fetch)
default: S (send)
6-25
Source on
partner CPU
R_NO
R_OFFSET**
(in bytes)
Data block
0-255
0 - 510*
Extended data
block
0-255
0 - 510*
Memory Marker
irrelevant
0-255
Inputs
irrelevant
0-255
Outputs
irrelevant
0-255
Counters
irrelevant
0-255
Times
irrelevant
0-255
Specifications in the RK 512 Message Frame Header for the Fetch Data Request
Source on
partner
t
CPU
Destination on your S7
programmable
bl
controller (local CPU)
5/6 S-DBNO/S
offset
7/8 number in
Data block
Data block
ED
DB/DW
words
Extended data
block
Data block
EX
DB/DW
words
Memory Marker
Data block
EM
Byte address
bytes
Inputs
Data block
EI
Byte address
bytes
Outputs
Data block
EQ
Byte address
bytes
Counters
Data block
EC
Counter number
words
Times
Data block
ET
Time number
words
Abbreviations:
6-26
S-DBNO
S-Offset
REQ
DONE
Figure 6-4
FETCH request
not executed
(sending
deactivated)
Completion without
RESET transmitted
RESET transmitted
Completion without
Sending request
ERROR
Time Sequence Chart of the 8 P_SND_RK Function Block for the Fetch Data
Request
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 1 during the whole
transmission procedure.
6-27
Note
The P_RCV_RK function block does not have a parameter check, which means
that if there are invalid parameters, the CPU may switch to STOP mode.
6-28
What to Do
Block call
STL representation
LAD representation
I_RCV_RK
EN_R:
R:
LADDR:
=
=
=
EN
EN_R
P_RCV_RK
DB_NO:
DBB_NO:
L_TYP:
L_NO:
=
=
=
=
R
LADDR
DB_NO
DBB_NO
L_OFFSET:
L_CF_BYT
L_CF_BIT
NDR:
=
=
=
=
ERROR:
LEN:
STATUS:
=
=
=
ENO
NDR
ERROR
LEN
STATUS
L_TYP
L_NO
L_OFFSET
L_CF_BYT
L_CF_BIT
Note
The parameters EN and ENO are only present in the graphical representation
(LAD or FBD). To process these parameters, the compiler uses the binary
result BR.
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.
6-29
Note
Exception: If the error STATUS == W#16#1E0E occurs, you can consult the
SFCERR variable for more details of the error (see Section 8.3). This error
variable can only be loaded via a symbolic access to the instance DB.
6-30
Parameters, FB P_RCV_RK
The table below describes the parameters of the 7 P_RCV_RK function block for
the receive data request.
Table 6-9
Parameters of the 7 P_RCV_RK Function Block for the Receive Data Request
Name
Type
Data Type
Explanation
Permitted Values,
Comment
EN_R
INPUT
BOOL
INPUT
BOOL
Aborts request
LADDR
INPUT
INT
DB_NO
INPUT
INT
DBB_NO
INPUT
INT
0 DBB_NO 8190
Received data as of data word
(relevant only if destination is
DX)
L_TYP1
OUTPUT
CHAR
D: data block
L_NO1
OUTPUT
INT
0 L_NO 255
L_OFFSET1
OUTPUT
INT
0 L_OFFSET 510
L_CF_BYT1
OUTPUT
INT
Interprocessor
communication flag byte
on local CPU
0 L_CF_BYTE 255
255 means: without
interprocessor communication
flag
L_CF_BIT1
OUTPUT
INT
Interprocessor
communication flag bit on
local CPU
0 L_CF_BIT 7
NDR1
OUTPUT
BOOL
ERROR1
OUTPUT
BOOL
LEN1
OUTPUT
INT
STATUS1
OUTPUT
WORD
Error specification
If ERROR == 1, STATUS
parameter contains error details
6-31
EN_R
NDR
ERROR
Receiving
RESET
Completion without
No receive
Receiving deactivated
Receiving
Completion without
Enable receive
LEN*
(length)
Figure 6-5
Time Sequence Chart of the 7 P_RCV_RK Function Block for the Receive
Data Request
Note
The EN_R must be set to static 1. During the receive request, the EN_R
parameter must be supplied with RLO 1 (result of logic operation).
6-32
Note
When the communication partner fetches times or counters from the CP 341, the
length is limited to a maximum of 32 bytes (16 times or counters, each consisting
of 2 bytes).
6-33
Note
The P_RCV_RK function block does not have a parameter check, which means
that if there are invalid parameters, the CPU may switch to STOP mode.
6-34
What to Do
Block call
STL representation
LAD representation
I_RCV_RK
EN_R:
R:
LADDR:
=
=
=
EN
EN_R
DB_NO:
DBB_NO:
L_TYP:
L_NO:
=
=
=
=
R
LADDR
DB_NO
DBB_NO
L_OFFSET: =
L_CF_BYT =
L_CF_BIT =
NDR:
=
ERROR:
LEN:
STATUS:
P_RCV_RK
ENO
NDR
ERROR
LEN
STATUS
L_TYP
L_NO
L_OFFSET
L_CF_BYT
L_CF_BIT
=
=
=
Note
The parameters EN and ENO are only present in the graphical representation
(LAD or FBD). To process these parameters, the compiler uses the binary
result BR.
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.
Note
Exception: If the error STATUS == W#16#1E0E occurs, you can consult the
SFCERR variable for more details of the error (see Section 8.3). This error
variable can only be loaded via a symbolic access to the instance DB.
6-35
Parameters, FB P_RCV_RK
The table below describes the parameters of the 7 P_RCV_RK function block for
the ready data request.
Table 6-10 Parameters of the 7 P_RCV_RK Function Block for the Ready Data Request
Name
Type
Data Type
Explanation
Permitted Values,
Comment
EN_R
INPUT
BOOL
INPUT
BOOL
Aborts request
LADDR
INPUT
INT
DB_NO
INPUT
INT
irrelevant
DBB_NO
INPUT
INT
irrelevant
L_TYP1
OUTPUT
CHAR
D: data block
F: flag
I: inputs
O: outputs
C: counters
T: times
L_NO1
OUTPUT
INT
L_OFFSET1
OUTPUT
INT
0 L_OFFSET 510
(depends on area type)
L_CF_BYT1
OUTPUT
INT
Interprocessor
communication flag byte
on local CPU
0 L_CF_BYTE 255
255 means: without
interprocessor communication
flag
L_CF_BIT1
OUTPUT
INT
Interprocessor
communication flag bit on
local CPU
0 CF_BIT 7
NDR1
OUTPUT
BOOL
ERROR1
OUTPUT
BOOL
LEN1
OUTPUT
INT
STATUS1
OUTPUT
WORD
Error specification
If ERROR == 1, STATUS
parameter contains error details
6-36
EN_R
NDR
ERROR
Receiving
RESET
Completion without
No receive
Receiving deactivated
Receiving
Completion without
Enable receive
LEN*
(length)
Figure 6-6
Time Sequence Chart of the 7 P_RCV_RK Function Block for the Ready
Data Request
Note
The EN_R must be set to static 1. During the receive request, the
EN_R parameter must be supplied with RLO 1 (result of logic operation).
6-37
6.3.3
Note
For the CP 341, the only permissible FC 5 V24_STAT and FC 6 V24_SET
functions are those with version 2.0. Data inconsistencies can occur if you use
version 1.0 of these functions.
6-38
What to Do
Block call
STL representation
CALL
LAD representation
V24_STAT
V24_STAT
LADDR: =
DTR_OUT: =
EN
LADDR
DSR_IN: =
RTS_OUT: =
CTS_IN: =
DCD_IN: =
RI_IN:
ENO
DTR_OUT
DSR_IN
RTS_OUT
CTS_IN
DCD_IN
RI_IN
Note
The parameters EN and ENO are only present in the graphical representation
(LAD or FBD). To process these parameters, the compiler uses the binary
result BR.
Note
A minimum pulse time is necessary for a signal change to be identified. Significant
time periods are the CPU cycle time, the updating time on the CP 341 and the
response time of the communication partner.
6-39
Parameters FC 5 V24_STAT
The following table lists the parameters of the 5 V24_STAT FC:
Table 6-11 FC 5 V24_STAT Parameters
Name
Type
Data Type
Explanation
Permitted Values,
Comment
LADDR
INPUT
INT
DTR_OUT
OUTPUT
BOOL
DSR_IN
OUTPUT
BOOL
RTS_OUT
OUTPUT
BOOL
Request to send,
CP 341 ready to send1
CTS_IN
OUTPUT
BOOL
Clear to send,
(CP 341 input)
communication partner can
receive data from the CP
341 (response to RTS = ON
of the CP 341)1
DCD_IN
OUTPUT
BOOL
RI_IN
OUTPUT
BOOL
Ring Indicator,
call signal
For further information on this RS 232C secondary signal, see Section 2.2.4.
6-40
What to Do
Block call
STL representation
CALL
LAD representation
V24_SET
V24_SET
LADDR:
RTS:
=
=
EN
LADDR
DTR:
RTS
DTR
ENO
Note
The parameters EN and ENO are only present in the graphical representation
(LAD or FBD). To process these parameters, the compiler uses the binary
result BR.
Parameters FC 6 V24_SET
The following table lists the parameters of the 6 V24_SET FC:
Table 6-12 FC 6 V24_SET Parameters
Name
Type
Data Type
Explanation
Permitted Values,
Comment
LADDR
INPUT
INT
RTS
INPUT
BOOL
Request to send,
CP 341 ready to send1
DTR
INPUT
BOOL
For further information on the RS 232C secondary signals, see Section 2.2.4.
6-41
6.4
6.4.1
Addressing
The data operands in data blocks are addressed bytewise in STEP 7 (in contrast to
STEP 5, where addressing is word-based). You therefore have to convert the
addresses of the data operands.
DW [n]
STEP 5
DL [n]
DR [n]
15 14 13 12 11 10
DBW [2n]
STEP 7
DBB [2n]
7
Figure 6-7
DBB [2n+1]
2
6-42
Examples
The STEP 5 data operands in the left column of the table become the STEP 7 data
operands in the right column.
STEP 5
6.4.2
STEP 7
DW 10
DBW 20
DL 10
DBB 20
DR 10
DBB 21
D 10.0
DBX 21.0
D 10.8
DBX 20.0
D 255.7
DBX 511.7
Direct/Indirect Parameterization
With STEP 7 the data blocks cannot be indirectly parameterized (parameters
transferred in the currently selected data block) as they can with STEP 5.
All block parameters accept both constants and variables, so the distinction
between direct and indirect parameterization is no longer necessary with STEP 7.
STL
Explanation
Network 1:
CALL FB 8, DB8
SF
:=
REQ
:=
R
:=
LADDR
:=
DB_NO
:=
DBB_NO
:=
LEN
:=
R_CPU_NO :=
R_TYP
:=
R_NO
:=
R_OFFSET :=
R_CF_BYT :=
R_CF_BIT :=
DONE
:=
ERROR
:=
STATUS
:=
S
M 0.6
M 5.0
+336
+11
+0
+15
M 26.0
M 26.1
MW 27
//Sending request
//Activates SEND
//Activates RESET
//Basic address, PB336
//Data block DB11
//As of data word DBB 0
//Length 15 bytes
//
//
//
//
//
//
//Terminated without error
//Terminated with error
//Status word
6-43
STL
Explanation
Network 1:
CALL FB 8, DB8
SF
:=
REQ
:=
R
:=
LADDR
:=
DB_NO
:=
DBB_NO
:=
LEN
:=
R_CPU_NO :=
R_TYP
:=
R_NO
:=
R_OFFSET :=
R_CF_BYT :=
R_CF_BIT :=
DONE
:=
ERROR
:=
STATUS
:=
S
M 0.6
M 5.0
MW 21
MW 40
MW 42
MW 44
M 26.0
M 26.1
MW 27
//Sending request
//Activates SEND
//Activates RESET
//Basic address in MW21
//DB no. in MW40
//DBB No. in MW42
//Length in MW44
//
//
//
//
//
//
//Terminated without error
//Terminated with error
//Status word
Example 1
The symbol name for the data block is entered in the symbol table, while the
symbol name for the data operand is declared in the corresponding data block.
6-44
STL
Explanation
DB 10.DBW 0
CP_DB.SEND_DW_NO
Example 2
The symbol name of the data block used, DB 10, is CP_DB; the symbol name for
the send DB number is SEND_DBNO and is located in data block DB 10 in the
data word DBW 0.
The start address of the send message frame is SEND_DWNO and is located in
the data block DB 10 in DBW 2, and the message frame length is SEND_LEN
and is located in the data block DB 10 in DBW 4.
The variable used for the module address is the memory word BGADR (MW21),
for the DONE parameter the flag SEND_DONE (M26.0), for the ERROR
parameter the memory bit SEND_ERROR (M26.1), and for the STATUS
parameter the memory word SEND_STATUS (MW27).
The STL listings for the example are shown on the following page.
STL
Explanation
Network 1:
CALL FB 8, DB8
SF
:=
REQ
:=
R
:=
LADDR
:=
DB_NO
:=
DBB_NO
:=
LEN
:=
R_CPU_NO :=
R_TYP
:=
R_NO
:=
R_OFFSET :=
R_CF_BYT :=
R_CF_BIT :=
DONE
:=
ERROR
:=
STATUS
:=
S
M 0.6
M 5.0
MW 21
DB10.DBW0
DB10.DBW2
DB10.DBW4
M 26.0
M 26.1
MW 27
//Sending request
//Activates SEND
//Activates RESET
//Basic address in MW21
//DB no. in DBW0 of DB10
//From DBB no., located in DBW2 of DB10
//Length located in DBW4 of DB10
//
//
//
//
//
//
//Terminated without error
//Terminated with error
//Status word
6-45
STL
Explanation
Network 1:
CALL FB 8, DB8
SF
:=
REQ
:=
R
:=
LADDR
:=
DB_NO
:=
DBB_NO
:=
LEN
:=
R_CPU_NO :=
R_TYP
:=
R_NO
:=
R_OFFSET :=
R_CF_BYT :=
R_CF_BIT :=
DONE
:=
ERROR
:=
STATUS
:=
S
M 0.6
M 5.0
BGADR
CP_DB.SEND_DBNO
CP_DB.SEND_DWNO
CP_DB.SEND_LEN
SEND_DONE
SEND_ERROR
SEND_STATUS
//Sending request
//Activates SEND
//Activates RESET
//Basic address
//Send DB no.
//Message frame as of data word
//Message frame length
//
//
//
//
//
//
//Terminated without error
//Terminated with error
//Status word
EN/ENO Mechanism
The parameters EN and ENO are only present in the graphical representation
(LAD or FBD). To process these parameters, the compiler uses the binary result
(BR).
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.
6-46
6.5
Disabling Alarms
In the function blocks the interrupts are not disabled.
6-47
6.6
Memory Requirements
The table below shows the memory requirements of the CP 341 function
blocks/functions.
Table 6-13 Memory Requirements of the Function Blocks/Functions (in bytes)
Name
Block
Version
Load Memory
Work Memory
Local Data
FC 5
V24_STAT
2.0
188
72
FC 6
V24_SET
2.0
156
48
FB 7
P_RCV_RK
2.1
3584
2982
106
FB 8
P_SND_RK
2.3
3036
2490
32
Run Times
The table below shows the runtimes of the CP 341 function blocks/functions.
Table 6-14 Runtimes of the Function Blocks/Functions in s
Block
Name
Version
Function
CPU 313/
CPU 314
CPU 315/
CPU 315DP
CPU 318-2
DP
CPU 614
FC 5
V24_STAT
2.0
Reading
RS 232C
secondary
signals
140
120
29
120
FC 6
V24_SET
2.0
Setting
RS 232C
secondary
signals
160
130
37
130
FB 7
P_RCV_RK
2.1
Idling
510
450
65
400
Receiving*
1800
1800
140
1500
Readying*
1800
1800
140
1500
Idling
410
360
65
350
Sending*
2300
2200
140
1800
Fetching*
2300
2200
140
1800
FB 8
P_SND_RK
2.3
The run times are referenced to a data block of 1 to 32 bytes; in the case of RK 512 the listed run time
must be added once again per request as the basic allowance for transmission of the parameters.
6-48
RESET/RESTART
P_RCV_RK
3
3
4
P_SND_RK
3
3
4
V24_STAT
V24_SET
>> 2
Before the CP 341 can process an activated request after the CPU has changed
from STOP to RUN mode, the CP-CPU start-up mechanism P_SND_RK must be
completed. Any requests initiated in the meantime do not get lost. They are
transmitted once the start-up coordination with the CP 341 is finished.
Before the CP 341 can receive a message frame in the user program after a
change in the CPU mode from STOP to RUN, the CP-CPU start-up mechanism
P_RCV_RK must be completed.
WR_REC
SFC 59
RD_REC
6-49
6-50
7
on Page
7.1
7-2
7.2
7-2
7.3
7-4
7-1
7.1
STOP
When the CP 341 is in STOP mode, no protocol driver is active and all send and
receive requests from the CPU are given a negative acknowledgment.
The CP 341 remains in STOP mode until the cause of the stop is removed
(e.g. break, invalid parameter).
Reparameterization
For reparameterization, the protocol driver is initialized. The SF LED is on during
reparameterization.
Sending and receiving are not possible, and send and receive message frames
stored in the CP 341 are lost when the driver is restarted. Communication between
the CP and the CPU is started afresh (active message frames are aborted).
At the end of the reparameterization, the CP 341 is ready to send and receive.
RUN
The CP 341 processes the requests from the CPU. It provides the message
frames received by the communications partner to be fetched by the CPU.
7.2
Initialization
As soon as the CP 341 is energized, all module components are initialized.
7-2
Parameterization
Parameterization means that the CP 341 receives the module parameters
assigned to the current slot as created with the CP 341: Point-to-Point
Communication, Parameter Assignment parameterization interface.
Reparameterization is performed. The CP 341 is now ready for operation.
CPU/device
Order Number
313
6ES7 313-1AD00-0AB0
314
6ES7 314-1AE00-0AB0
Procedure
Switch power supply to CPU
off
ff then
th on again.
i
6ES7 314-1AE01-0AB0
314 IFM
6ES7 314-5AE00-0AB0
315
6ES7 315-1AF00-0AB0
315-2 DP
6ES7 315-2AF00-0AB0
614
6ES7 614-1AH00-0AB0
CPU
Order Number
313
6ES7 313-1AD01-0AB0
314
6ES7 314-1AE02-0AB0
314 IFM
6ES7 314-5AE01-0AB0
315
6ES7 315-1AF01-0AB0
315-2 DP
6ES7 315-2AF01-0AB0
318-2 DP
6ES7 318-2AJ00-0AB0
614
6ES7 614-1AH01-0AB0
Procedure
Switch the CPU to STOP
and
d then
th back
b k to
t RUN.
RUN
7-3
7.3
CPU STOP
In CPU-STOP mode, communication via the S7 backplane bus is not possible. Any
active CP-CPU data transmission, including both send and receive message
frames, is aborted and the connection is reestablished.
Data traffic at the interface of the CP 341 is continued with the ASCII driver in the
case of parameterization without flow control. In other words, the current send
request is completed. In the case of the ASCII driver, receive message frames
continue to be received until the receive buffer is full.
CPU START-UP
On start-up, the CP sends the parameters created with the CP 341: Point-to-Point
Communication, Parameter Assignment parameterization interface. The CP 341
only reparameterizes if the parameters have changed.
CPU RUN
When the CPU is in RUN mode, sending and receiving are unrestricted. In the first
FB cycles following the CPU restart, the CP 341 and the corresponding FBs are
synchronized. Only then is a new FB or FC executed.
Note
The CP 341 does not send data to the communications partner until it has
received all data from the CPU.
7-4
8
on Page
8.1
8-2
8.2
8-3
8.3
8-4
8.4
8-17
8.5
8-19
8.6
Diagnostic Alarm
8-21
8-1
8.1
8-2
Diagnostics Alarm
The CP 341 can trigger a diagnostics alarm on the CPU assigned to it. The CP 341
provides 4 bytes of diagnostics information on the S7-300 backplane bus. This
information is analyzed via the user program (OB 82) or using a programming
device to read from the CPU diagnostics buffer.
The CP 341 also enters diagnostic events that trigger a diagnostics alarm in its
diagnostic buffer.
When a diagnostics alarm event occurs, the SF LED (red) lights up.
8.2
Special LEDs
TXD (green) Sending active; lights up when the CP 341 is sending user data
via the interface
RXD (green)Receiving active; lights up when the CP 341 is receiving user
data via the interface
Note
Section 5.5 contains information on LED displays which can occur when you load
firmware updates.
8-3
8.3
13 12
STATUS
Bit no. 15
Reserve
Figure 8-1
Event class
Event number
(Error number)
Example
The figure below illustrates the contents of the STATUS parameter for the event
Request aborted due to complete restart, restart or reset (event class: 1EH,
event number 0DH).
Event: Request aborted due to complete restart, restart or reset
STATUS
24
Reserve
Figure 8-2
8-4
20 27
Event
class:1EH
20
0 1
Event number
(Error number): 0DH
Example: Structure of the STATUS Parameter for the Event Request Aborted
Due to Complete Restart, Restart or Reset
Event Classes
The table below describes the various event classes and numbers.
Table 8-1
Event No.
Event Text
Remedy
(00)03H
(00)04H
(00)07H
(00)08H
Event Text
(01)01H
(01)02H
(01)03H
(01)10H
Fault in CP firmware
Remedy
CP defective; replace CP.
Event No.
(02)0FH
Event Text
Remedy
Event Text
Remedy
8-5
Table 8-1
Event No.
Event Text
Remedy
(04)03H
(04)07H
(04)08H
8-6
Table 8-1
Event No.
(04)09H
(04)0AH
Remedy
receive block.
disabled.
data is to be transferred is available.
Event
Remedy
(05)01H
(05)02H
(05)14H
(05)15H
(05)16H
(05)17H
8-7
Table 8-1
Event No.
(05)1AH
Remedy
See the remedy for the previous error
number.
Event Text
Remedy
(06)01H
(06)02H
(06)03H
(06)04H
Error in 4th command byte (command letter Header layout error at partner or a command
incorrect)
combination has been requested that is not
permitted at the CP. Check the permissible
commands. Check for malfunction at partner
device, possibly by using interface test
device switched into the transmission line.
(06)05H
(06)06H
(06)07H
(06)08H
(06)09H
(06)0AH
(06)0BH
8-8
Table 8-1
Event No.
Remedy
(06)0CH
(06)0DH
(06)0FH
(06)10H
(06)11H
8-9
Table 8-1
Event No.
(06)12H
Event Text
Error sending the (continuation) response
message frame. An associated procedure
error number has been entered in STATUS
immediately beforehand.
Remedy
See remedy for the error number entered
immediately beforehand in STATUS.
Event
Transmission of the first repetition:
(07)02H
(07)03H
(07)04H
(07)06H
Remedy
A repetition is not an error, but it can be an
indication that there are disturbances on the
transmission line or that the partner device is
behaving incorrectly. If the message frame
still has not been transmitted after the
maximum number of repetitions, an error
number describing the first error that
occurred is output.
Check for malfunction at partner device,
possibly by using interface test device
switched into the transmission line.
8-10
Table 8-1
Event No.
(07)08H
(07)09H
Event
Remedy
(07)0AH
Event
Expectation of the first repetition:
An error was detected on receipt of a
message frame, and the CP requests a
repetition by means of negative
acknowledgment (NAK) at the partner.
(08)02H
Remedy
A repetition is not an error, but it can be an
indication that there are disturbances on the
transmission line or that the partner device is
behaving incorrectly. If the message frame
still has not been transmitted after the
maximum number of repetitions, an error
number describing the first error that
occurred is output.
Check for malfunction at partner device,
possibly by using interface test device
switched into the transmission line.
8-11
Table 8-1
Event No.
(08)06H
Event
Character delay time exceeded:
Remedy
Partner device faulty or too slow. Use an
interface test device switched into the
transmission line to check.
(08)0AH
(08)0CH
Transmission error:
BREAK:
(08)16H
or
8-12
Table 8-1
Event No.
(09)02H
Event Text
RK 512 only: Memory access error at
partner (memory does not exist)
When SIMATIC S5 is the partner:
Remedy
Check that the partner has the desired data
area and that it is big enough, or check the
parameters of the called system function
block.
Check the specified length at the system
function block.
(09)05H
(09)09H
RK 512 only: DB/DX disabled at partner by In partner program: After processing of the
coordination flag
last transmission data, reset the coordination
flag.
In own program: Repeat the request.
(09)0AH
8-13
Table 8-1
Event No.
Event Text
Remedy
(09)0BH
(09)0CH
(09)0DH
(09)0EH
Event Text
RK 512 only: Synchronization error of
partner, because:
Remedy
This error is reported after your own
programming device is restarted in the case
of long message frames or when the partner
is restarted. This represents normal system
start-up behavior. You do not have to correct
anything.
The error can also occur during operation as
a consequence of error statuses only
recognized by the partner.
Otherwise, you can assume an error on the
part of the partner device. The error may not
occur in the case of requests < 128 bytes.
(0A)02H
(0A)03H
8-14
Table 8-1
Event No.
Event Text
Remedy
(0A)04H
(0A)05H
Note
An error message is only output if the ERROR bit (request completed with error) is
set. In all other cases the STATUS word is zero.
8-15
Event Class 30
Event class 30 contains error messages which might occur during communication
between the CP 341 and the CPU via the S7 backplane bus.
The table below describes event class 30.
Table 8-2
Event Class 30
Event Class 30 (1EH):
Error during communication between CP and CPU
Event No.
Event
Further Information/Remedy
(1E)0DH
(1E)0EH
(1E)0FH
(1E)41H
8-16
8.4
REATEL
Error Messages
Event Class/Event Number
0AH
0905H
0CH
0301H
0607H
0609H
060AH
0902H
10H
0301H
0601H
0604H
0605H
090BH
12H
0904H
14H
0606H
0903H
16H
0602H
0603H
090AH
2AH
060DH
090DH
32H
060FH
0909H
8-17
Table 8-3
REATEL
Error Messages
Event Class/Event Number
34H
0608H
060BH
060CH
0611H
090CH
36H
060EH
0908H
8-18
8.5
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.
This means that the most recent entry is always first. The contents of the
diagnostics buffer are lost in the event of a POWER OFF or when the CP 341 is
reparameterized.
Note
If you want to see the times of the individual diagnostic entries, you must select
the CPU in HW Config and synchronize the clocks in the Diagnosis/Clock folder
(synchronization mode Master, time interval e. g. 10 seconds). The time cannot
be displayed if the CP 341 is operated in a distributed configuration (ET 200M).
8-19
Note
Diagnostic events in the diagnostic buffer of the CP 341 can be read using STEP 7
as of Version 3.2.
8-20
8.6
Diagnostic Alarm
The CP 341 can trigger a diagnostics alarm on the assigned CPU, thus indicating a
malfunction of the CP 341. You can specify at parameterization whether the
CP 341 is to trigger a diagnostics alarm or not in the event of serious errors.
Diagnostics alarm = NO is the default.
Diagnostics Alarm
In the event of an error, the CP 341 provides diagnostics data on the
S7-300 backplane bus. In response to a diagnostics alarm, 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 by means of an attached
programming device.
When a diagnostics 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 programming error responses in the user program in
OB 82.
If no OB 82 is programmed, the CPU automatically enters STOP mode in the
event of a diagnostics alarm.
8-21
Bit 0 in the 1st byte is the group error display (SF). Bit 0 is always set to 1 if at
least one bit from bits 1 to 7 is set to 1, i.e. if at least one error is entered in the
diagnostics data.
Event
1st byte
3rd byte
4th byte
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
Wire break
0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
Incorrect parameter
1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Event
1st byte
2nd byte
3rd byte
4th byte
Wire break
25H
0CH
02H
00H
Incorrect
parameter
83H
0CH
00H
00H
8-22
9
on Page
9.1
General
9-2
9.2
Device Configuration
9-3
9.3
Settings
9-3
9.4
Blocks Used
9-5
9.5
9-6
9.6
9-7
9-1
9.1
General
The programming example given here and included in the cp340_41 project
describes standard functions for operating the CP 341 communications processor.
Objectives
The programming example
aims to show examples of the most important functions
enables the correct functioning of the connected hardware to be checked (and
is therefore simple and easy to follow)
can be extended for your own purposes without difficulty.
The example shows how an 3964(R)/ASCII connection or an RK 512 computer
connection to a communications partner can be configured using the standard
function blocks P_SND_RK and P_RCV_RK (to send and receive data
respectively).
The example also shows how the inputs and outputs of the CP 341 can be
controlled and monitored using the V24_STAT and V24_SET standard functions.
There are three SIMATIC stations in the example because the CP 341 has to be
parameterized differently for data transfer:
CP341 protocol 3964: Connection with FB P_SND_RK and FB P_RCV_RK
CP341 protocol RK512: Connection with FB P_SND_RK and FB P_RCV_RK
CP341 V24: Read and control RS 232C secondary signals with FC V24_STAT
and FC V24_SET
Note that the CP340 PTP Connection (point-to-point) and CP340 Printing and
V24 stations contain the examples for the CP 340.
The CP 341 is parameterized by the CPU when the latter is started up (system
service).
Requirements
The example can be executed with the minimum hardware equipment. The
STEP 7 function Monitor/Modify Variables is also used (e.g. to modify
transmitted data).
Program Example
The programming example of the CP 341, together with the parameterization
interface and the function blocks, is supplied on the installation CD which come
with this manual.
It is available both compiled and as an ASCII source file. A list of all the symbols
used in the example is also included.
9-2
9.2
Device Configuration
9.3
Settings
9-3
9-4
9.4
Blocks Used
Blocks Used
The table below lists the blocks used for the example program.
Block
Symbol
Explanation
OB 1
CYCLE
OB 100
RESTART
DB 21
SEND IDB
DB 22
RECV IDB
DB 40
SEND WORD DB
DB 41
RECV WORK DB
DB 42
SEND SRC DB
DB 43
RECV DST DB
FB 7
P_RCV_RK
FB 8
P_SND_RK
FC 5
V24_STAT
FC 6
V24_SET
FC 14
V24_CYC
FC 21
SEND
Send data
FC 22
RECEIVE
Receive data
9-5
9.5
Malfunction
If an error occurs during start-up, the cyclically processed module calls are not
executed and the error display is activated.
If there is an error message, the parameter output ERROR of the modules is set.
A more precise error description is then stored in the STATUS parameter of the
blocks. If STATUS contains one of the error messages 16#1E0E or 16#1E0F, the
exact error description is stored in the SFCERR variable in the instance DB.
9-6
9.6
Cyclic Program
The cyclic program is defined in the organization block OB 1.
In the example, the function blocks FB 7 P_RCV_RK and FB 8 P_SND_RK work
with the functions FC 21 and FC 22 and with data blocks DB 21 and DB 22 as
instance DBs and DB 42 and DB 43 as send and receive DBs.
The functions FC 5 V24_STAT and FC 6 V24_SET work with the function FC 14.
In the example the function blocks are parameterized partly via constants and
partly via symbolically addressed actual operands.
9-7
Description of FC 22 (RECEIVE)
The Enable Receive Data program section:
For data to be received, the receive enable P_RCV_RK EN_R in block
P_RCV_RK must be set to 1.
9-8
Technical Specifications
In Section
on Page
A.1
A-2
A.2
Transmission Times
A-7
A.3
A-9
A-1
Technical Specifications
A.1
Technical Specifications
Dimensions W H D
40 125 120 mm
Weight
0.3 kg
Current consumption at 24 V
Range, static
20.4...28.8 V
Range, dynamic
18.5...30.2 V
yes
Isolation
Indicators
Alarms
Diagnostics alarm
parameterizable
Diagnostic functions
yes
Protocol drivers
ASCII driver
3964(R) procedure
RK 512 computer connection
A-2
Technical Specifications
Table A-1
Technical Specifications
Character frame
send/receive: 32 bytes
Technical Specifications
Interface
RS 232C,
9-pin sub D male
RS 232C signals
Max. distance
15 m
76800 baud
Technical Specifications
Interface
20 mA current-loop TTY,
9-pin sub D female
TTY signals
Max. distance
19200 baud
A-3
Technical Specifications
Technical Specifications
Interface
RS 422 or RS 485,
15-pin sub D female
RS 422 signals
RS 485 signals
Max. distance
1200 m
76800 baud
1024 bytes
Parameters
parameterizable:
A-4
Technical Specifications
Table A-5
1024 bytes
Parameters
parameterizable:
1024 bytes
Parameters
parameterizable:
A-5
Technical Specifications
1024 bytes
Parameters
parameterizable:
Parameters
also parameterizable:
also parameterizable:
A-6
Technical Specifications
A.2
Transmission Times
Transmission Times
The tables below indicate the transmission times required depending on the
transmission protocol selected.
Two S7-300s each with a CPU 315-2DP (6ES7 315-2AF01-0AB0) and a CP 341
were used to measure the times. An FB P_SND_RK function block was
programmed in the user program of the active CPU, and an FB P_RCV_RK
function block was programmed in the user program of the passive CPU. The time
that elapsed between the initiation and completion of the request was measured.
ASCII driver
Transmission times with the ASCII driver:
Table A-7
Baud rate
(bd)
76800
57600
38400
19200
9600
4800
2400
1200
600
300
User
1 byte
0.077 s
0.154 s
10 bytes
0.251 s
0.492 s
20 bytes
0.011 s
0.220 s
0.431 s
0.853 s
50 bytes
1.000 s
2.000 s
100 bytes
2.000 s
4.000 s
200 bytes
4.000 s
8.000 s
500 bytes
9.600 s
18.800 s
1000 bytes
21.200 s
37.600 s
0.013 s 0.020 s
A-7
Technical Specifications
3964(R) procedure
Transmission times with the 3964(R) procedure:
Table A-8
Baud rate
(bd)
76800
57600
38400
19200
9600
4800
2400
1200
600
300
1 byte
0.010 s
0.010 s
0.011 s
0.020 s
0.020 s
0.027 s
0.042 s
0.076 s
0.139 s
0.271 s
10 bytes
0.011 s
0.016 s
0.020 s
0.020 s
0.030 s
0.050 s
0.083 s
0.158 s
0.305 s
0.600 s
20 bytes
0.021 s
0.021 s
0.021 s
0.031 s
0.040 s
0.071 s
0.129 s
0.251 s
0.490 s
0.969 s
50 bytes
0.027 s
0.029 s
0.030 s
0.050 s
0.080 s
0.142 s
0.272 s
0.528 s
1.000 s
2.000 s
100 bytes
0.041 s
0.046 s
0.051 s
0.081 s
0.145 s
0.262 s
0.506 s
0.993 s
2.100 s
4.000 s
200 bytes
0.060 s
0.077 s
0.090 s
0.151 s
0.272 s
0.500 s
1.000 s
2.000 s
4.200 s
8.000 s
500 bytes
0.129 s
0.175 s
0.202 s
0.351 s
0.642 s
1.220 s
2.400 s
4.800 s
9.600 s
18.800 s
1000 bytes
0.251 s
0.297 s
0.342 s
0.681 s
1.260 s
2.415 s
4.800 s
10.600 s
21.200 s
37.600 s
600
300
User data
Baud rate
(bd)
76800
57600
38400
19200
9600
4800
2400
1200
1 byte
0.027 s
0.029 s
0.030 s
0.038 s
0.054 s
0.083 s
0.144 s
0.266 s
0.522 s
1.046 s
10 bytes
0.029 s
0.032 s
0.034 s
0.043 s
0.063 s
0.098 s
0.181 s
0.338 s
0.666 s
1.334 s
20 bytes
0.030 s
0.034 s
0.037 s
0.049 s
0.075 s
0.125 s
0.227 s
0.431 s
0.855 s
1.701 s
50 bytes
0.041 s
0.047 s
0.051 s
0.072 s
0.114 s
0.199 s
0.372 s
0.712 s
1.407 s
2.804 s
100 bytes
0.061 s
0.069 s
0.076 s
0.114 s
0.184 s
0.326 s
0.612 s
1.183 s
2.326 s
4.645 s
200 bytes
0.105 s
0.125 s
0.141 s
0.211 s
0.350 s
0.635 s
1.200 s
2.400 s
4.800 s
9.067 s
500 bytes
0.221 s
0.265 s
0.301 s
0.471 s
0.812 s
1.666 s
3.000 s
4.800 s
11.000 s
22.000 s
1000 bytes
0.441 s
0.517 s
0.592 s
0.912 s
1.700 s
3.000 s
6.000 s
11.000 s
22.000 s
44.000 s
User data
A-8
Technical Specifications
A.3
Safety
The CP 341 communications processor meets the requirements and criteria for the
safety of electrical equipment of IEC 61131, Part 2.
CE Marking
Our products fulfill the requirements and safety objectives of the following EC
Directive and comply with the harmonized European standards (EN) published for
programmable logic controllers in the official journals of the European
Communities:
89/336/EEC Electromagnetic Compatibility Directive (EMC Directive)
The EC Declarations of Conformity are available to the relevant authorities at the
following address:
Siemens Aktiengesellschaft
Bereich Automatisierungstechnik
A&D AS E 48
Postfach 1963
D-92209 Amberg
EMC Directive
SIMATIC products are designed for use in industrial environments.
Area of Application
Industry
Requirements
Emitted Interference
Noise Immunity
EN 50081-2 : 1993
EN 50082-2 : 1995
UL Recognition
UL Recognition Mark
Underwriters Laboratories (UL) to
UL 508, File No. 116536
A-9
Technical Specifications
CSA Certification
CSA Certification Mark
Canadian Standard Association (CSA) to
Standard C22.2 No. 142, File No. LR 63533
FM Recognition
Factory Mutual Approval Standard Class Number 3611, Class I, Division 2, Groups
A, B, C, D.
Warning
Risk of injury and property damage.
Injury and property damage can occur if you pull an S7-300 plug-in connection in a
hazardous environment with the system in operation.
Always de-energize the S7-300 before pulling a plug-in connection in a hazardous
environment.
A-10
Warning
WARNING - DO NOT DISCONNECT WHILE CIRCUIT IS LIVE
UNLESS LOCATION IS KNOWN TO BE NONHAZARDOUS
Connecting Cables
In Section
on Page
B.1
B-2
B.2
B-9
B.3
B-16
B-1
Connecting Cables
B.1
Pin Allocation
The table below shows the pin allocation for the 9-pin sub D male connector in the
front panel of the CP 341-RS 232C (compatible with the 9-pin COM port
(PC/programming device).
Table B-1
Pin Allocation for the 9-Pin Sub D Male Connector of the Integrated Interface of the
CP 341-RS 232C
Male Connector on
CP 341-RS 232C*
Pin
Designation
Input/Output
Meaning
Input
Input
Received data
Output
Transmitted data
GND Ground
Input
Output
Request to send
Input
Clear to send
RI Ring Indicator
Input
Ring indicator
2
7
3
8
4
9
5
Front view
Connecting Cables
If you construct your own connecting cables you must remember that unconnected
inputs at the communication partner may have to be connected to open-circuit
potential.
Note that you must only use shielded connector casings. A large surface area of
both sides of the cable shield must be in contact with the connector casing. You
are advised to use Siemens V42 254 shielded connector casings.
Caution
Never connect the cable shield with the GND, as this could destroy the
submodules.
GND must always be connected on both sides (pin 5), otherwise the submodules
could again be destroyed.
In the Following
On the following pages you will find examples of connecting cables for a
point-to-point connection between the CP 341-RS 232C and S7 modules or
SIMATIC S5.
B-2
Connecting Cables
Connecting Cables, RS 232C (S7/M7 (CP 341) S7/M7 (CP 340/ CP 341/CP 441))
The figure below illustrates the connecting cable for a point-to-point connection
between a CP 341 and a CP 340/CP 341/CP 441.
For the connecting cables you require the following female connectors:
at the CP 341: 9-pin sub D female with screw fixing
at the communication partner: 9-pin sub D female with screw fixing
CP 341
Communication partner
Receiver
Sender
2
RxD
TxD
Sender
Casing shield
Figure B-1
Receiver
3
TxD
RxD
RTS
CTS
CTS
RTS
DSR
DTR
DTR
DSR
GND
GND
Cable type
LIYCY 7 x 0.14
Casing shield
B-3
Connecting Cables
RS 232C Connecting Cables (S7/M7 (CP 341) CP 544, CP 524, CPU 928B,
CPU 945, CPU 948)
The figure below illustrates the connecting cable for a point-to-point connection
between a CP 341 and a CP 544, CP 524, CPU 928B, CPU 945 or CPU 948.
For the connecting cables you require the following female/male connectors:
at the CP 341: 9-pin sub D female with screw fixing
at the communication partner: 25-pin sub D male with screw fixing
CP 341
Communication partner
Receiver
Sender
2
RxD
TxD
TxD
RxD
RTS
CTS
CTS
RTS
DSR
DTR
20
DTR
DSR
GND
GND
Sender
Casing shield
Figure B-2
B-4
Receiver
Cable type
LIYCY 7 x 0.14
Casing shield
RS 232C Connecting Cable CP 341 CP 544, CP 524, CPU 928B, CPU 945,
CPU 948
Connecting Cables
Connecting Cables, RS 232C (S7/M7 (CP 341) CP 521 SI/CP 521 BASIC)
The figure below illustrates the connecting cable for a point-to-point connection
between a CP 341 and a CP 521 SI/CP 521 BASIC.
For the connecting cables you require the following female/male connectors:
at the CP 341: 9-pin sub D female with screw fixing
at the communication partner: 25-pin sub D male with screw fixing
CP 341
Communication partner
Receiver
Sender
2
RxD
TxD
Sender
Casing shield
Figure B-3
Receiver
3
TxD
RxD
RTS
CTS
CTS
RTS
DSR
DTR
20
DTR
DSR
GND
GND
Cable type
LIYCY 7 x 0.14
Casing shield
B-5
Connecting Cables
Communication partner
Receiver
Sender
2
RxD
TxD
11
Sender
Casing shield
Figure B-4
B-6
Receiver
3
TxD
RxD
RTS
CTS
CTS
RTS
13
DSR
DTR
15
DTR
DSR
GND
GND
2/21/23
Cable type
LIYCY 7 x 0.14
Casing shield
Connecting Cables
RS 232C Connecting Cable (S7/M7 (CP 341) IBM Proprinter (PT 88), DR 230)
The figure below illustrates the connecting cable for a point-to-point connection
between a CP 341 and an IBM Proprinter with a serial interface (PT 88 or
IBM-compatible printer).
For the connecting cable you require the following female/male connectors:
at the CP 341: 9-pin sub D female
at the IBM Proprinter: 25-pin sub D male
CP 341
Printer
Receiver
Sender
2
RxD
TxD
Sender
Receiver
3
TxD
CTS
DSR
DTR
DCD
GND
RxD
READY
11 (for DR 230)
25 (for PT 88)
Casing shield
Figure B-5
GND
Cable type
LIYCY 4 x 0.14
Casing shield
B-7
Connecting Cables
Printer
Receiver
Sender
2
RxD
TxD
Sender
Casing shield
Figure B-6
B-8
Receiver
3
TxD
RxD
CTS
DSR
DTR
20
GND
GND
Cable type
LIYCY 4 x 0.14
Casing shield
Connecting Cables
B.2
Pin Allocation
The table below shows the pin allocation for the 9-pin sub D female connector in
the front panel of the CP 341-20mA TTY.
Table B-2
Pin Allocation for the 9-Pin Sub D Female Connector of the Integrated Interface of the
CP 341-20mA TTY
Female Connector on
CP 341-20mATTY*
9
8
7
6
Pin
Input/Output
Meaning
TxD
Output
Transmitted data
20 mA
Input
Ground 24 V
20 mA + (I1)
Output
20 mA current generator 1
20 mA + (I2)
Output
20 mA current generator 2
RxD +
Input
Received data +
RxD
Output
Received data
TxD +
Input
Transmitted data +
4
3
Designation
Front view
B-9
Connecting Cables
Block Diagram
The figure below shows the block diagram of a 20 mA TTY interface.
TxD +
from
UART
TxD
RxD +
to
UART
RxD
20 mA + (I)
+ 24 V
20 mA + (I)
20 mA
Figure B-7
M V
Connecting Cables
If you construct your own connecting cables you must remember that unconnected
inputs at the communication partner may have to be connected to open-circuit
potential.
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 and the
shield contact. You are advised to use Siemens V42 254 shielded connector
casings.
B-10
Caution
Never connect the cable shield with the GND, as this could destroy the interface
submodules.
Connecting Cables
In the Following
On the following pages you will find examples of connecting cables for a
point-to-point connection between the CP 341-20mA TTY and S7 modules or
SIMATIC S5.
Communication partner
+ RxD
TxD
RxD
+ TxD
20mA
+ 20mA
+ 20mA
20mA
+ TxD
RxD
TxD
+ RxD
Receiver
5
Receiver
8
+ 24 V
Sender
Sender
Casing shield
Figure B-8
Cable type
LIYCY 4 x 0.14
+ 24 V
Casing shield
The connecting cable is available using the order number (6ES7902-2...) specified
in Appendix D.
B-11
Connecting Cables
Note
This cable type (LIYCY 4 x 0.14) can be used in the following lengths for the
CP 341 as communication partner:
Communication partner
+ RxD
TxD
19
RxD
+ TxD
Sender
10
20mA
+ 20mA
12
+ 20mA
20mA
21
+ TxD
RxD
14
TxD
+ RxD
Receiver
13
Receiver
8
+ 24 V
+ 24 V
Sender
Casing shield
Figure B-9
B-12
Cable type
LIYCY 4 x 0.14
Casing shield
Connecting Cables
Communication partner
+ 20 mA
+ TxD
10
+ RxD
TxD
Sender
12
+ 24 V
Receiver
8
RxD
20 mA
+ 20 mA
+ TxD
TxD
+ RxD
20 mA
RxD
Receiver
8
+ 24 V
Sender
Shield contact
Casing shield
Figure B-10
Cable type
LIYCY 4 x 0.14
Casing shield
B-13
Connecting Cables
20 mA TTY Connecting Cable (S7/M7 (CP 341) CP 521 SI/CP 521 BASIC/
IBM-Compatible Printer)
The figure below illustrates the connecting cable for a point-to-point connection
between a CP 341 and a CP 521 SI/CP 521 BASIC.
For the connecting cables you require the following male connectors:
at the CP 341: 9-pin sub D male with screw fixing
at the communication partner: 25-pin sub D male with screw fixing
CP 341
Communication partner
+ 20 mA
+ TxD
18
+ RxD
TxD
Sender
21
+ 24 V
Receiver
8
RxD
20 mA
+ 20 mA
+ TxD
TxD
+ RxD
20 mA
RxD
Receiver
10
+ 24 V
Sender
Shield
Casing shield
Figure B-11
B-14
Cable type
LIYCY 4 x 0.14
Casing shield
Connecting Cables
Communication partner
+ 20 mA
+ TxD
+ RxD
TxD
+ 24 V
Sender
Receiver
8
RxD
20 mA
+ 20 mA
+ TxD
TxD
+ RxD
20 mA
RxD
Receiver
2
+ 24 V
Sender
Shield
Casing shield
Figure B-12
Cable type
LIYCY 4 x 0.14
Casing shield
B-15
Connecting Cables
B.3
Pin Allocation
The table below shows the pin allocation for the 15-pin sub D females connector in
the front panel of the CP 341-RS 422/485.
Table B-3
Pin Allocation for the 15-Pin Female Connector of the Integrated Interface of the CP
341-RS 422/485
Pin Designation
Input/Output
T (A)
Output
R (A)/
T (A)
Input
Input/Output
GND
T (B) +
Output
10
11
R (B)/
T (B) +
Input
Input/Output
12
13
14
15
Female Connector on
CP341-RS422/485*
8
15
14
13
12
11
10
7
6
5
4
Meaning
Front view
B-16
Connecting Cables
Connecting Cables
If you construct your own connecting cables you must remember that unconnected
inputs at the communication partner may have to be connected to open-circuit
potential.
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 and the
shield contact. You are advised to use Siemens V42 254 shielded connector
casings.
Caution
Never connect the cable shield with the GND, as this could destroy the interface
submodules.
GND (pin 8) must always be connected at both ends, otherwise the interface
submodules could be destroyed.
In the Following
On the following pages you will find examples of connecting cables for a
point-to-point connection between the CP 341-RS 422/485 and S7 modules or
SIMATIC S5.
B-17
Connecting Cables
Communication partner
T(A) R(A)
T(B) + R(B)
11
R(A) T(A)
R(B) + T(B)
GND
1)
Sender
Receiver
1)
11
Receiver
Sender
8
GND
Shield
Casing shield
Cable type
LIYCY 3 x 2 x 0.14.
T(A)/T(B) and R(A)/R(B)
twisted pairs.
Casing shield
Figure B-13
The connecting cable is available using the order number (6ES7 902-3...) specified
in Appendix D.
Note
This cable type can be used in the following lengths for the CP 341 as
communication partner:
B-18
Connecting Cables
Communication partner
T(A)
T(A)
T(B) +
T(B) +
Sender
Sender
4
R(A) R(A)
4
1)
1)
11
R(B) + R(B)
11
GND
Receiver
Receiver
GND
Shield
Casing shield
Cable type
LIYCY 3 x 2 x 0.14.
R(A)/R(B) twisted.
Casing shield
Figure B-14
B-19
Connecting Cables
X 27 Connecting Cable (S7/M7 (CP 341) CP 544, CP 524, CPU 928B, CPU 945,
CPU 948)
The figure below illustrates the connecting cable for a point-to-point connection
between a CP 341 and a CP 544, CP 524, CPU 928B, CPU 945, CPU 948 for
RS 422 operation.
For the connecting cables you require the following male connectors:
at the CP 341: 15-pin sub D male with screw fixing
at the communication partner: 15-pin sub D male with clip fixing
CP 341
Communication partner
T(A) R(A)
T(B) + R(B)
11
R(A) T(A)
11
R(B) + T(B)
GND
1)
Sender
Receiver
1)
Receiver
Sender
GND
Shield
Casing shield
Cable type
LIYCY 3 x 2 x 0.14.
T(A)/T(B) and R(A)/R(B)
twisted pairs.
Casing shield
B-20
X27 Connecting Cable CP 341 CP 544, CP 524, CPU 928B, CPU 945,
CPU 948 for RS 422 Operation (Four-Wire Mode)
The CP 341 communication processor can communicate with the following CPs
and CPUs of the SIMATIC S5 and SIMATIC S7 programmable controllers.
C-1
SIMATIC S7-300/S7-400
CP 340/CP 441
CP 521 SI
S5-90 U
S5-95 U
S5-100 U
CP 523
S5-115 U/F/H
S5-135 U
S5-155 U/H
CP 524*
S5-115U/F/H
S5-135U
S5-155U/H
CP 525*
S5-115U/F/H
S5-135U
S5-155U/H
CP 544
S5-115 U
S5-135 U
S5-155 U/H
Second serial
interface:
S5-95U
CPU 944
S5-115 U
CPU 945
S5-115 U
CPU 928
S5-135 U
CPU 948
S5-155 U
Non-Siemens
devices
Barcode readers
Non-Siemens
PLCs Scales, ...
SIMATIC S7-300
CP 341
Figure C-1
C-2
SIMATIC S7-400
CP 441
CP 524
S5-115U/F/H
S5-135U
S5-155U/H
CP 525
S5-115 U/F/H
S5-135 U
S5-155 U/H
CP 544
S5-115 U
S5-135 U
S5-155 U/H
CPU 928
S5-135 U
CPU 948
S5-155 U
SIMATIC S7-300
CP 341
Figure C-2
Non-Siemens PLCs
SIMATIC S7-300
CP 341
Barcode readers
Figure C-3
C-3
C-4
Module Variants
The table below contains the different variants of the CP 341.
Table D-1
Product
CP 341-RS 232C
6ES7 341-1AH01-0AE0
CP 341-20mA TTY
6ES7 341-1BH01-0AE0
CP 341-RS 422/485
6ES7 341-1CH01-0AE0
Connecting Cables
Connecting cables are available in the following standard lengths 5 m, 10 m and
50 m.
Table D-2
20-mA TTY
i t f
interface
((corresponding
di
to Figure B-8)
X27 (RS 422)
i t f
interface
((corresponding
di
to Figure B-13)
Variant
Order Number
RS 232C, 5 m
6ES7 902-1AB00-0AA0
RS 232C, 10 m
6ES7 902-1AC00-0AA0
RS 232C, 15 m
6ES7 902-1AD00-0AA0
20 mA TTY, 5 m
6ES7 902-2AB00-0AA0
20 mA TTY, 10 m
6ES7 902-2AC00-0AA0
20 mA TTY, 50 m
6ES7 902-2AG00-0AA0
6ES7 902-3AB00-0AA0
6ES7 902-3AC00-0AA0
6ES7 902-3AG00-0AA0
D-1
D-2
/2/
/3/
/4/
Literature on SIMATIC S7
On the following pages, you will find a comprehensive overview of:
manuals that you require for configuring and programming the S7-300,
manuals which describe the components of a PROFIBUS DP network,
technical overviews which provide you with an overview of the SIMATIC S7 and
STEP 7.
E-1
Table E-1
Title
The STEP 7 user manual explains the principles for using the
STEP 7 automation software and its functions. Novice users of
STEP 7 as well as experienced users of STEP 5 are provided
with an overview of the configuring, programming and start-up
procedures for an S7-300/400. When working with the software,
an on-line help assists you if you require detailed information on
the software.
The manuals for the STL, LAD, FBD and SCL packages each
comprise the user manual and the language description. For
programming an S7-300/400 you need only one of the
languages, but, if required, you can switch between the language
to be used in a project.
j
If it is the first time that yyou use one of the
l
languages,
the
th manuals
l will
ill help
h l you in
i getting
tti familiar
f ili with
ith the
th
programming principles.
When working with the software, you can use the on-line help,
which provides you with detailed information on editors and
compilers.
E-2
E-3
E-4
Glossary
A
Address
The address identifies a physical storage location. If the address is known, the
operand stored there can be directly accessed.
B
Block
Blocks are elements of the user program which are defined by their function,
structure, or purpose. With STEP 7 there are
Code blocks (FB, FC, OB, SFB, SFC)
Data blocks (DB, SDB)
User-defined data types (UDT)
Block Call
A block call occurs when program processing branches to the called block.
Block Parameter
Block parameters are wildcards within multiple-use blocks, which are replaced with
current values when the relevant block is called.
C
Communications Processor
Communications processors are modules for point-to-point connections and bus
connections.
Glossary-1
Glossary
Configuration
The configuration is the setup of individual modules of the PLC in the configuration
table.
CPU
Central processing unit of the S7 programmable controller with control and
arithmetic unit, memory, operating system, and interfaces to I/O modules.
Cycle Time
The cycle time is the time the CPU needs to scan the user program once.
D
Data Block (DB)
These are blocks containing data and parameters with which the user program
works. Unlike all other blocks, data blocks do not contain instructions. They are
subdivided into global data blocks and instance data blocks. The data held in the
data blocks can be accessed absolutely or symbolically. Complex data can be
stored in structured form.
Data Type
Data types allow users to define how the value of a variable or constant is to be
used in the user program. They are subdivided into elementary and structured data
types.
Default Setting
The default setting is a practical basic setting which is always used if no other
value is specified.
Diagnostic Events
Diagnostic events are, for example, errors on a module or system errors in the
CPU, which are caused by, say, a program error or by operating mode transitions.
Glossary-2
Glossary
Diagnostic Buffer
Every CPU has a diagnostic buffer, in which detailed information on diagnostic
events is stored in the order in which they occur.
The CP 341 has its own diagnostic buffer, in which all the diagnostic events of the
CP 341 are entered (hardware/firmware errors, initialization/parameterization
errors, send and receive errors).
Diagnostics Functions
The diagnostics functions cover the entire system diagnosis and include detection,
analysis and reporting of errors within the PLC.
Download
Downloading means loading load objects (e.g. code blocks) from the programming
device into the load memory of the CPU.
F
Function Block (FB)
Function blocks are components of the user program and, in accordance with the
IEC standard, are blocks with memory. The memory for the function block is an
assigned data block of the instance data block. Function blocks can be
parameterized but can also be used without parameters.
H
Hardware
Hardware is the term given to all the physical and technical equipment of a PLC.
I
Instance Data Block
An instance data block is a block assigned to a function block and contains data for
this special function block.
Glossary-3
Glossary
Interrupt
An interrupt occurs when program processing in the processor of a PLC is
interrupted by an external alarm.
M
Module
Modules are pluggable printed circuit boards for programmable controllers.
Module Parameter
Module parameters are used to set the module reactions. A distinction is made
between static and dynamic module parameters.
O
On-line/Off-line
On-line means that a data circuit exists between PLC and programming device.
Off-line means that no such data circuit exists.
On-line Help
STEP 7 allows you to display contextual help texts on the screen while working
with the programming software.
Operand
An operand is part of a STEP 7 instruction and states with what the processor is to
do something. It can be both absolutely and symbolically addressed.
Operating Mode
The SIMATIC S7 programmable controllers have three different operating modes:
STOP, RESTART and RUN. The functionality of the CPUs varies in the individual
operating modes.
Glossary-4
Glossary
P
Parameter
Parameters are values that can be assigned. A distinction is made between block
parameters and module parameters.
Parameterization
Parameterization means setting the behavior of a module.
Point-to-Point Connection
In a point-to-point connection the communications processor forms the interface
between a PLC and a communications partner.
Procedure
The execution of a data interchange operation according to a specific protocol is
called a procedure.
Process Image
This is a special memory area in the PLC. At the beginning of the cyclic program,
the signal states of the input modules are transferred to the process image input
table. At the end of the cyclic program, the process image output table is
transferred to the output modules as signal state.
Programmable Controller
Programmable controllers (PLCs) are electronic control devices consisting of at
least one central processing unit, various input/output modules, and operator
control and monitoring devices.
Protocol
The communications partners involved in a data interchange must abide by fixed
rules for handling and implementing the data traffic. These rules are called
protocols.
Glossary-5
Glossary
R
Rack
A rack is the rail containing slots for mounting modules.
RESTART
On transition from the STOP to the RUN mode, the PLC goes through the
RESTART mode.
S
S7-300 Backplane Bus
The S7-300 backplane bus is a serial data bus via which the modules
communicate with each other and are supplied with the necessary voltage.
Software
Software is the term given to all programs used on a computer system. These
include the operating system and the user programs.
STEP 7
This is the programming software for SIMATIC S7 programmable controllers.
System Block
System blocks differ from the other blocks in that they are already integrated into
the S7-300 system and are available for already defined system functions. They
are subdivided into system data blocks, system functions, and system function
blocks.
Glossary-6
Glossary
U
Upload
Uploading means loading load objects (e.g. code blocks) from the load memory of
the CPU into the programming device.
The user program contains all instructions and declarations for signal processing,
by means of which a system or a process can be controlled. The user program for
SIMATIC S7 is structured and is divided into smaller units called blocks.
V
Variable
A variable is an operand (e.g. E 1.0) which can have a symbolic name and can
therefore also be addressed symbolically.
W
Work Memory
The work memory is a RAM on the CPU which the processor accesses while
processing the user program.
Glossary-7
Glossary
Glossary-8
Index
Numbers
20 mA TTY interface, B-9
3964(R) Procedure, Sending Data, 2-13
A
Acknowledgment delay time (ADT), 2-51
Actual operand, 6-45
absolutely addressed, 6-45
symbolically addressed, 6-46
Addressing the module, 6-47
ASCII driver, 2-35
data flow control, 2-48
parameters, 2-55
receive buffer, 2-44
receiving data, 2-37
RS 232C-secondary signals, 2-45
sending data, 2-36
B
Baud rate, 2-52, 2-57
Block call
P_RCV_RK, 6-11, 6-35
P_SND_RK, 6-6, 6-18, 6-24, 6-29
V24_SET, 6-41
V24_STAT, 6-39
Block checksum, 2-12
C
Calling the SFCERR variable, 8-16
CE, marking, A-9
Character delay time, 2-56
Character delay time (CDT), 2-5, 2-51
Character frame, 2-4, 2-52, 2-57
10-bit character frame, 2-4
Command message frame, 2-23
D
Data bits, 2-52, 2-57
Data block assignment, 6-42
Data flow control, 2-48, 2-58
Diagnosis, diagnostic buffer, 8-19
Diagnostic, error numbers in the response
message frame, 8-17
Diagnostics, 8-2
display elements, 8-3
messages at the STATUS output of the
FBs, 8-4
Diagnostics functions, 8-2
Disabling alarms, 6-47
Dismounting the CP 341, 4-2
Display elements (LED), 8-2
Index-1
Index
Disposal, v
E
EMC Directive, A-9
EN/ENO mechanism, 6-46
End criterion, 2-39
end-of-text character, 2-40
expiry of character delay time, 2-39
fixed message frame length, 2-42
End-of-text character, 2-56
Event class, 8-4
Event number, 8-4
Expansion bus for S7-300 backplane bus, 1-7
F
FETCH message frame, 2-23
Fetching data, RK 512, 2-29
Firmware update, 5-6
FM, recognition, A-10
Full-duplex operation, 2-3
Function blocks, 1-5, 6-2
FB 7 P_RCV_RK, 6-12, 6-31, 6-36
FB 8 P_SND_RK, 6-8, 6-19, 6-25
Functions, 6-2
FC 5 V24_STAT, 6-40
FC 6 V24_SET, 6-41
Interface, 1-7
20 mA TTY, B-9
20-mA-TTY, 1-10
RS 232C, B-2
technical specifications, A-3
uses of, 1-3
X27 (RS 422/485), 1-11, B-16
Interface outputs of the CP 341,
setting/resetting, 6-40
Interface status of the CP 341, checking, 6-38
Interface submodules, RS 232C, 1-8
Interprocessor communication flag, 2-24, 6-29,
6-34
ISO 7-layer reference model, 2-7
L
LED indicators, 1-7
Loadable drivers, 5-5
Loading the configuration and parameters, 5-4
M
Managing the parameter data, 5-4
Memory requirements, 6-48
Message frame header, structure of the RK
512 message frame header, 2-24
Message frame length when received, 2-56
Minimum number of CPU cycles, 6-49
Mounting the CP 341, 4-2
G
Group alarm LED, 8-3
H
Half-duplex operation, 2-3
I
IEC 1131, A-9
Indicator for end of receive message frame,
2-56
Indicators (LED), 1-7
Initial state of the receive line, 2-53, 2-60
Initialization, 7-2
Initialization conflict, 2-18
Installation guidelines, 4-4
Index-2
O
Operating mode transitions, 7-4
Operating modes, 7-2
Order numbers, D-1
P
Parameterization, 5-3, 6-43, 7-3
direct, 6-43
indirect, 6-43
of data words, 6-44
Parameterization data, 2-49
ASCII driver, 2-55
procedure 3964(R), 2-49
RK 512, 2-54
Index
S
Scope of This Manual, iii
SEND message frame, 2-23
Sending data
3964(R) procedure, 2-13
ASCII driver, 2-36
RK 512, 2-26
Setup attempts, 2-51
Standard connecting cables, 1-4, 1-12
Start bit, 2-52, 2-57
Start-up characteristics, 6-47, 7-2
STATUS output of the FBs, 8-2, 8-4
STOP, 7-2
Stop bits, 2-52, 2-57
System functions used, 6-49
T
R
Receive buffer, 2-44, 2-59
Receiving data
ASCII driver, 2-37
with 3964(R), 2-15
Recycling, v
Reparameterization, 7-2
Response message frame, 2-23, 2-25
Error Numbers, 8-2
error numbers, 8-17
structure and contents, 2-25
RS 232C interface, B-2
U
UL, A-9
X
X27 (RS 422/485) interface, B-16
Index-3
Index
Index-4
Siemens AG
A&D AS E 81
Oestliche Rheinbrueckenstr. 50
D-76181 Karlsruhe
Federal Republic of Germany
From:
Your Name: _ _ _ _
Your Title: _ _ _ _
Company Name:
_
Street:
_
City, Zip Code_
Country:
_
Phone:
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
Automotive
Pharmaceutical
Chemical
Plastic
Electrical Machinery
Food
Textiles
Transportation
Nonelectrical Machinery
Other _ _ _ _ _ _ _ _ _ _ _
Petrochemical
Remarks Form
Your comments and recommendations will help us to improve the quality and usefulness
of our publications. Please take the first available opportunity to fill out this questionnaire
and return it to Siemens.
Please give each of the following questions your own personal mark within the range
from 1 (very good) to 5 (poor).
1.
2.
3.
4.
5.
Additional comments:
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_