Optima DMC-1xxx and DMC-18x2 Command Reference
EI
i
74
EI
FUNCTION: Enable Interrupts
DESCRIPTION:
The EI command enables interrupt conditions such as motion complete or excess error. The
conditions are selected by the parameter m where m is the bit mask for the selected
conditions as shown below. Prior to using interrupts, interrupts must first be configured
and an interrupt service routine must first be incorporated in the program on the
controller.
ARGUMENTS: EI m,n where
EI 0 clears the interrupt queue
m is an integer between 1 and 65535. m is used to select the interrupt(s) to be used.
n is an integer between 1 and 255. n is used to select the specific input if the value for m
indicates that inputs are to be used for interrupting.
m and n are integer values which represent binary numbers. These binary numbers are used
to logically "AND" with the interrupt registers as described by the following tables. The
use of the values m and n to select the desired bits from the interrupt register is known as
`masking'.
BIT
NO
m =
(2
BIT NO
)
CONDITION
BIT
NO
m =
(2
BIT NO
)
CONDITION
0 1
A profiled motion
complete
8 256
All axes profiled
motion complete
1
2
B profiled motion complete 9
512
Excess position error*
2
4
C profiled motion complete 10
1024
Limit switch
3 8
D profiled motion
complete
11 2048
Watchdog
timer
4
16
E profiled motion complete 12
4096
Reserved
5 32
F profiled motion
complete
13 8192
Application program
stopped
6 64
G profiled motion
complete
14 16384
Command
done
7 128 H profiled motion
complete
15 32768
Inputs* (uses n for
mask)
The * conditions must be re-enabled after each occurrence.
BIT
NO
n=
(2
BIT NO
)
CONDITION
BIT
NO
n=
(2
BIT NO
)
CONDITION
0
1
Input 1
4
16
Input 5
1
2
Input 2
5
32
Input 6
2
4
Input 3
6
64
Input 7
3
8 Input
4
7
128 Input
8