En (end), Program flow, Arguments: none – Yaskawa LEGEND-MC User Manual

Page 115

Advertising
background image

105

LEGEND-MC User’s Manual

EN (End)

[Program Flow]

DESCRIPTION:

The EN command is used to designate the end of a program or subroutine. If a subroutine was called by the
JS command, the EN command ends the subroutine and returns program flow to the point just after the JS
command.

The EN command is also used to end the automatic subroutines #MCTIME and #CMDERR.

ARGUMENTS: none

NOTE: Use the RE command to return from the interrupt handling subroutines #LIMSWI and
#POSERR. Use the RI command to return from the #ININT subroutine.

USAGE:

RELATED COMMANDS:

EXAMPLES:

NOTE: Instead of EN, use the RE command to end the error subroutine and limit subroutine. Use
the RI command to end the input interrupt) subroutine.

While Moving

Yes

Default Value

n/a

In a Program

Yes

Default Format

n/a

Command Line

No

Can be Interrogated

No

Used as an Operand

No

Distributed Control

No, Local

"RE"

Return from error subroutine

"RI"

Return from interrupt subroutine

#A

Program A

PR 500

Move X axis forward 500 counts

BGX

Move X axis forward 1000 counts

AMX

Pause the program until the X axis completes the motion

PR 1000

Set another Position Relative move

BGX

Begin motion

EN

End of Program

Advertising