Ri (return from interrupt), Program flow, N = 0 or 1 – Yaskawa LEGEND-MC User Manual

Page 208: 0 clears interrupt trippoint, 1 restores trippoint

Advertising
background image

198

LEGEND-MC User’s Manual

RI (Return from Interrupt)

[Program Flow]

DESCRIPTION:

The RI command is used to end the interrupt subroutine beginning with the label #ININT. An RI at the end
of this routine causes a return to the main program. The RI command also re-enables input interrupts. If the
program sequencer was interrupted while waiting for a trippoint, such as WT, RI1 restores the trippoint
upon return to the program. RI0 clears a trippoint. To avoid returning after an interrupt, use the ZS
command to zero the subroutine stack. Check the example section for more details about using interrupts.

ARGUMENTS: RI n

where

n = 0 or 1

0 clears interrupt trippoint

1 restores trippoint

USAGE:

RELATED COMMANDS:

EXAMPLES:

NOTE: An applications program must be executing for the #ININT subroutine to function.

While Moving

No

Minimum n Value

0

In a Program

Yes

Maximum n Value

1

Command Line

Yes

Default Value

---

Can be Interrogated

No

Default Format

---

Used as an Operand

No

Distributed Control

No, Local

#ININT

Input interrupt subroutine

"II"

Enable input interrupts

#A;II1;JP #A;EN

Program label

#ININT

Begin interrupt subroutine

MG "INPUT INTERRUPT"

Print Message

SB 1

Set output line 1

RI 1

Return to the main program and restore
trippoint

Advertising