ADLINK PCI-8102 User Manual

Page 94

Advertising
background image

Operations

83

PCI-8102

GPIO Interrupt Source Bit Settings (1=Enable,0=Disable)

The steps for using interrupts:

1. Use _8102_int_control(CARD_ID, Enable=1/Disable=0);

2. Set interrupt sources for Event or GPIO interrupts.

3. _8102_set_motion_int_facor(AXIS0, 0x01); // Axis0 nor-

mally stop

4. _8102_set_gpio_int_factor(CARD0, 0x01); // DI0 falling

edge

5. _8102_wait_motion_interrupt(AXIS0, 0x01, 1000) // Wait

1000ms for normally stop interrupt

6. _8102_wait_gpio_interrupt(CARD0, 0x01, 1000) // Wait

1000ms for DI0 falling edge interrupt

7. I16 ErrNo=_8102_wait_error_interrupt(AXIS0, 2000); //

Wait 2000ms for error interrupts

Bit

Description

0

DI0 falling edge

1

DI1 falling edge

2

DI2 falling edge

3

DI3 falling edge

4

DI0 raising edge

5

DI1 raising edge

6

DI2 raising edge

7

DI3 raising edge

8

Pin23 input interrupt

9

Pin57 input interrupt

10

Pin23/57 interrupt mode selection (0=falling, 1=raising)

11~14

0

15

GPIO interrupt switch (Always=1)

Advertising