Programming A Function - Siemens SIMATIC STEP 7 V5.2 Getting Started

Table of Contents

Advertisement

8

Programming a Function

8.1
Creating and Opening Functions (FC)
Functions, like function blocks, are below the organization block in the program
hierarchy. In order for a function to be processed by the CPU, it must also be
called in the block above it in the hierarchy. In contrast to the function block,
however, no data block is necessary.
With functions, the parameters are also listed in the variable declaration table, but
static local data are not permitted.
You can program a function in the same way as a function block using the
LAD/STL/FBD program window.
You should already be familiar with programming in Ladder Logic, Function Block
Diagram, or Statement List (see Chapters 4 and 5) and also symbolic
programming (see Chapter 3).
STEP 7 Getting Started
A5E00171228-01
If you have worked through the
"Getting Started" sample project in
Chapters 1 to 7, open this now.
If not, create a new project in the
SIMATIC Manager using the menu
command File > "New Project"
Wizard. To do this, follow the
instructions in Section 2.1 and rename
the project "Getting Started Function."
We will continue with the "Getting
Started" project. However, you can still
carry out each step using a new
project.
Navigate to the Blocks folder and
open it.
Click in the right half of the window
with the right mouse button.
8-1

Advertisement

Table of Contents
loading

Table of Contents