Galil Motion Control manc 18x 6 Page 86
DMC-18x6 Command Reference
78
ELSE
FUNCTION: Else function for use with IF conditional statement
DESCRIPTION:
The ELSE command is an optional part of an IF conditional statement. The ELSE command must
occur after an IF command and it has no arguments. It allows for the execution of a command
only when the argument of the IF command evaluates False. If the argument of the IF
command evaluates false, the controller will skip commands until the ELSE command. If the
argument for the IF command evaluates true, the controller will execute the commands
between the IF and ELSE command.
ARGUMENTS: ELSE
USAGE:
DEFAULTS:
While Moving
Yes
Default Value
In a Program
Yes
Default Format
Command Line
No
Controller Usage
ALL CONTROLLERS
RELATED COMMANDS:
End of IF conditional Statement
EXAMPLES:
IF (@IN[1]=0)
IF conditional statement based on input 1
IF (@IN[2]=0)
2
nd
IF conditional statement executed if 1
st
IF
conditional true
MG "INPUT 1 AND INPUT 2 ARE ACTIVE"
Message to be executed if 2
nd
IF conditional is
true
ELSE
ELSE command for 2
nd
IF conditional
statement
MG "ONLY INPUT 1 IS ACTIVE"
Message to be executed if 2
nd
IF conditional is
false
ENDIF
End of 2
nd
conditional statement
ELSE
ELSE command for 1
st
IF conditional statement
MG"ONLY INPUT 2 IS ACTIVE"
Message to be executed if 1
st
IF conditional
statement is false
ENDIF
End of 1
st
conditional statement