Siemens SIMATIC STEP 7 V5.2 Getting Started page 51

Table of Contents

Advertisement

By changing the actual values, you have finished your preparations for controlling two
engines with just one function block. To control more engines, all you have to do is generate
additional data blocks.
The next thing you have to do is program the call for the function block in OB1. To do this,
continue reading in Section 5.6 for Ladder Logic, Section 5.7 for Statement List, or
Section 5.8 for Function Block Diagram, depending on the programming language you are
using.
STEP 7 Getting Started
A5E00171228-01
Creating a Program with Function Blocks and Data Blocks
Confirm the subsequent dialog with
Yes to assign parameters to the
instance data blocks.
Next enter the value "1500" for the
petrol engine in the Actual Value
column (in the row "Setpoint_Speed).
You have now defined the maximum
speed for this engine.
Save DB1 and close the program
window.
In the same way as for DB1, generate
another data block, DB2, for FB1.
Now enter the actual value "1200" for
the diesel engine.
Save DB2 and close the program
window.
You can find more information under Help > Contents
in the topics "Programming Blocks" and "Creating
Data Blocks."
5-15

Advertisement

Table of Contents
loading

Table of Contents