Extended instructions
8.9 Address handling
S7-1200 Programmable controller
406 System Manual, 03/2014, A5E02486680-AG
RD_ADDR (Determine the IO addresses from the hardware identifier)
instruction
You use the RD_ADDR instruction to get the I/O addresses of a submodule.
Table 8- 182 RD_ADDR instruction
laddr:=_word_in_,
PIADDR=>_udint_out_,
PICount=>_uint_out_,
PQADDR=>_udint_out_,
PQCount=>_uint_out_,);
You use the RD_ADDR instruction to get the
I/O addresses of a submodule.
The RD_ADDR instruction determines the length and the start address of the inputs or
outputs based on the hardware identifier of a submodule:
● Use the LADDR parameter to select the input or output module based upon the hardware
identifier.
● The following output parameters are used depending on whether it is an input module or
output module:
– In the case of an input module, the determined values are output at the PIADDR and
PICOUNT parameters.
– In the case of an output module, the determined values are output at the PQADDR
and PQCOUNT parameters.
● The PIADDR and PQADDR parameters each contain the start address of the I/O
addresses of the module.
● The PICOUNT and PQCOUNT parameters each contain the number of bytes of the
inputs or outputs (1 byte for 8 inputs/outputs, 2 bytes for 16 inputs/outputs).
Table 8- 183 Data types for the parameters
Hardware identifier of the (sub)module
RET_VAL OUT Int Error code of the instruction
Start address of the input module
Number of bytes of the inputs
Start address of the output module
Number of bytes of the outputs