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


B.3 Language ST (Structured Text)


Download 1.35 Mb.
Pdf ko'rish
bet129/158
Sana17.06.2023
Hajmi1.35 Mb.
#1528208
1   ...   125   126   127   128   129   130   131   132   ...   158
Bog'liq
ourdev 569653

B.3 Language ST (Structured Text)
B.3.1 Expressions
PRODUCTION RULES:
expression ::= xor_expression {'OR' xor_expression}
xor_expression ::= and_expression {'XOR' and_expression}
and_expression ::= comparison {('&' | 'AND') comparison}
comparison ::= equ_expression { ('=' | '<>') equ_expression}
equ_expression ::= add_expression {comparison_operator add_expression}
comparison_operator ::= '<' | '>' | '<=' | '>=' '
add_expression ::= term {add_operator term}
add_operator ::= '+' | '-'
term ::= power_expression {multiply_operator power_expression}
multiply_operator ::= '*' | '/' | 'MOD'
power_expression ::= unary_expression {'**' unary_expression}
unary_expression ::= [unary_operator] primary_expression
unary_operator ::= '-' | 'NOT'
primary_expression ::=
constant | enumerated_value | variable | '(' expression ')'
| function_name '(' param_assignment {',' param_assignment} ')'
SEMANTICS: these definitions have been arranged to show a top-down derivation of expression
structure. The precedence of operations is then implied by a “bottom-up” reading of the definitions of
the various kinds of expressions. Further discussion of the semantics of these definitions is given in
3.3.1. See 2.5.1.1 for details of the semantics of function calls.
B.3.2 Statements
PRODUCTION RULE:
statement_list ::= statement ';' {statement ';'}
statement ::= NIL | assignment_statement | subprogram_control_statement
| selection_statement | iteration_statement
SEMANTICS: see 3.3.2.
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)
– 161 –

Download 1.35 Mb.

Do'stlaringiz bilan baham:
1   ...   125   126   127   128   129   130   131   132   ...   158




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