Galil Motion Control optcom Page 209
Optima DMC-1xxx and DMC-18x2 Command Reference
UI
i
198
UI
FUNCTION: User Interrupt
DESCRIPTION:
The UI command causes an interrupt on the selected IRQ line. There are 16 user interrupts
where UI n, n = 0 through 15. Prior to using the UI command, one IRQ line must be
enabled on the controller and the data 2 and 4 written to the control register at address N
+ 1. An interrupt service routine must also be incorporated in your host program. The
interrupt condition can be read by writing a 6 to address N + 1 and then reading address
N + 1. Refer to the user manual for additional information.
ARGUMENTS: UI n where
n is an integer between 0 and 15.
USAGE: DEFAULTS:
While Moving
Yes
Default Value
0
In a Program
Yes
Default Format
-
Command Line
Yes
Controller Usage
ALL CONTROLLERS
EXAMPLES:
#I Label
PR 10000
Position relative
SP 5000
Speed
BGA Begin
motion
AS
Wait for at speed
UI 1
Send interrupt 1
EN End
program
This program sends an interrupt to the selected IRQ line. The host writes a 6 to address N + 1 and then
reads address N + 1 to receive data E1 which corresponds to UI1.