EasyManuals Logo
Home>Siemens>Computer Hardware>SIMATIC CP 340

Siemens SIMATIC CP 340 User Manual

Siemens SIMATIC CP 340
200 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #109 background imageLoading...
Page #109 background image
Communication using function blocks
6.3 Using the function blocks for connecting to a communications processor
PtP coupling and configuration of CP 340
Manual, 04/2011, A5E00369892-03
109
6.3.2 S7 receives data from a communication partner
receiving data
The P_RCV FB transmits data from the CP 340 to an S7 data area specified by the
parameters DB_NO, DBB_NO and LEN. The P_RCV FB is called statically (without
conditions) for data transmission in the cycle or alternatively in a time-controlled program.
A (static) signal state "1" at the EN_R parameter enables a check to determine whether data
can be read from the CP 340. An active transmission event can be canceled with signal state
"0" at the EN_R parameter. The aborted receive request is terminated with an error message
(STATUS output). Receiving is disabled as long as the signal state at the EN_R parameter is
"0". A data transmission operation can run over several calls (program cycles), depending on
the amount of data involved.
If the function block detects the signal state "1" at the R parameter, the current send job is
aborted and the P_RCV FB is set to the initial state. Receiving is disabled as long as the
signal state at the R parameter is "1". If the signal state returns to "0", the canceled message
frame is received again from the beginning.
The LADDR parameter defines the CP 340 to be addressed.
The NDR output shows "Request completed without errors/data accepted" (all data read).
ERROR indicates whether an error has occurred. If an error has occurred, the corresponding
event number is displayed in STATUS (see Chapter "Diagnostics Messages of the Function
Blocks P_SE
ND, P_RCV and P_PRI
NT (Page 134)"). If there were no errors, STATUS has
the value "0". NDR and ERROR/STATUS are also ou
tput when the P_RCV FB is reset
(parameter LEN == 16#00). In the event of an error, the binary result BR is reset. If the block
is terminated without errors, the binary result has the status "1".
Note
The function block P_RCV does not have a parameter check, i.e. if there are invalid
parameters, the CPU can branch to STOP mode.
Before the CP 340 can receive a request after the CPU has changed from STOP to RUN
mode, the CP-CPU start-up mechanism of the P_RVC function block must be completed
(see Chapter "General Information on Program Pro
cessing (Page 124)").

Table of Contents

Other manuals for Siemens SIMATIC CP 340

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SIMATIC CP 340 and is the answer not in the manual?

Siemens SIMATIC CP 340 Specifications

General IconGeneral
BrandSiemens
ModelSIMATIC CP 340
CategoryComputer Hardware
LanguageEnglish

Related product manuals