![Omron CX-PROGRAMMER V8.1 Скачать руководство пользователя страница 177](http://html1.mh-extra.com/html/omron/cx-programmer-v8-1/cx-programmer-v8-1_operation-manual_744203177.webp)
152
Statement Descriptions
Section 5-5
• Multiple statements can be executed in
expression_
@
. Be sure to use a
semicolon (;) delimiter between multiple statements in an
expression
.
• The ELSE statement can be omitted. When ELSE is omitted, no opera-
tion is executed if the result of any
condition
equation is false.
■
Examples
Example 1: If variable A>0 is true, variable X will be substituted with numerical
value 10.
If A>0 is false, but variable B=1, variable X will be substituted with numerical
value 1.
If A>0 is false, but variable B=2, variable X will be substituted with numerical
value 2.
If either of these conditions is met, variable X will be substituted with numeri-
cal value 0.
IF A>0 THEN X:=10;
ELSIF B=1 THEN X:=1;
ELSIF B=2 THEN X:=2;
ELSE X:=0;
END_IF;
CASE Statement
■
Summary
This statement executes an expression containing a selected integer that
matches the value from an integer equation. If the selected integer value is
not the same, either no expression or a specified expression is executed.
■
Reserved Word
CASE
■
Statement Syntax
CASE
<
integer_equation
>
OF
<
integer_equation
_
value_1
>
:
<
expression_1
>
;
<
integer_equation
_
value_2
>
:
<
expression_2
>
;
...
<
integer_equation
_
value_n
>
:
<
expression_n
>
;
ELSE
<
expression_m
>
;
END_CASE;
Содержание 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: ......