DMC-40x0 Command Reference
ENDIF • 97
ENDIF
FUNCTION:
End of IF conditional statement
DESCRIPTION:
The ENDIF command is used to designate the end of an IF conditional statement. An IF
conditional statement is formed by the combination of an IF and ENDIF command. An
ENDIF command must always be executed for every IF command that has been executed. It
is recommended that the user not include jump commands inside IF conditional statements
since this causes re-direction of command execution. In this case, the command interpreter
may not execute an ENDIF command.
ARGUMENTS:
ENDIF
USAGE:
While Moving
Yes
In a Program
Yes
Command Line
No
Controller Usage
ALL CONTROLLERS
RELATED COMMANDS:
Command to begin IF conditional statement
Optional command to be used only after IF command
Jump command
Jump to subroutine command
EXAMPLES:
#A
IF
(
@IN
[1]=0)
;
'IF conditional statement based on
;
'input 1
IF
(
@IN
[2]=0)
;
'2nd IF conditional statement
;
'executed if 1st IF conditional true
MG
"INPUT 1 AND INPUT 2 ARE ACTIVE"
;
'Message to be executed if 2nd IF
;
'conditional is true
ELSE
;
'ELSE command for 2nd IF conditional
;
'statement
MG
"ONLY INPUT 1 IS ACTIVE"
;
'Message to be executed if 2nd IF
;
'conditional is false
ENDIF
;
'End of 2nd conditional statement
ELSE
;
'ELSE command for 1st IF conditional
;
'statement
MG
"ONLY INPUT 2 IS ACTIVE"
;
'Message to be executed if 1st IF
;
'conditional statement is false
ENDIF
;
'End of 1st conditional statement
EN
Summary of Contents for DMC-40x0 Series
Page 2: ......
Page 4: ......
Page 10: ...vi i Table of Contents DMC 40x0 Command Reference This Page is Left Blank Intentionally ...