0% found this document useful (0 votes)
6 views

12.01 - Basics of Block Access

The document discusses the basics of block access in STEP 7, including data blocks with optimized access and standard access. Optimized access blocks have no fixed structure and elements are assigned symbolic names, while standard access blocks have a fixed structure and elements are assigned both symbolic names and fixed addresses. The document also covers setting retentivity and addressing options for each block type.

Uploaded by

Hildis Lisboa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

12.01 - Basics of Block Access

The document discusses the basics of block access in STEP 7, including data blocks with optimized access and standard access. Optimized access blocks have no fixed structure and elements are assigned symbolic names, while standard access blocks have a fixed structure and elements are assigned both symbolic names and fixed addresses. The document also covers setting retentivity and addressing options for each block type.

Uploaded by

Hildis Lisboa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Basics of block access

Basics of block access

Introduction
STEP 7 offers data blocks with different access options:
• Data blocks with optimized access (S7-1200/S7-1500)
• Data blocks with standard access (S7-300 / S7-400 / S7-1200 / S7-1500)
Within one program you can combine the two types of blocks.

Data blocks with optimized access


Data blocks with optimized access have no fixed defined structure. In the declaration, the
data elements are assigned only a symbolic name and no fixed address within the block.
The elements are saved automatically in the available memory area of the block so that
there are no gaps in the memory. This makes for optimal use of the memory capacity.
Tags are identified by their symbolic names in these data blocks. To address the tag, enter
its symbolic name. For example, you access the "Fill Level" tag in the "Data" DB as follows:
"Data".Fill Level
Blocks with optimized access offers the following advantages:
• You can create data blocks with any structure without paying attention to the physical ar-
rangement of the individual data elements.
• Quick access to the optimized data is always available because the data storage is opti-
mized and managed by the system.
• Access errors, as with indirect addressing or from the HMI, for example, are not possi-
ble.
• You can define specific individual tags as retentive.
• Optimized blocks are equipped with a memory reserve by default which lets you expand
the interfaces of function blocks or data blocks during operation. You can download the
modified blocks without setting the CPU to STOP and without affecting the values of al-
ready loaded tags.

Note
The "Optimized block access" attribute is always enabled for the following blocks and
cannot be deselected.
• GRAPH blocks
• CEM blocks
• ARRAY data blocks

Data blocks with standard access


Data blocks with standard access have a fixed structure. In the declaration, the data ele-
ments are assigned both a symbolic name and a fixed address within the block. The ad-
dress is shown in the "Offset" column.
Tags in these data blocks can be addressed in both symbolic and absolute form.
"Data".Fill Level
DB1.DBW2

-1-
Basics of block access

Setting Retentivity for Optimized Access or Standard Access


If you define data as retentive, its values are retained even after a power failure or a net-
work off. A retentive tag is not initialized after the hot restart but retains the value it had
prior to the power failure. If a DB tag is defined as retentive, it is stored in the retentive
memory area of the data block.
The options for setting the retentivity depend on the access type of the block.
• In data blocks with standard access, you cannot set the retentive behavior of individual
tags. The retentivity setting is valid for all tags of the data block.
• In data blocks with optimized access you can define the retentive behavior of individual
tags.
For structured data type tags, the retentivity setting always applies to the entire structure.
You cannot make any individual retentivity setting for separate elements within the data
type.

Setting Addressing Options for Optimized Access or Standard Access


Blocks with optimized access permit only "type-safe" access. Type-safe access addresses
tags by their symbolic name only. This means even changes to the block or the block inter-
face will not result in inconsistencies in the program or access errors.
The following table shows the permitted addressing options for optimized data:

Addressing Block with standard access Block with optimized access

Symbolic addressing x x
Indexed addressing of AR-
x
RAYs
Slice access x x
Overlapping with AT x -
Absolute addressing x -
Indirect addressing via
x -
ANY
Indirect addressing via
x with symbolic notation only
POINTER and VARIANT

See also
Setting up block access
Addressing variables in data blocks
Retentive memory areas (S7-1200)
Creating blocks

-2-

You might also like