DMC-40x0 Command Reference
EI • 93
n is an 8-bit integer mask between 0 and 255 and is used to select the specific digital input(s) if bit
15 of m is set (indicating that digital inputs are to be used for interrupting).
bit
n = 2^bit
status byte
Condition
0
$01 (1)
$E1 (225)
Digital input 1 is low @IN[1] = 0*
1
$02 (2)
$E2 (226)
Digital input 2 is low @IN[2] = 0*
2
$04 (4)
$E3 (227)
Digital input 3 is low @IN[3] = 0*
3
$08 (8)
$E4 (228)
Digital input 4 is low @IN[4] = 0*
4
$10 (16)
$E5 (229)
Digital input 5 is low @IN[5] = 0*
5
$20 (32)
$E6 (230)
Digital input 6 is low @IN[6] = 0*
6
$40 (64)
$E7 (231)
Digital input 7 is low @IN[7] = 0*
7
$80 (128)
$E8 (232)
Digital input 8 is low @IN[8] = 0*
The * conditions must be re-enabled with EI after each occurrence.
h is 0-7 or -1 and indicates the preconfigured UDP handle where interrupts should be sent. 0-7
indicates handles A-H, respectively. If the handle specified by h is not UDP or not initialized,
an error will occur (TC1). A -1 disables the interrupt dispatch. GalilTools software will auto
configure h, allowing the user to ignore its use in most cases.
USAGE: DEFAULTS:
While Moving
Yes
Default Value
0, 0,-1
In a Program
Yes
Default Format
---
Command Line
Yes
Controller Usage
DMC-4000
OPERAND USAGE:
_EI contains the interrupt mask m
RELATED COMMANDS:
Interrupt
EXAMPLES:
1. Interrupt when motion is complete on all axes OR if a limit switch is hit:
From the table, enable bits 8 and 10. m = 28 + 210 = 256 + 1024 = 1280
EI
1280
2. Interrupt when digital input 3 is low. Enable bit 15 of m and bit 2 of n.
EI
32768,4
Host Programming Notes:
It is recommended that the third field, h, of EI be left unmodified in embedded DMC code. The
host software (client) can then subscribe to UDP events by establishing a UDP handle to the
controller (server), and issuing EI,,_WH. Unsubscribing is as simple as EI,,-1.
To avoid stale interrupts, the host code can flush the buffer before subscribing (EI0;EI m,n,h).
Содержание DMC-40x0 Series
Страница 2: ......
Страница 4: ......
Страница 10: ...vi i Table of Contents DMC 40x0 Command Reference This Page is Left Blank Intentionally ...