Creating a Program with Function Blocks and Data Blocks
5-23
STEP 7 Getting Started
5E00171228-01
Program the call for the function block "Engine" (FB1) with the data block "Diesel"
(DB2) in a new network and use the corresponding addresses from the pull-down
list.
Save your program and close the
block.
When you create program structures with organization blocks, function blocks, and data
blocks, you must program the call for subordinate blocks (such as FB1) in the block above
them in the hierarchy (for example, OB1). The procedure is always the same.
You can also give the various blocks symbolic names in the symbol table (for example, FB1
has the name "Engine" and DB1 the name "Petrol").
You can archive or print out the programmed blocks at any time. The corresponding
functions can be found in the SIMATIC Manager under the menu commands File > Archive
or File > Print.
A signal "DE_xxx" is assigned to
each of the variables for the
diesel engine.
You can find more information under
in the topics "Calling Reference Helps" under
"Language Description: FBD," and "Program Control
Instructions."