EasyManuals Logo

Moog SmartMotor User Manual

Moog SmartMotor
909 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #193 background imageLoading...
Page #193 background image
Part 1: Programming
Moog Animatics SmartMotor Developer's Guide,Rev. L
Page 193 of 909
The ITR() function has five parameters:
ITR(Int #, Status Word, Bit #, Bit State, Label #)
Int #: Can be eight, numbered 0 to 7
Status Word: 0-8,12,13,16 and 17
Bit #: 0 to 15
Bit State: State that causes the interrupt, 0 or 1
Label #: Subroutine label number to be executed, 0 to 999
For an interrupt to work it must be enabled at two levels:
l
Individually enable an interrupt with the EITR() command with the interrupt number, 0
to 7, in the parentheses.
l
Enable all interrupts with the ITRE command.
Similarly, individual interrupts can be disabled with the DITR() command, and all interrupts
can be disabled with the ITRD command.
The STACK and END commands clear the tracking of subroutine nesting, and disable all
interrupts. For details on these commands, see Flow Commands on page 182.
In the following program example, interrupt number zero is set to look at Status Word 3, Bit
15, which is Velocity Target Reached. When this status bit switches to 1, subroutine 20
executes, which issues an X command and stops the motor. Every time the motor reaches its
target velocity, it immediately decelerates to a stop, causing it to forever accelerate and
decelerate without ever spending any time at rest or at the target velocity.
NOTE: The STACK and END commands disable all interrupts.
EIGN(2) 'Disable left limit
EIGN(3) 'Disable right limit
ZS 'Clear faults
VT=700000 'Set target velocity
ADT=100 'Set target accel/decel
MV 'Set Velocity mode
ITR(0,3,15,1,20)'Set interrupt
EITR(0) 'Enable interrupt zero
ITRE 'Enable all interrupts
G 'Start motion
C10 'Place a label
GOTO10 'Loop, req. for int. operation
END 'End (never reached)
C20 'Interrupt subroutine
X 'Decelerate to stop
TWAIT 'Hold program until motor reaches stop
G 'Restart velocity motion
RETURNI 'Return to infinite loop
Part 1: Programming: ITR(), ITRE, ITRD, EITR(), DITR(), RETURNI

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Moog SmartMotor and is the answer not in the manual?

Moog SmartMotor Specifications

General IconGeneral
BrandMoog
ModelSmartMotor
CategoryServo Drives
LanguageEnglish

Related product manuals