Dprd_Dat And Dpwr_Dat - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

8.3.4

DPRD_DAT and DPWR_DAT

You can use the DPRD_DAT (Read consistent data) and DPWR_DAT (Write consistent
data) instructions with PROFINET and PROFIBUS.
Table 8- 79
DPRD_DAT and DPWR_DAT instructions
LAD / FBD
The CPU supports up to 64 bytes of consistent data. For consistent data areas greater than
64 bytes, the DPRD_DAT and DPWR_DAT instructions must be used. If required, these
instructions can be used for data areas of 1 byte or greater. If access is rejected, error code
W#16#8090 will result.
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 61) for more information.
Table 8- 80
Data types for the parameters
Parameter and type
LADDR
IN
RECORD
OUT
RET_VAL
OUT
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
SCL
ret_val := DPRD_DAT(
laddr:=_word_in_,
record=>_variant_out_);
ret_val := DPWR_DAT(
laddr:=_word_in_,
record:=_variant_in_);
Data type
Description
HW_IO (Word)
Addresses have to be entered in hexadecimal format (for example, an
input or output address of 100 means: LADDR:=W#16#64).
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. Only the
data type Byte is permitted.
Int
If an error occurs while the function is active, the return value contains an
error code.
8.3 Distributed I/O (PROFINET, PROFIBUS, or AS-i)
Description
Use the DPRD_DAT instruction to read the consistent
data of a DP standard slave/PROFINET IO device. If no
errors occur during the data transfer, the data read is
entered into the target area set up by the RECORD
parameter. The target area must have the same length as
you configured with STEP 7 for the selected module.
When you call the DPRD_DAT instruction, you can only
access the data of one module / DP identification under
the configured start address.
Use the DPWR_DAT instruction to transfer the data in
RECORD consistently to the addressed DP standard
slave/PROFINET IO device. The source area must have
the same length as you configured with STEP 7 for the
selected module.
Configured start address from the "I" area of the module from which
the data will be read (DPRD_DAT)
Configured start address from the process image output area of the
module to which the data will be written (DPWR_DAT)
101BExtended instructions
269

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents