This document summarizes key structured text constructs in IEC 61131-3, including invocation, assignment, expressions, control structures like IF/THEN, CASE/OF, FOR/DO, WHILE/DO, and REPEAT/UNTIL. It also covers the order of operations and definitions of subroutines.
This document summarizes key structured text constructs in IEC 61131-3, including invocation, assignment, expressions, control structures like IF/THEN, CASE/OF, FOR/DO, WHILE/DO, and REPEAT/UNTIL. It also covers the order of operations and definitions of subroutines.
STRUCTURED TEXT CONSTRUCTS ASSIGNMENT IF…THEN tag := expression; IF Boolean_expression1 THEN … tag [:=] expression; // Non-retentive assignment ELSEIF boolean_expression2 THEN … string1.data[0] := 65; ELSE … END_IF; EXPRESSION CASE…OF ELEMENTS OF EXPRESSIONS: CASE numeric_expression OF • Tag name 1: … • Number 2,3: • Operator … • Function 4..7: o ABS, ACOS, ASIN, ATAN, COS, DEG, LN, … LOG, RAD, SIN, SQRT, TAN, TRUNC, … 8,11..13: … ORDER OF EXECUTION ELSE … Order Operation END_CASE; 1 () 2 function_name(…) FOR…DO 3 ** FOR count := initial_value 4 - (negate) TO final_value 5 NOT BY increment 6 *, /, MOD DO 7 +, - (subtract) … IF bool_expression THEN 8 <, <=, >, >= EXIT; 9 =, <> END_IF; 10 &, AND END_FOR; 11 XOR 12 OR WHILE…DO WHILE bool_expression1 DO INSTRUCTIONS … Must be in a standalone statement: IF bool_expression2 THEN EXIT; OSRI(osri_1); // instruction END_IF; END_WHILE; AOI1(backing_tag, <parameters>); // AOI REPEAT…UNTIL SUBROUTINE REPEAT … IF bool_expression2 THEN DEFINITION EXIT; SBR(value_a, value_b); END_IF; … UNTIL bool_expression1 RET(float_a); END_REPEAT;
(Ebook) Mastering VMware Horizon 8: An Advanced Guide to Delivering Virtual Desktops and Virtual Apps by Peter von Oven ISBN 9781484272602, 1484272609 - Download the ebook now for full and detailed access