Endif, Program flow – Yaskawa SMC–4000 User Manual

Page 113

Advertising
background image

103

SMC–4000 User 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:

ELSE

Optional command to be used only after IF command

JP (Jump to Program Location)

JS (Jump to Subroutine)

EXAMPLES:

While Moving

Yes

Default Value

n/a

In a Program

Yes

Default Format

n/a

Command Line

No

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