Operation Theory
143
Use Events to handle interrupts under Windows
To detect an interrupt signal from the card in Windows, you must
first create an events array, then use the functions provided by the
card to obtain the interrupt status. A sample program is listed
below:
Steps
:
1. Define a Global Value to deal with interrupt events. Each
event is linked to an axis
HANDLE hEvent[4];
2. Enable interrupt event service and setup interrupt factors
and enable interrupt channel
_8164_int_enable(0,hEvent);
_8164_set_int_factor(0,0x01); // Normal Stop
interrupt
_8164_int_control(0,1);
3. Start move command
_8164_start_tr_move(0,12000,0,10000,0.1,0.1);
4. Wait for axis 0 interrupt event
STS=WaitForSingleObject(hEvent[0],15000);
ResetEvent(hEvent[0]);
if( STS==WAIT_OBJECT_0 )
{
_8164_get_int_status(0, &error, &event);
if( event == 0x01 ) …… ; // Success
}
else if( STS==WAIT_TIME_OUT)
{
// Time out, fail
}
Summary of Contents for MPC-8164
Page 4: ......
Page 12: ......
Page 14: ...2 Introduction Figure 1 1 PCI 8164 block diagram ...
Page 50: ...38 Installation ...
Page 70: ...58 Signal Connections ...
Page 74: ...62 Signal Connections 3 17 1 Isolated input channels 3 17 2 Isolated output channels ...
Page 75: ...Signal Connections 63 3 17 3 Example of input connection ...
Page 76: ...64 Signal Connections 3 17 4 Example of output connections ...
Page 109: ...Operation Theory 97 ...
Page 110: ...98 Operation Theory ...
Page 111: ...Operation Theory 99 ...
Page 112: ...100 Operation Theory ...
Page 113: ...Operation Theory 101 ...
Page 148: ...136 Operation Theory Users can use this function to check if auto trigger is running Results ...
Page 280: ...268 Connection Example Figure 7 2 Connection of PCI 8164 with Panasonic Driver ...
Page 287: ...Connection Example 275 7 3 3 Mechanical Dimensions ...
Page 297: ...Connection Example 285 7 5 2 Mechanical Dimensions ...
Page 300: ...288 Connection Example 7 6 Wiring with DIN 814M J3A ...
Page 304: ...292 Connection Example 7 7 Wiring with DIN 814Y ...
Page 308: ...296 ...