Using The Function Blocks For Connecting To A Communications Processor; S7 Sends Data To A Communication Partner - Siemens SIMATIC CP 340 User Manual

Ptp coupling and configuration
Hide thumbs Also See for SIMATIC CP 340:
Table of Contents

Advertisement

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.
PtP coupling and configuration of CP 340
Manual, 04/2011, A5E00369892-03

6.3 Using the function blocks for connecting to a communications processor

Communication using function blocks
105

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents