Else, Program flow – Yaskawa SMC–4000 User Manual
Page 110
100
SMC–4000 User Manual
ELSE
[Program Flow]
DESCRIPTION:
The ELSE command is an optional part of an
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: None
USAGE:
RELATED COMMANDS:
End of IF conditional Statement
EXAMPLES:
While Moving
Yes
Default Value
---
In a Program
Yes
Default Format
---
Command Line
No
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
ENDIF
End of 1
st
conditional statement