Command Descriptions
205
The axis moving status is also reported with bit #1 of the
TAS
,
TASF
and
AS
commands
Syntax:
VARBn=MOV
where
n
is the binary variable number,
or
MOV
can be used in an expression such as
IF(MOV=b1)
, or
IF(MOV=h1)
If the axis is in motion, the bit will be a one (1). If the axis is not in motion, the bit will be a zero (Ø).
Example:
COMEXC1
; Enable continuous command processing mode
COMEXS1
; Save command buffer on stop
MC1
; Enable continuous mode
A2
; Set acceleration to 2 units/sec/sec
AD2
; Set deceleration to 2 units/sec/sec
V1
; Set velocity to 1 units/sec
GO1
; Initiate motion
T5
; Wait 5 seconds
S1
; Stop motion
WAIT(MOV=b0)
; Wait for motion to come to a halt
COMEXC0
; Disable continuous command processing mode
NIF
End IF Statement
Type
Program Flow Control or Conditional Branching
Syntax
<a_><!>NIF
Units
n/a
Range
n/a
Default
n/a
Response
No response when used in conjunction with the IF command
See Also
ELSE,
IF
Product Rev
GT6K 6.0
GV6K 6.0
The
NIF
command is used in conjunction with the
IF
and
ELSE
commands to provide conditional program
flow. If the expression contained within the parentheses of the
IF
command evaluates true, then the commands
between the
IF
and the
ELSE
are executed, and the commands between the
ELSE
and the
NIF
are ignored. If
the expression evaluates false, the commands between the
ELSE
and the
NIF
are executed, and the commands
between
IF
and
ELSE
are ignored. The
ELSE
command is optional and does not have to be included in the
IF
statement.
Programming order:
IF(expression)
...commands...
NIF
or
IF(expression)
...commands...
ELSE
...commands...
NIF
NOTE
:
Be careful about performing a
GOTO
between
IF
and
NIF
. Branching to a different location within
the same program will cause the next
IF
statement encountered to be nested within the previous
IF
statement, unless a
NIF
command has already been encountered.
Example:
IF(IN=b1X0)
; If input 1 is ON and input 3 is OFF (IF statement evaluates
; true), run program #13. If the IF statement evaluates false,
; turn on output #3.
PROG13
; Run program #13
ELSE
; If the IF condition evaluates false, execute the subsequent
; commands until the NIF.
OUTxx1
; Turn on output #3
NIF
; End IF statement
www.comoso.com
Summary of Contents for Gemini GV6K
Page 24: ...www comoso com...
Page 40: ...www comoso com...
Page 344: ...www comoso com...
Page 350: ...www comoso com...