Technical data

Table Of Contents
Communication SFCs for Non-Configured S7 Connections
System Software for S7-300/400 System and Standard Functions - Volume 2/2
22-14
A5E00739858-01
22.6 Reading Data from a Communication Partner outside
the Local S7 Station with SFC 67 "X_GET"
Description
With SFC 67 "X_GET," you can read data from a communication partner that is not
in the local S7 station. There is no corresponding SFC on the communication
partner.
The read job is activated after calling the SFC with REQ=1. Following this, you
continue to call the SFC until the data reception is indicated by BUSY=0. RET_VAL
then contains the length of the received block of data in bytes.
Make sure that the receive area defined with the RD parameter (on the receiving
CPU) is at least al long as the area to be read as defined by the VAR_ADDR
parameter (on the communication partner). The data types of RD and VAR_ADDR
must also match.
Parameter Declaration Data Type Memory Area Description
REQ INPUT BOOL I, Q, M, D, L,
constant
Control parameter "request to activate,"
see Common Parameters of the
Communication SFCs
CONT INPUT BOOL I, Q, M, D, L,
constant
Control parameter "continue," see
Common Parameters of the Communication
SFCs
DEST_ID INPUT WORD I, Q, M, D, L,
constant
Address parameter "destination ID." This
contains the MPI address of the
communication partner. You configured
this with STEP 7.
VAR_ADDR INPUT ANY I, Q, M, D Reference to the area on the partner CPU
from which the data will be read. You must
choose a data type that is supported by the
communication partner.
RET_VAL OUTPUT INT I, Q, M, D, L If an error occurs while the function is
being executed, the return value contains
the corresponding error code.
If no error occurs, RET_VAL contains the
length of the block of data copied to the
receive area RD as a positive number of
bytes.
BUSY OUTPUT BOOL I, Q, M, D, L BUSY=1: Receiving is not yet completed.
BUSY=0: Receiving is completed or there
is no receive job active.