38
Operation Theory
_8136_S_Get_Int_Status(Cardno, AxisNo, Status)
Use Thread to deal with Interrupt under Windows NT/95
In order to detect the interrupt signal from PCI-8136 under Win-
dows NT/95, users must create a thread routine first. Then use
APIs provided by PCI-8136 to get the interrupt signal. Each card
has 7 events for these interrupts. Event 0 ~ 5 stands for channel
0~5 and event 6 stands for timer interrupt and alarm interrupt. The
sample program is as follows:
Situation
: Assume that we have one card and want to receive
Timer interrupt.
Steps
:
1. Define a Global Value to deal with interrupt event
HANDLE hEvent[7];
volatile bool ThreadOn;
2. In Initializing Section (you must Initialize PCI-8136 prop-
erly first), set interrupt types and enable an event for
each axis.
_8136_S_Set_Int_Factor(0,0, 0x40);
_8136_S_INT_Control(0,1);
_8136_INT_Enable(0,&hEvent[0]);
Note: For each card, you must assign a 7-events-array in
_8136_INT_Enable
function.
Bits
Description
0
Digital Input pin 6/8/10/12/14/16 interrupt
1
Digital Input pin 7/9/11/13/15/17 interrupt
2
Digital Input pin 18 interrupt
3
Digital Input pin 0~5 interrupt
4
Index signal interrupt
5
Position counter compare interrupt
6
Internal timer interrupt
7
Analog compared interrupt
Table 4-1: _8136_S_Get_Int_Status
Содержание PCI-8136
Страница 4: ......
Страница 20: ...12 Installation...
Страница 32: ...24 Signal Connections Figure 3 7 Connect to open collector output...
Страница 48: ...40 Operation Theory...
Страница 72: ...64 Function Library...
Страница 78: ...70 Appendix 12 A save finish window will appear 13 Press Exit button to exit utility...
Страница 80: ...72 Appendix Channel 2 Channel 3...
Страница 81: ...Appendix 73 Channel 4 Channel 5...
Страница 82: ...74 Appendix...