Rd_Addr (Determine The Io Addresses From The Hardware Identifier) Instruction - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

Extended instructions
8.9 Address handling
8.9.2
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
LAD / FBD
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
– In the case of an output module, the determined values are output at the PQADDR
● 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
Parameter and type
LADDR
IN
RET_VAL
OUT
PIADDR
OUT
PICOUNT
OUT
PQADDR
OUT
PQCOUNT
OUT
406
SCL
ret_val := RD_ADDR(
laddr:=_word_in_,
PIADDR=>_udint_out_,
PICount=>_uint_out_,
PQADDR=>_udint_out_,
PQCount=>_uint_out_,);
PICOUNT parameters.
and PQCOUNT parameters.
Data type
Description
HW_IO
Hardware identifier of the (sub)module
Int
Error code of the instruction
UDInt
Start address of the input module
UInt
Number of bytes of the inputs
UDInt
Start address of the output module
UInt
Number of bytes of the outputs
Description
You use the RD_ADDR instruction to get the
I/O addresses of a submodule.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG

Advertisement

Table of Contents
loading

Table of Contents