Iec 61131-3 Second edition 2003-01 Programmable controllers – Part 3: Programming languages


Download 1.35 Mb.
Pdf ko'rish
bet102/158
Sana17.06.2023
Hajmi1.35 Mb.
#1528208
1   ...   98   99   100   101   102   103   104   105   ...   158
Bog'liq
ourdev 569653

16
LE
(
Comparison: <=
17
LT
(
Comparison: <
18
JMP
b
C, N
Jump to label
19
CAL
c
C, N
Call function block (See table 53)
Copyright International Electrotechnical Commission 
Provided by IHS under license with IEC
Not for Resale
No reproduction or networking permitted without license from IHS
--``````-`-`,,`,,`,`,,`---


– 126 –
61131-3 
 IEC:2003(E)
Table 52 - Instruction list operators
No.
OPERATOR
a
MODIFIERS
 (Note 1)
SEMANTICS
20
RET
f
C, N
Return from called function, function block or
program
21
)
f
Evaluate deferred operation
NOTE See preceding text for explanation of modifiers and evaluation of
expressions.
a
Unless otherwise noted, these operators shall be either overloaded or typed as
defined in 2.5.1.4 and 2.5.1.5.6.
b
The operand of a JMP instruction shall be the label of an instruction to which
execution is to be transferred.
When a JMP instruction is contained in an
ACTION... END_ACTION construct, the operand shall be a label within the same
construct.
c
The operand of this instruction shall be the name of a function block instance to
be invoked.
d
The result of this operation shall be the bitwise Boolean negation (one's
complement) of the current result.
e
The type of the operand of this instruction shall be BOOL.
f
This instruction does not have an operand.
3.2.3 Functions and function blocks
Functions as defined in 2.5.1 shall be invoked by placing the function name in the operator field. As
shown in features 4 and 5 of table 53, this invocation can take one of two forms. The value returned by
a function upon the successful execution of a RET instruction or upon reaching the physical end of the
function shall become the “current result” described in 3.2.2.
The argument list of functions (feature 4 in table 53) is equivalent to feature 1 in table 19 a) . The rules
and features defined in 2.5.1.1 and table 19 a) for function calls apply.
A non-formal input list of functions (feature 5 in table 53) is equivalent to feature 2 in table 19 a). The
rules and features defined in 2.5.1.1 and table 19 a) for function calls apply. In contrast to the
examples given in table 19 a) for ST language, the first argument is not contained in the non-formal
input list in IL , but the current result shall be used as the first argument of the function. Additional
arguments (starting with the 2nd), if required, shall be given in the operand field, separated by
commas, in the order of their declaration.
Function blocks as defined in 2.5.2 can be invoked conditionally and unconditionally via the CAL (Call)
operator listed in table 52. As shown in features 1a, 1b, 2 and 3 of table 53, this invocation can take
one of four forms.
A formal argument list of a function block invocation (feature 1a in table 53) is equivalent to feature 1
in table 19 a). A non-formal argument list of a function block invocation (feature 1b in table 53) is
equivalent to feature 2 in table 19 a) . The rules and features defined in 2.5.1.1 and table 19 a) for
function calls apply correspondingly, by replacing each occurrence of the term ‘function’ by the term
‘function block’ in these rules.
All assignments in an argument list of a conditional function block invocation shall only be performed
together with the invocation, if the condition is true.
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)
– 127 –

Download 1.35 Mb.

Do'stlaringiz bilan baham:
1   ...   98   99   100   101   102   103   104   105   ...   158




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling