Calling Function Blocks And Assigning Parameters To Them - Siemens CPU 948 Programming Manual

Simatic s5 s5-155u
Table of Contents

Advertisement

Function Blocks
2.3.3
Calling Function Blocks
and Assigning Parameters
to them
Step
1
Make sure that the called function block exists either
in the PG memory (offline) or in the CPU memory
(online).
2
Enter the call statement for the function block in the
block where the call is to originate.
You can program a function block call in an
organization, program or sequence block or
in another function block.
3
Assign the actual operand relevant to this call to each
of the formal operands, i.e. you assign parameters to
the function block.
These actual operands can be different for
separate calls (e.g. inputs and outputs for the
first call of FB 200, flags for the second call).
Using the formal operand list, you assign the
required actual operands for each function
block call.
Unconditional/conditional call
Unconditional call
"JU FBn" for FB function blocks or
"DOU FXn" for FX extended function blocks:
the referenced function block is processed
regardless of the previous result of logic
operation (RLO).
After the unconditional or conditional call, the RLO can no longer be combined logically. However, it is
carried over to the called function block with the jump and can be evaluated there.
2 - 28
You can call every function block as often as you want anywhere in
your STEP 5 program. You can call function blocks in a statement list
or in one of the graphic methods of representation (CSF or LAD).
To call a function block and assign parameters to it, perform the
following steps:
Action
"JC FBn" for FB function blocks or
"DOC FXn" for FX extended function blocks:
the referenced function block is only
processed when the result of logic operation
RLO = 1. If RLO = 0 the block call is not
executed. Regardless of whether the block call
is executed or not, the RLO is alsways set to "1".
Reaction on PG
none
After you enter the call statement
(e.g. JU FB200), the name of the
relevant function block and the formal
operand list appear automatically.
none
Conditional call
CPU 948 Programming Guide
C79000-G8576-C848-04

Advertisement

Table of Contents
loading

Table of Contents