Siemens Video Games B4 User Manual

Automation– and Drive Technology- SCE
Training document for the company-wide
automation solution
Totally Integrated Automation (T I A)
MODULE B4
T I A Training document Page 1 of 18 Module B4
Last revision: 02/2002 Data Blocks
Automation– and Drive Technology- SCE
This document was provided by Siemens A&D SCE (automation and drive technology, Siemens A&D Cooperates with Education) for training purposes. Siemens does not make any type of guarantee regarding its contents.
The passing on or duplication of this document, including the use and report of its contents, is only permitted within public and training facilities.
Exceptions require written permission by Siemens A&D SCE (Mr. Knust: E-Mail: michael.knust@hvr.siemens.de). Offences are subject to possible payment for damages caused. All rights are reserved for translation and any case of patenting or GM entry.
We thank the company Michael Dziallas Engineering and the instructors of vocational schools as well as further persons for the support with the production of the document.
T I A Training document Page 2 of 18 Module B4
Last revision: 02/2002 Data Blocks
Automation– and Drive Technology- SCE
PAGE:
1. Forward................................................................................................................. 4
2. Notes for Data Blocks.......................................................................................... 6
3. Generating Data Blocks ...................................................................................... 7
The following symbols stand for the specified modules:
Information
Programming
Example exercise
Notes
T I A Training document Page 3 of 18 Module B4
Last revision: 02/2002 Data Blocks
Automation– and Drive Technology- SCE
1. FORWARD
The module B4 is assigned content wise to Additional functions of STEP 7- Programming.
STEP 7- Programming
2 - 3 days A modules
Basics of
Additional functions of
STEP 7- Programming
2- 3 days B Modules
Industrial field bus
systems
2- 3 days D modules
Sequencer
programming
2- 3 days C modules
Process
visualization
2- 3 days F modules
IT- Communication
with SIMATIC S7
1- 2 days E modules
Learning goal:
In this module, the reader should learn how a data block can be used to save data.
· Generating data blocks
· Specifying a structure of a data block
· Access to a data element in a STEP 7- Program
Requirements:
For the successful use of this module, the following knowledge is assumed:
· Knowledge in the use of Windows 95/98/2000/ME/NT4.0
· Basics of PLC- Programming with STEP 7 (e.g. Module A3 - ‘Startup’
PLC programming with STEP 7)
· Basics to structured programming (e.g. Appendix I - Basics to PLC –Programming with SIMATIC S7-300)
Forward Notes Generating data blocks
T I A Training document Page 4 of 18 Module B4
Last revision: 02/2002 Data blocks
Automation– and Drive Technology- SCE
Required hardware and software
1 PC, Operating system Windows 95/98/2000/ME/NT4.0 with
- Minimal: 133MHz and 64MB RAM, approx. 65 MB free hard disk space
- Optimal: 500MHz and 128MB RAM, approx. 65 MB free hard disk space
2 Software STEP 7 V 5.x 3 MPI- Interface for the PC (e.g. PC- Adapter) 4 PLC SIMATIC S7-300 with at least one digital in- and output module. The inputs must be lead
through a functional unit. Example configuration:
- Power supply: PS 307 2A
- CPU: CPU 314
- Digital input: DI 16x DC24V
- Digital output: DO 16x DC24V / 0.5 A
1 PC
2 STEP 7
3 PC Adapter
4 SIMATIC S7-300
Forward Notes Generating data blocks
T I A Training document Page 5 of 18 Module B4
Last revision: 02/2002 Data blocks
Automation– and Drive Technology- SCE
2. NOTES FOR DATA BLOCKS
Data Blocks (DBs) can be used by your program to save data in the CPU. Your hard disk contains up to 8 KBytes ( 8192 Bytes ) space. There are two types of data blocks. Global DBs, where all OBs, FBs and FCs read all saved data or can even write in the DB and local instance DBs, which are assigned a particular FB. In the DBs, different data types (e.g. BOOL or WORD ) can be saved in arbitrary order. This structuring of a DB follows through input in a table with the tool LAD, STL,FBD - S7 Block Programming .
In the program structure from STEP 7, data blocks are found as follows:
OB 1
Call FB1, DB10
UC FC2
L DB11.DBW0
BE
DB 11DB 10FB 1
Global DB
For all FBs FCs OBs
Instance DB
Local data only FB1
OB = Organization Block
FB = Function Block FC = Function DB = Data Block
Forward Notes Generating data blocks
T I A Training document Page 6 of 18 Module B4
Last revision: 02/2002 Data block
Loading...
+ 12 hidden pages