Technical data

Table Of Contents
SFCs/SFBs for Transferring Data Records
System Software for S7-300/400 System and Standard Functions - Volume 1/2
A5E00709327-01
7-5
7.3 Reading Predefined Parameters with SFC 102
"RD_DPARA"
Description
With SFC 102 "RD_DPARA" you can read the data record with the number
RECNUM of a selected module from system data configured with STEP7. The read
data record is entered into the target area opened with the parameter RECORD.
Operating principle
The SFC 102 "RD_DPARA" operates asynchronously, that is, processing covers
multiple SFC calls. Start the job by calling SFC 102 with REQ = 1.
The job status is displayed via the output parameters RET_VAL and BUSY.
Refer also to Meaning of the Parameters REQ, RET_VAL and BUSY with
Asynchronous SFCs
Parameters Declaration Data type Memory area Description
REQ INPUT BOOL I, Q, M, D, L REQ = 1: Read request
LADDR INPUT WORD I, Q, M, D, L,
constant
Any address of the module. For an output
address, the highest-value bit must be set.
RECNUM INPUT BYTE I, Q, M, D, L,
constant
Data record number (permitted values: 0 to
240
RET_VAL OUTPUT INT I, Q, M, D, L If an error occurs while the function is active,
the return value contains an error code.
If no error occurred during the transmission,
the following two cases are distinguished:
RET_VAL contains the length of the
actually read data record in bytes if the
destination area is larger than the read
data record.
RET_VAL contains 0 if the length of the
read data record is equal to the length of
the destination area.
BUSY OUTPUT BOOL I, Q, M, D, L BUSY = 1: The job is not yet closed.
RECORD OUTPUT ANY I, Q, M, D, L Target area for the fetched data record. Only
the data type BYTE is permitted.
Error Information
See Assigning Parameters to a Module with SFC 57 "PARM_MOD"