DMC-18x2
Chapter 4 - Software Tools and Communications • 53
Servicing Interrupts
Once an interrupt occurs, the host computer sends an associated Status Byte along with the interrupt
vector. The Status Byte returned denotes what condition has occurred, as described in the table below.
Status Byte (hex) Condition
00 No
interrupt
D9 Watchdog
timer
activated
DA Command
done
DB
Application program done
F0 thru FF
User interrupt
E1 thru E8
Input interrupt
C0
Limit switch occurred
C8 Excess
position
error
D8
All axis motion complete
D7
H axis motion complete
D6
G axis motion complete
D5
F axis motion complete
D4
E axis motion complete
D3
W axis motion complete
D2
Z axis motion complete
D1
Y axis motion complete
D0
X axis motion complete
The recommended method to utilize the interrupts in a host application is to use a pre-defined interrupt
service routine. Where the event routine, on interrupt, will automatically execute and return the Status
Byte. For example, when using the ActiveX toolkit DMCShell control with VB, the
DMCShell1_DMCInterrupt() event procedure (shown below) will automatically execute and return the
StatusByte in the argument. This StausByte can then be used in a case structure as the key to notify the
host application of a specific event or condition.
In this VB example below, the event procedure will display a message box every time the X-axis
motion is complete, assuming the command EI1 was sent to the controller. Note: the argument is
returned as 208 since the status byte is returned as an integer (i.e. D0 hex = 208 decimal).
Private Sub DMCShell1_DMCInterrupt(StatusByte As Integer)
If StatusByte = 208 Then
MsgBox "X axis complete"
End If
End Sub
Hardware Level Communications for PCI
This section of the chapter describes in detail the structures used to communicate with the DMC-18x2
controller at the register interface level. The information in this section is intended for advanced
programmers with extensive knowledge of PCI bus operation.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Summary of Contents for DMC-18 2 Series
Page 3: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Page 5: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Page 11: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...