EasyManua.ls Logo

Vector VEC-VA Series User Manual

Vector VEC-VA Series
649 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #51 background imageLoading...
Page #51 background image
VA Motion Controller Programming Manual
46
select
IF
IF a<b THEN
c:=1;
ELSIF a=b
THEN c:=2;
ELSE c:=3;
END_IF:
When the expression
'
a<b
' after
IF
is
TRUE
, execute a
statement after
THEN
( with a semicolon
as the boundary ) , otherwise the
statement after
THEN is
not executed ,
and continue to judge
ELSIF
or
ELSE
.
CASE
CASE f OF
1:a:=3;
2: a:=4;
3: a:=2;
ELSE
a:=0;
END_CASE;
According to CASE value of the
expression after the keyword, a group of
statements. The variable or expression
' f ' must be an INT data type.
cycle
FOR
FOR a:=1 TO
10 BY 3 DO
f[a] :=b;
END_FOR;
The variable ' a ' starts at 1 , and the
statements of FOR and END_FOR are
executed repeatedly . For
each execution, a increases
by 3 and ends with 10 . All values
must have an ANY_INT data type.
WHILE
WHILE b>1
DO
b:=b/2;
END_WHILE;
When the value of the
expression
`b>1
' is
TRUE
, the statements
of
WHILE
and
END_WHILE
are executed
repeatedly until the value
of '
b>1 '
is
FALSE
.
REPEAT
REPEAT
a:=a*b;
UNTIL
a <10000
END_REPEAT;
The statements
of
REPEAT
and
END_REPEAT
are executed
repeatedly until the value of the
expression '
a<10000
' is
TRUE
.
End of cycle
EXIT
FOR a:=1 TO
2 DO
IF flag THEN
EXIT;
END IF
SUM:=
SUM+a
END_FOR
An exit statement can be used to
abort the execution of a loop statement.
End of
statement
;
Putting it after the statement
indicates the end of the statement, or it
can exist separately.
ST
language common keywords

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the Vector VEC-VA Series and is the answer not in the manual?

Vector VEC-VA Series Specifications

General IconGeneral
BrandVector
ModelVEC-VA Series
CategoryController
LanguageEnglish

Related product manuals