Technical data

Table Of Contents
System Software for S7-300/400 System and Standard Functions - Volume 1/2
A5E00709327-01
15-1
15 System Functions for Addressing Modules
15.1 Querying the Logical Base Address of a Module with
SFC 5 "GADR_LGC"
Description
Based on the channel of a signal module, the corresponding module slot and the
offset user data address area of the module are known. With SFC 5 "GARD_LGC"
(convert geographical address to logical address), you can obtain the
corresponding logical address of the module, i.e. the least input or output address.
Parameter Declaration Data Type Memory Area Description
SUBNETID INPUT BYTE I, Q, M, D, L,
constant
Area identifier:
0, if the slot is in one of the racks 0
(central rack) or 1 to 21 (expansion
rack).
DP master ID of the corresponding
distributed I/O system if the slot is in a
distributed I/O device.
RACK INPUT WORD I, Q, M, D, L,
constant
Number of the rack if the area identifier
is 0.
Station number of the distributed I/O
device if the area identifier > 0.
SLOT INPUT WORD I, Q, M, D, L,
constant
Slot number
SUBSLOT INPUT BYTE I, Q, M, D, L,
constant
Submodule slot (if no submodule can be
plugged in, 0 must be specified here)
SUBADDR INPUT WORD I, Q, M, D, L,
constant
Offset in the user data address area of the
module
RET_VAL OUTPUT INT I, Q, M, D, L Error information
IOID OUTPUT BYTE I, Q, M, D, L Area identifier:
B#16#54: Peripheral input (PI)
B#16#55: Peripheral output (PQ)
In case of a mixed module, the SFC
supplies the area identifier of the lower
address. If the addresses are equal the
SFC supplies the identifier B#16#54.
LADDR OUTPUT WORD I, Q, M, D, L Logical base address of the module