328
Gemini GV6K/GT6K Command Reference
UNTIL( )
Until Part of Repeat Statement
Type
Program Flow Control
Syntax
<a_><!>UNTIL(expression)
Units
n/a
Range
Up to 80 characters (including parentheses)
Default
n/a
Response
n/a
See Also
JUMP, REPEAT
Product Rev
GT6K 6.0
GV6K 6.0
The
UNTIL()
command, in conjunction with the
REPEAT
command, provide a means of conditional
program flow. The
REPEAT
command marks the beginning of the conditional statement. The commands
between the
REPEAT
and the
UNTIL
command are executed at least once. Upon reaching the
UNTIL
command, the expression contained within the
UNTIL
command is evaluated. If the expression is false, the
program flow is redirected to the first command after the
REPEAT
command. If the expression is true, the
first command after the
UNTIL
command is executed.
Up to 16 levels of
REPEAT
...
UNTIL()
commands may be nested.
NOTE
:
Be careful about performing a
GOTO
between
REPEAT
and
UNTIL
. Branching to a different
location within the same program will cause the next
REPEAT
statement encountered to be nested
within the previous
REPEAT
statement, unless an
UNTIL
command has already been encountered.
The
JUMP
command should be used in this case.
All logical operators (
AND
,
OR
,
NOT
), and all relational operators (
=
,
>
,
>=
,
<
,
<=
,
<>
) can be used within the
UNTIL
expression. There is no limit on the number of logical operators, or on the number of relational
operators allowed within a single
UNTIL
expression.
The limiting factor for the
UNTIL
expression is the command length. The total character count for the
UNTIL
command and expression cannot exceed 80 characters. For example, if you add all the letters in the
UNTIL
command and the letters within the
()
expression, including the parentheses and excluding the
spaces, this count must be less than or equal to 80.
All assignment operators (
A
,
AD
,
ANI
,
AS
,
D
,
DPTR
,
ER
,
IN
,
INO
,
MOV
,
OUT
,
PC
,
PCC
,
PCE
,
PCMS
,
PE
,
PER
,
SS
,
TIM
,
US
,
V
,
VEL
, etc.) can be used within the
UNTIL
expression.
Example:
REPEAT
; Beginning of REPEAT ... UNTIL( ) loop
GO1
; Initiate motion
IF(IN=b1X0)
; IF condition: if onboard input 1 = 1, input 3 = Ø
VAR1=VAR1+1
; If condition comes true increment variable 1 by 1
ELSE
; Else part of IF condition
TPE
; If condition does not come true transfer position of encoder
NIF
; End IF statement
UNTIL(VAR1=12)
; Repeat loop until variable 1 = 12
[ US ]
User Status
Type
Assignment or Comparison
Syntax
See below
Units
n/a
Range
n/a
Default
n/a
Response
n/a
See Also
INDUSE, INDUST, TUS
Product Rev
GT6K 6.0
GV6K 6.0
The User Status (
US
) operator is used to assign the user status bits to a binary variable, or to make a comparison
against a binary or hexadecimal value. To make a comparison against a binary value, the letter b (b or B) must be
placed in front of the value. The binary value itself must only contain ones, zeros, or Xs (1, Ø, X, x). To make a
www.comoso.com
Содержание Gemini GV6K
Страница 24: ...www comoso com...
Страница 40: ...www comoso com...
Страница 344: ...www comoso com...
Страница 350: ...www comoso com...