Iec 61131-3 Second edition 2003-01 Programmable controllers – Part 3: Programming languages
Table 54 - Standard function block input operators for IL language
Download 1.35 Mb. Pdf ko'rish
|
ourdev 569653
- Bu sahifa navigatsiya:
- 3.3 Structured Text (ST)
- 3.3.1 Expressions
Table 54 - Standard function block input operators for IL language
No. Operators FB Type Reference 4 S1,R SR 2.5.2.3.1 5 S,R1 RS 2.5.2.3.1 6 CLK TRIGGER 2.5.2.3.2 8 CU,R,PV CTU 2.5.2.3.3 9 CD,PV CTD 2.5.2.3.3 (note 1) 10 CU,CD,R,PV CTUD 2.5.2.3.3 (note 1) 11 IN,PT TP 2.5.2.3.4 12 IN,PT TON 2.5.2.3.4 13 IN,PT TOF 2.5.2.3.4 NOTE 1 LD is not necessary as a Standard Function Block input operator, because the LD functionality is included in PV. NOTE 2 The feature numbering in this table is such as to maintain consistency with the first edition of IEC 61131-3. 3.3 Structured Text (ST) This subclause defines the semantics of the ST (Structured Text) language whose syntax is defined in B.3. In this language, the end of a textual line shall be treated the same as a space (SP) character, as defined in 2.1.4. 3.3.1 Expressions An expression is a construct which, when evaluated, yields a value corresponding to one of the data types defined in 2.3.1 and 2.3.3. The maximum allowed length of expressions is an implementation- dependent parameter. Expressions are composed of operators and operands. An operand shall be a literal as defined in 2.2, an enumerated value as defined in 2.3.3, a variable as defined in 2.4, a function invocation as defined in 2.5.1, or another expression. The operators of the ST language are summarized in table 55. The evaluation of an expression consists of applying the operators to the operands in a sequence defined by the operator precedence shown in table 55. The operator with highest precedence in an expression shall be applied first, followed by the operator of next lower precedence, etc., until evaluation is complete. Operators of equal precedence shall be applied as written in the expression from left to right. For example, if A, B, C, and D are of type INT with values 1, 2, 3, and 4, respectively, then A+B-C*ABS(D) shall evaluate to -9, and (A+B-C)*ABS(D) shall evaluate to 0. Copyright International Electrotechnical Commission Provided by IHS under license with IEC Not for Resale No reproduction or networking permitted without license from IHS --``````-`-`,,`,,`,`,,`--- – 130 – 61131-3 IEC:2003(E) When an operator has two operands, the leftmost operand shall be evaluated first. For example, in the expression SIN(A)*COS(B) the expression SIN(A) shall be evaluated first, followed by COS(B), followed by evaluation of the product. The following conditions in the execution of operators shall be treated as errors in the sense of subclause 1.5.1: 1) An attempt is made to divide by zero. 2) Operands are not of the correct data type for the operation. 3) The result of a numerical operation exceeds the range of values for its data type. Boolean expressions may be evaluated only to the extent necessary to determine the resultant value. For instance, if A<=B, then only the expression (A>B) would be evaluated to determine that the value of the expression (A>B) & (C Functions shall be invoked as elements of expressions consisting of the function name followed by a parenthesized list of arguments, as defined in 2.5.1.1. When an operator in an expression can be represented as one of the overloaded functions defined in 2.5.1.5, conversion of operands and results shall follow the rule and examples given in 2.5.1.4. Copyright International Electrotechnical Commission Provided by IHS under license with IEC Not for Resale No reproduction or networking permitted without license from IHS --``````-`-`,,`,,`,`,,`--- |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling