![Omron CX-PROGRAMMER V8.1 Скачать руководство пользователя страница 166](http://html1.mh-extra.com/html/omron/cx-programmer-v8-1/cx-programmer-v8-1_operation-manual_744203166.webp)
141
ST Language Configuration
Section 5-4
5-4
ST Language Configuration
5-4-1
Statements
Statement
Function
Example
End of statement
Ends the statement
;
Comment
All text between (* and *) is treated as
a comment.
(*
comment
*)
Assign-
ment state-
ment
Assignment
Substitutes the results of the expres-
sion, variable, or value on the right for
the variable on the left.
A:=B;
Control
statements
IF, THEN, ELSIF, ELSE,
END_IF
Evaluates an expression when the
condition for it is true.
IF (
condition_1
) THEN
(
expression 1
);
ELSIF (
condition_2
) THEN
(
expression 2
);
ELSE
(
expression 3
);
END_IF;
CASE, ELSE, END_CASE
Evaluates an express based on the
value of a variable.
CASE (
variable
) OF
1: (
expression 1
);
2: (
expression 2
);
3: (
expression 3
);
ELSE
(
expression 4
);
END_CASE;
FOR, TO, BY, DO,
END_FOR
Repeatedly evaluates an expression
according to the initial value, final
value, and increment.
FOR (
identifier
) := (
initial_value
) TO
(
final_value
) BY (
increment
) DO
(
expression
);
END_FOR;
WHILE, DO, END_WHILE
Repeatedly evaluates an expression
as long as a condition is true.
WHILE (
condition
) DO
(
expression);
END_WHILE;
REPEAT, UNTIL,
END_REPEAT
Repeatedly evaluates an expression
until a condition is true.
REPEAT
(
expression);
UNTIL (
condition
)
END_REPEAT;
EXIT
Stops repeated processing.
EXIT;
RETURN
ST program:
Ends the ST task that is being exe-
cuted, and executes the next task.
ST used in SFC:
Ends the SFC action program that is
being executed, and executes the
next action program.
ST used in a function block:
Returns from the called program to
the point in the calling program
where the call occurred.
RETURN;
Function block instance call
Calls a function block definition.
When used in a function block:
Variable name with FUNCTION
BLOCK data type (called function
block definition’s input variable name
:= calling function block definition’s
variable name or constant, ..., called
function block definition’s output vari-
able name or constant => calling func-
tion block definition’s output variable
name, ...);
Содержание CX-PROGRAMMER V8.1
Страница 3: ...iv...
Страница 5: ...vi...
Страница 7: ......
Страница 15: ...xvi...
Страница 19: ...xx...
Страница 25: ...xxvi Application Precautions 4...
Страница 26: ...Part 1 Function Blocks...
Страница 27: ......
Страница 153: ...128 Procedures Section 3 2...
Страница 154: ...Part 2 Structured Text ST...
Страница 155: ......
Страница 159: ...134 CX Programmer Specifications Section 4 2...
Страница 205: ...180 Procedures Section 6 1...
Страница 207: ...182 System defined external variables supported in function blocks Appendix A...
Страница 229: ...204 Revision History...
Страница 230: ......