Interrupt Example - YASKAWA XTRAWARE - V3.0 Manual

Supporting xtradrive versions 3.04 - 3.23
Table of Contents

Advertisement

Operating the XtraDrive Using XtraWare

4.11.8. Interrupt Example

The following example program illustrates the use of interrupts. (The
indented lines comment on the lines above.)
SET_VAR Interrupt_mask 3
LABEL 2
SET_OUTPUT 1 OFF
WAIT_INPUT 1 = 1 -1
CONTROL ON
MOVE_D 655360 -1
SET_OUTPUT 1 OFF
END
INT 0 Target_velocity >= 400
10. SET_OUTPUT 1 ON
11. INT_RETURN -1
12. EXT_INT 1 1 Falling
13. STOP_EX Emergency Servo OFF
14. INT_RETURN 2
82
Activates Interrupt 0 and 1.
Sets Output 1 value to 0.
Waits for In 1 to become True.
Starts the servo.
Moves motor 655360 UU at profile speed.
Sets Output 1 value to 0.
Program ends.
Interrupt service routine 0: Runs if Target_velocity variable is
equal to or exceeds 400.
Sets Output 1 value to 1.
Returns to program line at which the interrupt occurred.
Interrupt service routine 1: Runs if In 1 becomes False.
Stops the motion and turns the servo off.
Returns to program to label 2.
XtraWare User Manual

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xtraware 3.0

Table of Contents