EasyManua.ls Logo

NUM 1020 - Instruction Execution Conditions

Default Icon
146 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Structured Programming
en-938872/2 1 - 7
1
1.2.2 Instruction Execution Conditions
Syntax
IF(condition) THEN
(instructions 1)
ELSE
(instructions 2)
ENDI
If the condition is true, «instructions 1» are executed. Else, «instructions 2» are
executed.
The word ELSE is optional.
Graph
ELSE
instructions 2
THEN
instructions 1
Condition
IF
Example
IF E70000> 100 AND E70000 <200 THEN
G77 H100
ELSE
G77 H500
ENDI
The word THEN may be programmed at the beginning of the next block and followed
by the functions to be executed.
Example:
IF L4 < 8
THEN L6 = L2+1 XL6
ENDI

Table of Contents

Related product manuals