– 48 –
61131-3
IEC:2003(E)
Figure 5 illustrates both the graphical and equivalent textual use of functions,
including the use of a
standard function (ADD) with no defined formal
argument names; a standard function (SHL) with
defined formal argument names; the same function with additional use
of EN input and negated ENO
output; and a user-defined function (INC) with defined formal argument names.
Example
Explanation
+-----+
| ADD |
B---| |---A
C---| |
D---| |
+-----+
Graphical use of ADD function
(See 2.5.1.5.2)
(FBD language; see 4.3)
(No formal variable names)
A := ADD(B,C,D);
Textual
use of ADD function
(ST language; see 3.3)
+-----+
| SHL |
B---|IN |---A
C---|N |
+-----+
Graphical use of SHL function
(See 2.5.1.5.3)
(FBD language; see 4.3)
(Formal argument names)
A
:=
SHL
(
IN
:=
B
,
N
:=
C
);
Textual
use of SHL function
(ST language; see 3.3)
+---------+
| SHL |
ENABLE---|EN ENO|O--NO_ERR
B---|IN |---A
C---|N |
+---------+
Graphical use of SHL function
(See 2.5.1.5.3)
(FBD language; see 4.3)
(Formal argument names; use of EN input
and negated ENO output)
A
:=
SHL
(EN:=ENABLE,
IN:=B
,
N:=C,
NOT ENO => NO_ERR
);
Textual use of SHL function
(ST language; see 3.3)
+-----+
| INC |
| |---A
X---|V---V|---X
+-----+
Graphical
use of user-defined
INC function
(FBD language, see 4.3)
(Formal argument names for VAR_IN_OUT)
A := INC(V := X) ;
Textual use of INC function
(ST language, see 3.3)
Do'stlaringiz bilan baham: