P
ar
t
2: C
omman
d
s
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 488 of 909
EXAMPLE:
(Routine pulses output on a given position)
EIGN
(W,0)
'Disable limits
ZS
'Clear faults
ITR
(0,4,0,0,1)
'ITR(int#,sw,bit,state,lbl)
ITRE
'Enable all interrupts
EITR
(0)
'Enable interrupt 0
OUT
(1)=1
'Set I(0)/O B to output, high
ADT
=100
'Set maximum accel/decel
VT
=100000
'Set maximum velocity
MP
'Set Position mode
'****Main Program Body****
WHILE
1>0
O
=0
'Reset origin for move
PT
=40000
'Set final position
G
'Start motion
WHILE
PA<20000
'Loop while motion continues
LOOP
'Wait for desired position to pass
OUT
(1)=0
'Set output low
TMR
(0,400)
'Use timer 0 for pulse width
TWAIT
WAIT
=1000
'Wait 1 second
LOOP
END
'****Interrupt Subroutine****
C1
OUT
(1)=1
'Set output high again
RETURNI
RELATED COMMANDS:
Disable Interrupts (see page 388)
E-Configure Input as Sync Master (see page 416)
Enable Interrupts (see page 417)
End Program Code Execution (see page 431)
ITR(Int#,StatusWord,Bit#,BitState,Label#)
Interrupt Setup (see page 486)
Interrupt Disable, Global (see page 489)
Enable Interrupts, Global (see page 491)
Pause Program Execution (see page 617)
Resume Program Execution (see page 672)
Return Interrupt (see page 676)
Part 2: Commands: ITR(Int#,StatusWord,Bit#,BitState,Label#)
Содержание SmartMotor
Страница 1: ...Developer s Guide Class 5 Later SmartMotor Technology with TM ...
Страница 909: ...PN SC80100003 002 Rev L ...