P
ar
t
2: C
omman
d
s
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 614 of 909
Motor
Type
word
Allowed
Values
IO
Allowed
Range
Logic 0
Voltage
Logic 1
Voltage
Formula
Value
Range
Bitmask
Range
D-style
0
0-6
0
5
0 to 255
0 to 255
7 (virtual
only, not con-
nected)
N/A
N/A
D-style
with AD1
option
0
0-6
0
5
0 to 255
0 to 255
0
7 (virtual
only, not con-
nected)
N/A
N/A
1
16-25
0
24
0 to 1023
0 to 1023
M-style
0
0-10
0
24
0 to 2047
0 to 2047
EXAMPLE:
(For pulse width)
. . .
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 lo
TMR
(0,400)
'Use timer 0 for pulse width
TWAIT WAIT
=1000
'wait 1 second
LOOP
. . .
EXAMPLE:
(Set all I/O to outputs, and set their level to the value of x)
x=1
'x can be 1 (ON) or 0 (OFF)
i=0
WHILE
i<=6
'Loops until i=6
OUT
(i)=x
'Set to output and turn on or off based on value of x
i=i+1
'Increment i by 1
LOOP
'Loop back to WHILE
RELATED COMMANDS:
Enable as Input for General-Use (see page 405)
R
Specified Input (see page 478)
R
Output Condition (see page 599)
R
Part 2: Commands: OUT(...)=formula
Содержание SmartMotor
Страница 1: ...Developer s Guide Class 5 Later SmartMotor Technology with TM ...
Страница 909: ...PN SC80100003 002 Rev L ...