data blocks
data blocks
Manual
V20
11/2024
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as
well as to prevent damage to property. The notices referring to your personal safety are
highlighted in the manual by a safety alert symbol, notices referring only to property damage
have no safety alert symbol. These notices shown below are graded according to the degree of
danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
CAUTION
indicates that minor personal injury can result if proper precautions are not taken.
NOTICE
indicates that property damage can result if proper precautions are not taken.
If more than one degree of danger is present, the warning notice representing the highest
degree of danger will be used. A notice warning of injury to persons with a safety alert symbol
may also include a warning relating to property damage.
Qualified Personnel
WARNING
Siemens products may only be used for the applications described in the catalog and in the
relevant technical documentation. If products and components from other manufacturers are
used, these must be recommended or approved by Siemens. Proper transport, storage,
installation, assembly, commissioning, operation and maintenance are required to ensure
that the products operate safely and without any problems. The permissible ambient
2 Manual, 11/2024
conditions must be complied with. The information in the relevant documentation must be
observed.
Trademarks
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and
software described. Since variance cannot be precluded entirely, we cannot guarantee full
consistency. However, the information in this publication is reviewed regularly and any
necessary corrections are included in subsequent editions.
Siemens Aktiengesellschaft
Copyright © Siemens 2024.
Digital Industries
11/2024 Subject to change All rights reserved
Postfach 48 48
90026 NÜRNBERG
GERMANY
Manual, 11/2024 3
Table of content
4 Manual, 11/2024
Manual, 11/2024 5
Creating data blocks
Requirement
1
The "Program blocks" folder in the project tree is open.
Procedure
To create a data block, follow these steps:
3. Select the type of the data block. You have the following options available to you:
To create a global data block, select the list entry "Global DB".
To create an ARRAY data block, select the "ARRAY DB" entry in the list.
To create an instance data block, select the function block to which you want to assign
the instance data block from the list. The list contains only the function blocks that were
previously created for the CPU.
To create a data block based on a PLC data type, select the PLC data type from the list.
The list contains only the PLC data types that were previously created for the CPU.
To create a data block based on a system data type, select the system data type from the
list. The list contains only those system data types that have already been inserted to
4. Enter a name for the data block. The name can contain up to 125 characters when no
5. Optional within software units: Enter a namespace for the new data block or use the
Note
6 Manual, 11/2024
You can find information on namespaces, in particular on the naming
conventions according to IEC 61131-3, here:
7. If you have selected an ARRAY DB as the data block type, enter the ARRAY data type and the
high limit for the ARRAY.
You can change the high limit for the ARRAY at any time in the property window of the
created block. The ARRAY data type cannot be changed subsequently.
8. If you have selected a block that contains monitoring as the "Type", assign a ProDiag
function block to the monitoring functions.
9. To enter additional properties of the new data block, click "Additional information".
11. Activate the "Add new and open" check box if the block does not open as soon as it is
created.
Result
The new data block is created. You can find the data block in the project tree in the "Program
blocks" folder.
Note
Retentivity of ARRAY data blocks
ARRAY data blocks and their components cannot be set retentively.
See also
Basic principles for programming of data blocks
Global data blocks (DB)
Instance data blocks
System data types
Using blocks from libraries
Manual, 11/2024 7