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
105
6.3
Using the function blocks for connecting to a communications
processor
Introduction
The following function blocks are available for linking with a communication partner:
P_SEND (FB 3) for sending data, and P_PRCV (FB 2) for receiving data in the cyclical
program.
Jobs which can be processed simultaneously
Only one FB P_SEND and one FB P_RCV may be inserted in the user program for each
CP 340 used.
In addition, you may only program one instance data block for the FB P_SEND and the
FB P_RCV, since the instance data blocks contain the necessary status information for the
internal FB sequence.
6.3.1
S7 sends data to a communication partner
Sending data
The P_SEND FB transmits a subframe from a data block, specified by the parameters
DB_NO, DBB_NO and LEN, to the CP 340. The P_SEND FB is called statically (without
conditions) for data transmission in the cycle or alternatively in a time-controlled program.
The data transfer is initiated by a positive edge at the REQ input. Depending on the volume
of data involved, a data transmission may run over several calls (program cycles).
The P_SEND FB can be called cyclically with the signal state "1" at the R parameter input.
This aborts the transmission to the CP 340 and resets the PB P_SEND to its initial state.
Data that has already been received by the CP 340 is still sent to the communication partner.
If the signal state remains static at "1" at input R, it means that sending has been
deactivated.
The LADDR parameter specifies the address of the CP 340 to be addressed.
Содержание SIMATIC CP 340
Страница 6: ...Preface PtP coupling and configuration of CP 340 6 Manual 04 2011 A5E00369892 03 ...
Страница 10: ...Table of contents PtP coupling and configuration of CP 340 10 Manual 04 2011 A5E00369892 03 ...
Страница 186: ...Accessories and Order Numbers PtP coupling and configuration of CP 340 186 Manual 04 2011 A5E00369892 03 ...
Страница 190: ...Literature on SIMATIC S7 PtP coupling and configuration of CP 340 190 Manual 04 2011 A5E00369892 03 ...
Страница 200: ...Index PtP coupling and configuration of CP 340 200 Manual 04 2011 A5E00369892 03 ...