– 76 –
61131-3
IEC:2003(E)
12a)
+-------+
| ACCUM |
INT---|A-----A|---INT
INT---|X |
+-------+
+---+
A---| + |---A
X---| |
+---+
FUNCTION_BLOCK ACCUM
VAR_IN_OUT A : INT ; END_VAR
VAR_INPUT X : INT ; END_VAR
A := A+X ;
END_FUNCTION_BLOCK
12b)
ACC1
+-------+
| ACCUM |
ACC----------|A-----A|---ACC
+---+ | |
X1---| * |---|X |
X2---| | +-------+
+---+
A declaration such as
VAR
ACC : INT ;
X1 : INT ;
X2 : INT ;
END_VAR
is assumed:
the effect of execution is
ACC := ACC+X1*X2 ;
12c)
ACC1 ACC2
+-------+ +-------+
| ACCUM | | ACCUM |
ACC----------|A-----A|----------------|A-----A|---ACC
+---+ | | +---+ | |
X1---| * |---|X | X3---| * |---|X |
X2---| | +-------+ X4---| | +-------+
+---+ +---+
Declarations as in
12b)
are assumed for
ACC, X1, X2, X3,
and X4.; the effect of
execution is
ACC :=
ACC+X1*X2+X3*X4;
12d)
ACC1
+-------+
| ACCUM |
X3-----------|A-----A|---X4
+---+ | |
X1---| * |---|X |
X2---| | +-------+
+---+
A declaration such as
VAR
X1 : INT ;
X2 : INT ;
....X3 : INT ;
... X4 : INT ;
END_VAR
is assumed: the effect of execution is
X3 := X3+X1*X2 ;
X4 := X3 ;
12e)
ACC1
+---+ +-------+
X1---| * | | ACCUM |
X2---| |---|A-----A|---ACC
+---+ | |
X3-----------|X |
+-------+
ILLEGAL USAGE!!!
Connection to
in-out variable A is not a
variable or function block name (see
preceding text)
Figure 12 - Declaration and usage of in-out variables in function blocks
a) Graphical and textual declarations
b), c), d) Legal usage, e) Illegal usage
IEC 2484/02
Copyright International Electrotechnical Commission
Provided by IHS under license with IEC
Not for Resale
No reproduction or networking permitted without license from IHS
--``````-`-`,,`,,`,`,,`---
61131-3
IEC:2003(E)
– 77 –
2.5.2.3 Standard function blocks
Definitions of function blocks common to all programmable controller programming languages are
given in this subclause.
Where graphical declarations of standard function blocks are
shown in this subclause, equivalent
textual declarations, as specified in 2.5.2.2, can also be written, as for example in table 35.
Standard
function blocks may be overloaded and may have
extensible inputs and outputs. The
definitions of such function block
types shall describe any constraints on the number and data types of
such inputs and outputs. The use of such capabilities in non-standard function blocks is beyond the
scope of this Standard.
2.5.2.3.1 Bistable elements
The
graphical form and function block body of standard bistable elements are shown in table 34. The
notation for these elements is chosen to be as consistent as possible with symbols 12-09-01 and
12-09-02 of IEC 60617-12.
Table 34 - Standard bistable function blocks
Do'stlaringiz bilan baham: