Technical data

Table Of Contents
System Functions for Addressing Modules
System Software for S7-300/400 System and Standard Functions - Volume 1/2
A5E00709327-01
15-5
15.3 Querying all Logical Addresses of a Module with
SFC 50 "RD_LGADR"
Description
You start with one logical address of a module. With SFC 50 "RD_LGADR" (read
module logical addresses), you obtain all the declared logical addresses of this
module. You have already assigned addresses to modules previously with STEP 7.
SFC 50 enters the logical addresses obtained in the field PEADDR or in the field
PAADDR in ascending order.
Parameter Declaration Data Type Memory Area Description
IOID INPUT BYTE I, Q, M, D, L,
constant
Area identifier:
B#16#00: Bit15 of LADDR specifies
whether an input (Bit15=0) or output
address (Bit15=1) exists.
B#16#54: peripheral input (PI)
B#16#55: peripheral output (PQ)
LADDR INPUT WORD I, Q, M, D, L,
constant
One logical address
RET_VAL OUTPUT INT I, Q, M, D, L Error information
PEADDR OUTPUT ANY I, Q, M, D, L Field for the PI addresses, field elements
must be of the data type WORD.
PECOUNT OUTPUT INT I, Q, M, D, L Number of returned PI addresses
PAADDR OUTPUT ANY I, Q, M, D, L Field for the PQ addresses, field must be
of the data type WORD.
PACOUNT OUTPUT INT I, Q, M, D, L Number of returned PQ addresses
Error Information
Error Code (W#16#...) Explanation
0000 No error occurred.
8090 Specified logical address invalid or illegal value for the IOID parameter.
80A0 Error in the output parameter PEADDR: The data type of the field elements is
not WORD. (This error code only exists for S7-400 and CPU 318.)
80A1 Error in the output parameter PAADDR: The data type of the field elements is
not WORD. (This error code only exists for S7-400 and CPU 318.)
80A2 Error in the output parameter PEADDR: The specified field could not
accommodate all the logical addresses.
80A3 Error in the output parameter PAADDR: The specified field could not
accommodate all the logical addresses.
8xyy General error information, see Evaluating Errors with Output Parameter
RET_VAL