0% found this document useful (0 votes)
29 views8 pages

S7300 Siemens

The document discusses Siemens SIMATIC S7 data blocks. It defines elementary and complex data types that can be used in data blocks and describes how to create, enter, save, download, and monitor data blocks. It also provides an example of addressing data elements and accessing them using operations like OPN, A, L, and T. An exercise is included to write a PLC program using a data block to calculate a given equation and find the value of K for given values of X, Y, and Z.

Uploaded by

Armand Muteb
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)
29 views8 pages

S7300 Siemens

The document discusses Siemens SIMATIC S7 data blocks. It defines elementary and complex data types that can be used in data blocks and describes how to create, enter, save, download, and monitor data blocks. It also provides an example of addressing data elements and accessing them using operations like OPN, A, L, and T. An exercise is included to write a PLC program using a data block to calculate a given equation and find the value of K for given values of X, Y, and Z.

Uploaded by

Armand Muteb
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/ 8

SIEMENS

DATA BLOCK

SIEMENS
SIMATIC S7 1/14 October 3, 2023
SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Objectives

- Know The Elementary & Complex DB.


- How To Create DB.
- Familiar With Addressing & Accessing Data Element.

SIMATIC S7 2/14 October 3, 2023


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Accessible to all blocks


Data Blocks (DBs)
Elementary data types (up to 32 bits)
• Bit data types (BOOL, BYTE, WORD,
DWORD, CHAR) Global data
• Mathematical data types (INT, DINT, Function
FC10
REAL) DB20

Complex data types (longer than 32


bits)
• Time (DATE_AND_TIME) OB1 Function
• Array (ARRAY) FC20
• Structure (STRUCT)
• Character chain (STRING) Instance DB for FB1

User-defined data types (longer than 32


Instance data
bits) Function
Data type UDT (User Defined Type) block DB5
FB1

SIMATIC S7 3/14 October 3, 2023


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Creating a New Data Block

SIMATIC S7 4/14 October 3, 2023


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Entering, Saving, Downloading and Monitoring a Data Block

Declaration
View

Data View

SIMATIC S7 5/14 October 3, 2023


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Addressing Data Elements 8 Bits

The number of data blocks 7 0


Data Byte 0 DBB 0
available depends on the CPU
Data Byte 1 DBW 0
you use.
Data Byte 2
The maximum block length is DBD 0
Data Byte 3
8-KByte for the S7-300 and 64-
DBX 4.1
KByte for the
S7-400.

DBD 8188

DBW 8190
Data Byte 8191 DBB 8191

Accessing Data Elements


OPN DB 9 OR A DB9.DBX0.0
A DBX 0.0
OR
OPN DB 9 L DB9.DBB1
L DBB 1
OR
OPN "Values" L DB9.DBW2
T DBW 2

SIMATIC S7 6/14 October 3, 2023


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Exercise:

1- In FC6, Write a PLC program, using DB6 to calculate the following equation:

K = 4X + 18XZ + 2Z/2 + 2(2Y+3)


Then find the value of K at: X=2, Y=1 and Z=2

SIMATIC S7 7/14 October 3, 2023


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Answer of Exercise 1:

IN The DB:

The value of K at: X=2, Y=1 and Z=2


K=91

SIMATIC S7 8/14 October 3, 2023


SIEMENS LTD EGYPT 2007
All Rights Reserved

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy