Creating A New Code Block - Siemens SIMATIC S7-1200 Manual

Easy book
Hide thumbs Also See for SIMATIC S7-1200:
Table of Contents

Advertisement

Programming made easy
6.1 Easy to design your user program
The data stored in a DB is not deleted when the data block is closed or the execution of the
associated code block comes to an end. There are two types of DBs:
● A global DB stores data for the code blocks in your program. Any OB, FB, or FC can
● An instance DB stores the data for a specific FB. The structure of the data in an instance
Although the instance DB reflects the data for a specific FB, any code block can access the
data in an instance DB.
6.1.4

Creating a new code block

Selecting the "Add new and open" option (default) opens the code block in the Project view.
92
access the data in a global DB.
DB reflects the parameters (Input, Output, and InOut) and the static data for the FB. The
Temp memory for the FB is not stored in the instance DB.
1. Open "Program blocks" folder.
2. Double-click "Add new block".
3. In the "Add new block" dialog,
click the type of block to add.
For example, click the
"Function (FC)" icon to add an
FC.
4. Specify the programming
language for the code block by
selecting "LAD" from the drop-
down menu.
5. Click "OK" to add the block to
the project.
Manual, 11/2011, A5E02486774-04
Easy Book

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents