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 #487 background imageLoading...
Page #487 background image
Part 2: Commands
Moog Animatics SmartMotor Developer's Guide,Rev. L
Page 487 of 909
The routine called as label# must have a RETURNI at the end instead of a RETURN. Therefore,
interrupt routines should not be called as subroutines, and subroutines should not be called as
interrupt routines. If there is a need for an interrupt or a subroutine to use a common section
of code, then the interrupt routine should use a GOSUB to call the common section as a
subroutine. This method ensures that the return path will still go through the RETURNI at the
end of the interrupt routine.
Lower interrupt ID numbers have a higher priority. This means that they can be called even
while a lower-priority interrupt routine is in progress. In some cases, this may cause a
conflict, which is typically referred to as a race condition. For example, if both routines need
to read and modify the same variable, one or more interrupts can be disabled while this
critical operation is taking place. For more details, see the command pair DITR(int) on page
388 and EITR(int) on page 417, or the command pair ITRD on page 489 and ITRE on page 491.
NOTE: Each instance of the ITR command must have a unique interrupt level. It is
not possible to configure two different events with the same priority level.
An interrupt will block itself, but an interrupt does not automatically disable itself. In other
words, the interrupt-causing event will call the interrupt routine. If the same event occurs
again while inside the interrupt routine, then that same interrupt routine will be called again.
This occurs immediately after the first instance of the interrupt routine completes.
EXAMPLE: (Fault handler routine)
EIGN(W,0,12) 'Another way to disable Travel Limits
ZS 'Clear faults
ITR(0,0,0,0,0) 'Set Int 0 for: stat word 0, bit 0,
'shift to 0, to call C0
EITR(0) 'Enable Interrupt 0
ITRE 'Global Interrupt Enable
PAUSE 'Pause to prevent "END" from disabling
'Interrupt, no change to stack
END
C0 'Fault handler
MTB:0 'Motor will turn off with Dynamic
'braking, tell other motors to stop.
US(0):0 'Set User Status Bit 0 to 1 (Status
'Word 12 bit zero)
US(ADDR):0 'Set User Status Bit "address" to 1
'(Status Word 12 Bit "address")
RETURNI
Part 2: Commands: ITR(Int#,StatusWord,Bit#,BitState,Label#)

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