Controller Event Interrupts and User Interrupts
The DMC-1600 provides a hardware interrupt line that will, when enabled, interrupt the PC bus, which will allow
the controller to notify the host application of particular events occurring on the controller. Interrupts free the host
from having to poll for the occurrence of certain events such as motion complete or excess position error.
The DMC-1600 uses only one of the PC’s interrupts; however, it is possible to interrupt on multiple conditions. For
this reason, the controller provides a status byte register that contains a byte designating each condition.
The DMC-1600 provides an interrupt buffer that is 16 deep. This allows for multiple interrupt conditions to be
stored in sequence of occurrence without loss of data.
The DMC-1600 provides two command forms of interrupt functionality, EI and UI. Specific interrupt conditions can
be enabled using the EI command, or explicit user defined interrupts can be sent using the UI command.
Enabling Event Interrupts (EI command)
To enable certain conditions, use the command EIm,n. Where the first field “m” represents a 16-
bit value of conditions described in the table below. For example, to enable interrupts on X and Y
motion complete and position error, set EI515 (i.e. 515=2
0
+2
1
+2
9
). Once the EI command is
enabled for a specific condition, an interrupt will occur for every instance of that condition, except
for the items marked with an asterisk (*), they must be re-enabled after every occurrence.
Bit Number
Condition
0
X motion complete
1
Y motion complete
2 Z
motion
complete
3
W motion complete
4 E
motion
complete
5
F motion complete
6
G motion complete
7
H motion complete
8
All axes motion complete
9 Excess
position
error*
10 Limit
switch
11 Watchdog
timer
12 Reserved
13
Application program stopped
14
Command done †
15
Inputs* (uses n for mask)
†Not used when using new version 7 drivers.
The argument “n” enables interrupts for the first 8 general inputs. To enable interrupts for the desired inputs, set bit
15 of the “m” argument, then set the desired inputs using the 8-bit mask for the “n” argument. For example, to
enable interrupt on inputs 1-4, set EI32768,15. Note that the input interrupts must be reset for all inputs after any
input has caused an interrupt.
Bit number
Input
0 Input
1
1 Input
2
2 Input
3
DMC-1600
Chapter 4 - Software Tools and Communications
•
55