Parker Automation Gemini GV6K Command Reference Manual page 159

Servo drive/controller
Table of Contents

Advertisement

between the
and the
IF
NIF
following the
.
NIF
When the
command is used in conjunction with the
ELSE
commands between the
and
IF
are ignored. False
evaluations cause commands between the
NIF
IF
the commands between the
IF
to be included in the
statement.
IF
The
structure can be nested up to 16 levels deep.
IF( ).. ELSE .. NIF
Be careful about performing a
NOTE:
the same program will cause the next
statement, unless a
IF
statement programming order:
IF
All logical operators (
,
AND
OR
the
expression. There is no limit on the number of logical operators, or on the number of relational
IF
operators allowed within a single
length. The total character count for the
(e.g., If you add up the letters in the
parenthesis and excluding each space, this count must be less than or equal to 80.)
All assignment operators (
,
A
,
,
) can be used within the
VEL, VELA, etc.
US
V
Multiple parentheses may not be used within the
Example:
IF(IN=b1X0 AND VAR1=1)
TREV
NIF
IF(A<5000 AND PC>50000)
VAR1=VAR1+1
NIF
IF(VEL<123 OR VEL>156)
WRITE"Something's Wrong\13" ; Put message Something's Wrong<cr> in output buffer
NIF
IF(OUT=b110X1 AND VAR1<=13)
VAR1=VAR1+1
ELSE
VAR1=VAR1-1
NIF
are ignored, and command processing continues with the first command
commands to be executed, and the commands after the
ELSE
and the
are ignored. The
ELSE
between
GOTO
IF
statement encountered to be nested within the previous
IF
command has already been encountered.
NIF
IF(expression)...commands...NIF
or
IF(expression)...commands...ELSE...commands...NIF
,
), and all relational operators (
NOT
expression. The limiting factor for the
IF
command and expression cannot exceed 80 characters.
IF
command and the letters within the
IF
,
,
,
,
,
,
,
AD
AS
ASX
D
ER
IN
MOV
expression.
IF
command.
IF
; If input 1 is ON, input 3 is OFF, and
; variable 1 equals 1, then the IF statement evaluates
; true, so commands between this statement and NIF
; are executed
; Transfer revision level
; End IF statement
; If the acceleration is less than 5000, and
; the commanded position is greater than
; 50000, then do the IF statement. Note: The
; acceleration value used is programmed acceleration,
; not actual.
; Increment variable 1
; End if statement
; If the current velocity is less than 123
; or if it is greater than 156, then do the commands
; following the IF statement
; End if statement
; If outputs 1, 2 and 5 are ON, output 3 is
; off and variable 1 is less than or equal to 13,
; then set variable 1 equal to variable 1 plus 1,
; else set variable 1 equal to variable 1 minus 1
; End IF statement
www.comoso.com
command, true
evaluations cause the
IF
IF
and the
ELSE
NIF
command is optional and does not have
ELSE
and
. Branching to a different location within
NIF
,
,
,
,
,
) can be used within
=
>
>=
<
<=
<>
expression is the command
IF
expression, including the
( )
,
,
,
,
,
,
OUT
PC
PCE
PCM
PE
PER
Command Descriptions
until the
ELSE
to be executed, and
,
,
,
,
PMAS
SEG
SS
TIM
157

Advertisement

Table of Contents
loading

This manual is also suitable for:

Gemini gt6k

Table of Contents