Siemens SIMATIC STEP 7 V5.2 Getting Started page 39

Table of Contents

Advertisement

5.2
Programming FB1 in Ladder Logic
We will now show you how to program a function block which can, for example,
control and monitor a petrol or diesel engine using two different data blocks.
All "engine-specific" signals are passed on as block parameters from the
organization block to the function block and must therefore be listed in the variable
declaration table as input and output parameters (declaration "in" and "out").
You should already know how to enter a series circuit, a parallel circuit, and a
memory function with STEP 7.
Declare / Define Variables First
The variable declaration area consists of a variable overview (left pane) and of the
variable detail view (right pane).
In the variable overview, select the declaration types "IN", "OUT" and "STAT" one
after the other and enter the following declarations into the corresponding variable
details.
In the variable overview, click the corresponding cells and apply the entries from
the subsequent figures. You can select the data type from the pull-down list
displayed.
STEP 7 Getting Started
A5E00171228-01
Creating a Program with Function Blocks and Data Blocks
Your LAD/STL/FBD program window is
open and the option View > LAD
(programming language) is activated.
Note that FB1 is now in the header,
because you double-clicked FB1 to
open the program window.
5-3

Advertisement

Table of Contents
loading

Table of Contents