hit counter script

Attr_Db (Read Data Block Attribute) - Siemens SIMATIC S7-1200 System Manual

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

Advertisement

9.10.3

ATTR_DB (Read data block attribute)

Table 9- 223 ATTR_DB instruction
LAD / FBD
Parameters
The following table shows the parameters of the "ATTR_DB" instruction:
Parameter
Declaration
REQ
Input
DB_NUMBE
Input
R
RET_VAL
Output
DB_LENGTH Output
ATTRIB
Output
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
SCL
ret_val := ATTR_DB(
REQ:=_bool_in_,
DB_NUMBER:=_uint_in_,
DB_LENGTH=>_udint_out_,
ATTRIB=>_byte_out_);
Data type
Memory area
BOOL
I, Q, M, D, L or constant
DB_ANY
I, Q, M, D, L or constant
INT
I, Q, M, D, L
UDINT
I, Q, M, D, L
BYTE
I, Q, M, D, L
Description
You use the instruction "ATTR_DB" to obtain
information about a data block (DB) located in the
work memory of the CPU. The instruction deter-
mines the attributes set at the ATTRIB parameter
for the DB selected.
The length cannot be read out for data blocks
with optimized access and data blocks that are
only in load memory. In these cases, the
DB_LENGH parameter has the value "0".
Do not apply ATTR_DB to data blocks with opti-
mized access and activated memory reserve.
Do not read out the data blocks for motion control
with the "ATTR_DB" instruction. The error code
80B2 is output for this.
Description
REQ = 1: Request to read block attributes
Number of the DB to be tested
Error information
Number of data bytes that the selected DB con-
tains.
"0" for data blocks with optimized access and
data blocks that are only in load memory.
DB properties:
Bit 0*= 0: Attribute "Only store in load memory" is
not set.
Bit 0*= 1: Attribute "Only store in load memory" is
set.
Bit 1 = 0: Attribute "Data block write-protected in
the device" is not set.
Bit 1 = 1: Attribute "Data block write-protected in
the device" is set.
Extended instructions
9.10 Data block control
541

Advertisement

Table of Contents
loading

Table of Contents

Save PDF