4-107
MELFA-BASIC V functions
4MELFA-BASIC V
(3) Interrupt
Once the designated conditions are established, the command statement being executed can be interrupted
and a designated step branched to.
*Command word
*Statement example
*Related functions
Command word
Explanation
Def Act
Defines the interrupt conditions and process for generating interrupt.
Act
Designates the validity of the interrupt.
Return
If a subroutine is called for the interrupt process, returns to the interrupt source line.
Statement example
Explanation
Def Act 1, M_In(10)=1 GoSub *SUB1 ..............................
If input signal bit 10 is turned on for interrupt number 1, the subroutine on step *SUB1 is
defined to be called after the robot decelerates and stops. The deceleration time
depends on the Accel and Ovrd instructions.
Def Act 2, M_In(11)=1 GoSub *SUB2, L...........................
If input signal bit 11 is turned on for interrupt number 2, the subroutine on step *SUB2 is
defined to be called after the statement currently being executed is completed.
Def Act 3, M_In(12)=1 GoSub *SUB3, S ..........................
If input signal bit 12 is turned on for interrupt number 3, the subroutine on step *SUB3 is
defined to be called after the robot decelerates and stops in the shortest time and
distance possible.
Act 1=1 .............................................................................
Enables the priority No. 1 interrupt.
Act 2=0 .............................................................................
Disables the priority No. 1 interrupt.
Return 0............................................................................
Returns to the step where the interrupt occurred.
Return 1............................................................................
Returns to the step following the step where the interrupt occurred.
Function
Explanation page
Unconditional branching, branching...................................................
Page 104, "(1) Unconditional branching, conditional branching,
waiting"
Subroutine..........................................................................................
Communication ..................................................................................