×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 8804145, Entry date: 10/15/2001
(0)
Rate

Data block processing with the S7-22x

  • Entry
  • Associated product(s)

QUESTION:
Which data blocks does the S7-22x system recognize?

ANSWER:
The S7 22x only knows the "DB1" data block. But the "DB1" data block is not located in a program part as with STEP 5 and STEP 7, but it occupies the start area of the variables memory "V". The size of the variable memory that can be used for the DB1 depends on the CPU:

CPU 221

CPU 222

CPU 224

CPU 226

CPU 226XM

Number

Area

Number

Area

Number

Area

Number

Area

Number

Area

2KB

VB0
to
VB2047

2KB

VB0
to
VB2047

5KB

VB0
to
VB5119

5 KB

VB0
to
VB5119

10KB

VB 0
to
VB10239

If you want to create a data block in your program, then enter the addresses of the data and the values in the data block editor. The data block editor is a text editor with a free choice of format, i.e. there are no specific fields designated for specific information. Nevertheless there are a number of rules that you must observe to ensure that the data can be compiled correctly.

Guidelines

  1. In the first column of each line enter the size of the data and the start address of the value. Micro/WIN defines the address based on the first entry of a line.
  2. To separate the addresses, data values and comments, which start with a double-slash (//), use spaces or the TAB key.
  3. End each line with a carriage return.
  4. Always specify a Memory Area and an Address. Examples: VB12 or VW100 etc.

Sample data block:

VB0

255

//Byte value, start at VB0

VW2

256

//Word value, start at VW2

VD4

700.59

//Double-word real number, start at VD4

VB8

-35

//Byte value, start at VB8

VW10

16#0A

//Word value, HEX, start at VW10

VD14

146879

//Double-word value, start at VW20

VW20

2 4 8 16 32 64

//Table with word values, start at VW20.
//The values go over several lines.

-2 -4 -8

-16 -32 -64

//The first column is reserved for addresses
//in the memory.

VB45

'Up'

//ASCII character string with two bytes, start at VB45

VW90

65535

//Word value, start at VW90

Keywords:
Memory types, Memory area, System properties

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.