
Operation Theorem
•
59
4.17 Interrupt Control
The PCI-8136M can generate INT signal to host PC according to 8 types of
interrupt factors, refer to
_8136_S_Set_Int_factor()
function for more details.
The following table represents the interrupt setting for all factors.
_8136_S_Set_Int_factor( Cardno, AxisNo, Int_Factor)
AxisNo
Int. Factor
bit
(type)
0
1
2
3
4
5
0
EL1
EL2
EL3
EL4
EL5
EL6
1
ALM
2
ORG1
ORG2
ORG3
ORG4
ORG5
ORG6
3
EZ1
EZ2
EZ3
EZ4
EZ5
EZ6
4
CMP1
CMP2
CMP3
CMP4
CMP5
CMP6
5
Timer
-
-
-
-
-
6
ADC1
ADC2
ADC3
ADC4
ADC5
ADC6
7
INP1
INP2
INP3
-
-
-
Note:
EL is both PEL and MEL, EZ is index signal , CMP is position
compare true, Timer is card’s internal timer, ADC is analog compare
true. INP is motion command finished.
For each axis number, the interrupt can be set according to this table.
Because users can’t deal with interrupt under Windows System. PCI-8136M
has another way for user to receive interrupts. That is Windows message
system. This card uses events to notice user’s program if interrupt is coming.
Users can create a thread to get the interrupt events and then use
_8136_S_Get_Int_Status()
to get the interrupt status. The status bits for
each axis is in the following table:
_8136_S_Get_Int_Status(Cardno, AxisNo, Status )
Bits
Description
0
Positive limit switch interrupt
1
Negative limit switch interrupt
2
Alarm pin interrupt
3
ORG pins interrupt
4
Index signal interrupt
5
Position counter compare interrupt
6
Internal timer interrupt
7
Analog compared interrupt
8
Motion command finished