Technical data

Table Of Contents
S7 Communication
System Software for S7-300/400 System and Standard Functions - Volume 2/2
21-26
A5E00739858-01
21.9 Read Data from a Remote CPU with SFB/FB 14 "GET"
Description
You can read data from a remote CPU with SFB/FB 14 "GET".
S7-300: The data is read on a rising edge at REQ. The parameters ID, ADDR_1
and RD_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 RD_1 parameters.
S7-400: The SFB is started with a rising edge at control input REQ. In the process
the relevant pointers to the areas to be read out (ADDR_i) are sent to the partner
CPU.
The remote partner returns the data.
The received data are copied to the configured receive areas (RD_i) at the next
SFB/FB call.
Ensure that the areas defined with the parameters ADDR_i and RD_i match in
terms of length and data type.
The completion of the job is indicated by a 1 at the status parameter NDR.
The read job can only be activated again after the previous job has been
completed.
The remote CPU can be in the operating state RUN or STOP.
Errors and warnings are output via ERROR and STATUS if access problems
occurred while the data were being read or if the data type 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 IM, D, constant Addressing parameter ID, refer to Common
Parameters of the SFBs/FBs and SFCs/FCs
for S7 Communication
NDR OUTPUT BOOL I, Q, M, D, L NDR status parameter:
0: Job not started or still active.
1: Job successfully completed.
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
An error occurred. STATUS gives you
detailed information on the type of
error.