Technical data

Table Of Contents
S7 Communication
System Software for S7-300/400 System and Standard Functions - Volume 2/2
A5E00739858-01
21-19
21.7 Receiving Segmented Data with SFB/FB 13 "BRCV"
Description
SFB/FB 13 "BRCV" receives data from a remote partner SFB/FB of the type
"BSEND". After each received data segment an acknowledgement is sent to the
partner SFB/FB and the LEN parameter is updated.
After it has been called and the value 1 is applied at the control input EN_R, the
block is ready to receive data. An active job can be cancelled with EN_R=0.
The start address and the maximum length of the receive area is specified by
RD_1. The length of the received data field is indicated in LEN.
S7-300: The parameters R_ID, ID and RD_1 are applied with every positive edge
on EN_R. After a job has been completed, you can assign new values to the R_ID,
ID and RD_1 parameters. For the transmission of segmented data the block must
be called periodically in the user program.
S7-400 and S7-300 via an integrated interface: Receipt of the data from the user
memory is carried out asynchronously to the processing of the user program.
The parameter R_ID must be identical at the two corresponding SFBs/FBs.
Error free reception of all the data segments is indicated by the status parameter
NDR having the value 1. The received data remain unchanged until SFB/FB 13 is
called again with EN_R=1.
If the block is called during asynchronous reception of data, this leads to a warning
being output in the STATUS parameter; if the call is made when the value 0 is
applied to control input EN_R, reception is terminated and the SFB/FB returns to its
initial state.
Parameter Declaration Data Type Memory Area Description
EN_R INPUT BOOL I, Q, M, D, L,
constant
Control parameter enabled to receive,
signalizes that the unit is ready to receive
when the input is set.
ID INPUT WORD M, D, constant Addressing parameter ID, refer to
Common Parameters of the SFBs/FBs
and SFCs/FCs for S7 Communication
R_ID INPUT DWORD I, Q, M, D, L,
constant
Addressing parameter R_ID, refer to
Common Parameters of the SFBs/FBs
and SFCs/FCs for S7 Communication
With a connection via the CP 441 to S5 or
auxiliary devices, R_ID contains the
address information of the remote device.
For further information, refer to the
description of the CP 441.
NDR OUTPUT BOOL I, Q, M, D, L NDR status parameter:
0: Job has not been started or still active
1: Job was completed successfully.