Endif, Program flow – Yaskawa LEGEND-MC User Manual

Page 116

Advertising
background image

106

LEGEND-MC User’s Manual

ENDIF

[Program Flow]

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:

RELATED COMMANDS:

EXAMPLES:

While Moving

Yes

Default Value

n/a

In a Program

Yes

Default Format

n/a

Command Line

No

Distributed Control

No, Local

"ELSE"

Optional command to be used only after IF command

"JP

Jump command

"JS"

Jump to subroutine command

IF (@IN[1]=0)

IF conditional statement based on input 1

"MG " INPUT 1 IS ACTIVE

Message to be executed if “IF” conditional is true

ENDIF

End of conditional statement

Advertising