P
ar
t
2: C
omman
d
s
Moog Animatics SmartMotor™ Developer's Guide, Rev. L
Page 600 of 909
EXAMPLE:
(Subroutine reports the status of the 24V expansion IO)
'This code reports the status of the 24V expansion IO
a=0
'Set loop start point for first IO
WHILE
a<10
'While less than number of IO
b=a+16
'Set b to IO number for 24V expansion
c=
OC
(b)
'Set c to IO condition status
d=
OF
(b)
'Set d to IO fault status
("Output ",b," on pin ",a)
IF
d==1
'If d represents overcurrent
(" is FAULTED overcurrent.",#13)
ELSEIF
d==2
'If d represents a possible short
(" is FAULTED short.",#13)
ELSEIF
c
'If c is true
(" is HIGH.",#13)
ELSE
'If c is not true
(" is LOW.",#13)
ENDIF
a=a+1
'Increment loop counter
LOOP
Program output is:
Output 16 on pin 0 is HIGH.
Output 17 on pin 1 is HIGH.
Output 18 on pin 2 is LOW.
Output 19 on pin 3 is LOW.
Output 20 on pin 4 is LOW.
Output 21 on pin 5 is LOW.
Output 22 on pin 6 is LOW.
Output 23 on pin 7 is LOW.
Output 24 on pin 8 is LOW.
Output 25 on pin 9 is LOW.
RELATED COMMANDS:
R
Part 2: Commands: OC(...)
Содержание SmartMotor
Страница 1: ...Developer s Guide Class 5 Later SmartMotor Technology with TM ...
Страница 909: ...PN SC80100003 002 Rev L ...