Technical data

Table Of Contents
S7 Communication
System Software for S7-300/400 System and Standard Functions - Volume 2/2
A5E00739858-01
21-23
21.8 Writing Data to a Remote CPU with SFB/FB 15 "PUT"
Description
With SFB/FB 15 "PUT," you can write data to a remote CPU.
S7-300: The data is sent on a rising edge at REQ. The parameters ID, ADDR_1
and SD_1 are transferred on each rising edge at REQ. After a job has been
completed, you can assign new values to the ID, ADDR_1 and SD_1 parameters.
S7-400: The SFB is started on a rising edge at control input REQ. In the process
the pointers to the areas to be written (ADDR_i) and the data (SD_i) are sent to the
partner CPU.
The remote partner saves the required data under the addresses supplied with the
data and returns an execution acknowledgement.
Ensure that the areas defined with the parameters ADDR_i and SD_i match in
terms of number, length, and data type.
If no errors occur, this is indicated at the next SFB/FB call with the status
parameter DONE having the value 1.
The write job can only be activated again after the last job is completed.
The remote CPU can be in the RUN or STOP mode.
Errors and warnings are output via ERROR and STATUS if access problems
occurred while the data were being written or if the execution check results in an
error.
Parameter Declaration Data Type Memory Area Description
REQ INPUT BOOL I, Q, M, D, L Control parameter request, activates the
data exchange at a rising edge.
ID INPUT WORD M, D, constant Addressing parameter ID,
refer to Common Parameters of the
SFBs/FBs and SFCs/FCs for S7
Communication
DONE OUTPUT BOOL I, Q, M, D, L DONE status parameter:
0: Job not started or still running
1: Job has been executed error-free
ERROR
STATUS
OUTPUT
OUTPUT
BOOL
WORD
I, Q, M, D, L
I, Q, M, D, L
ERROR and STATUS state parameters,
error display:
ERROR=0
STATUS has the value:
0000H: neither warning nor error
<> 0000H: Warning, STATUS
supplies detailed information.
ERROR=1
There is an error. STATUS supplies
detailed information on the type of
error.