Extended instructions
9.3 Distributed I/O (PROFINET, PROFIBUS, or AS-i)
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
409
Note
If you are using the DPRD_DAT and DPWR_DAT instructions with consistent data, you must
remove this consistent data from the process
-image automatic update. Refer to "PLC
concepts: Execution of the user program"
(Page 83) for more information.
Table 9- 89 Parameters
LADDR IN HW_IO (Word) Hardware ID of the module from which the data is to be read.
(DPRD_DAT)
Hardware ID of the module to which the data is to be written.
(DPWR_DAT)
The hardware ID ca
n be found in the properties of the module in the device
view or system constants.
RECORD OUT Variant Destination area for the user data that were read (DPRD_DAT) or source
area for the user data to be written (DPWR_DAT). This must be exactly as
large as you configured for the selected module with STEP 7.
RET_VAL OUT Int If an error occurs while the function is active, the return value contains an
Use the parameter LADDR to select the module of the DP standard slave / PROFINET IO
device. If an access error occurs on the addressed module, the error code W#16#8090 is
output.
Use the parameter RECORD to define the target range of the read data:
● The target range has to be at least as long as the inputs of the selected module. Only the
inputs are transferred; the other bytes are not considered. If you read from a DP standard
slave with a modular configuration or with several DP identifiers, you can only access the
data of a module of the configured hardware identifier for each DPRD_DAT instruction
call. If you select a target range that is too small, the error code W#16#80B1 is output at
the RET_VAL parameter.
● The following data types can be used: Byte, Char, Word, DWord, Int, UInt, USInt, SInt,
DInt, UDInt. The use of these data types in a User Defined Type (UDT) data structure of
the type ARRAY or STRUCT is permissible.
● The data type STRING is not supported.
● If there was no error during the data transmission, the data that have been read are
entered in the target range defined at the parameter RECORD.