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

Basics On Block Access

This document discusses two types of data blocks in STEP 7: data blocks with optimized access and data blocks with standard access. Data blocks with optimized access have no fixed structure and allow tags to be accessed by symbolic name only. They offer advantages like optimized memory usage and ability to define individual tags as retentive. Data blocks with standard access have a fixed structure and allow tags to be addressed by both symbolic name and absolute address. The document also covers how to set retentivity and addressing options for each type of data block.

Uploaded by

Sukrija Razic
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)
88 views

Basics On Block Access

This document discusses two types of data blocks in STEP 7: data blocks with optimized access and data blocks with standard access. Data blocks with optimized access have no fixed structure and allow tags to be accessed by symbolic name only. They offer advantages like optimized memory usage and ability to define individual tags as retentive. Data blocks with standard access have a fixed structure and allow tags to be addressed by both symbolic name and absolute address. The document also covers how to set retentivity and addressing options for each type of data block.

Uploaded by

Sukrija Razic
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 Page 1 of 2

Basics of block access


Introduction
STEP 7 offers data blocks with different access options:
z Data blocks with optimized access (S7-1200/S7-1500)
z 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:
z You can create data blocks with any structure without paying attention to the physical arrangement of the individual
data elements.
z Quick access to the optimized data is always available because the data storage is optimized and managed by the
system.
z Access errors, as with indirect addressing or from the HMI, for example, are not possible.
z You can define specific individual tags as retentive.
z 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 already loaded tags.

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

Data blocks with standard access


Data blocks with standard access have a fixed structure. In the declaration, the data elements are assigned both a
symbolic name and a fixed address within the block. The address 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

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 network 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.
z 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.
z In data blocks with optimized access you can define the retentive behavior of individual tags.

mk:@MSITStore:C:\Program%20Files%20(x86)\Siemens\Automation\Portal%20V1... 2015/05/06
Basics of block access Page 2 of 2

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 interface 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 ARRAYs x

Slice access x x

Overlapping with AT x -

Absolute addressing x -

Indirect addressing via ANY x -

Indirect addressing via POINTER x with symbolic notation only


and VARIANT

mk:@MSITStore:C:\Program%20Files%20(x86)\Siemens\Automation\Portal%20V1... 2015/05/06

You might also like