![Galil Motion Control DMC-1600 Series Скачать руководство пользователя страница 64](http://html1.mh-extra.com/html/galil-motion-control/dmc-1600-series/dmc-1600-series_user-manual_3256992064.webp)
3 Input
4
4 Input
5
5 Input
6
6 Input
7
7 Input
8
User Interrupts (UI command)
The DMC-1600 also provides 16 User Interrupts which can be sent by executing the command UIn, where n is an
integer between 0 and 15. The UI command does not require the EI command. UI commands are useful in DMC
programs to let the host application know that certain points within the DMC program have occurred.
Servicing Interrupts
Once an interrupt occurs, the controller sends a Status Byte to the host computer. 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 (UI)
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, which 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
56
•
Chapter 4 - Software Tools and Communications
DMC-1600