EasyManua.ls Logo

Siemens S7-1200 - DPRD_DAT and DPWR_DAT (Read;Write Consistent Data for DP Slaves) Instructions

Siemens S7-1200
1028 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Extended instructions
8.3 Distributed I/O (PROFINET, PROFIBUS, or AS-i)
S7-1200 Programmable controller
326 System Manual, 03/2014, A5E02486680-AG
8.3.5
DPRD_DAT and DPWR_DAT (Read/write consistent data for DP slaves)
instructions
You can use the DPRD_DAT (Read consistent data) and DPWR_DAT (Write consistent
data) instructions with PROFINET and PROFIBUS.
Table 8- 78 DPRD_DAT and DPWR_DAT instructions
LAD / FBD
SCL
Description
ret_val := DPRD_DAT(
laddr:=_word_in_,
record=>_variant_out_);
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.
ret_val := DPWR_DAT(
laddr:=_word_in_,
record:=_variant_in_);
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.
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 77) for more information.
Table 8- 79 Data types for the parameters
Parameter and type
Data type
Description
LADDR IN HW_IO (Word)
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)
Addresses have to be entered in hexadecimal format (for example, an
input or output address of 100 means: LADDR:=W#16#64).
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
error code.

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals