User`s guide
Operation Theorem • 57
{
U32 IntSts;
while(ThreadOn=TRUE)
{
::WaitForSingleObject(hEvent[2],INFINITE);
get_int_status(2,&IntSts);
::ResetEvent(hEvent[2]);
}
return 0;
}
4.Start the thread (Use a boolean value to control the thread’s life)
ThreadOn=TRUE;
AfxBeginThread(IntThreadProc,GetSafeHwnd(),THREAD_PRIORIT
Y_HIGHEST);
5.Before exit the program, remember to let the thread go to end
naturally.
ThreadOn=FALSE;
For each time when a preset movement or homing of axis 2 is completed,
this program will receive a interrupt signal from PCI-8134.
PCI-8134 Interrupt Service Routine (ISR) with DOS
A DOS function library is equipped with PCI-8134 for users to develop
applications under DOS environment. This library also provide some
functions for users to work with ISR. It is highly recommended to write
programs according to the following example for applications should work
with ISR. Since PCI-bus has the ability to do IRQ sharing when multiple
PCI-8134 are applied, each PCI-8134 should have a corresponding ISR.
For users who use the library we provide, the names of ISR are fixed, such
as: _8134_isr0(void), _8134_isr1(void) …etc. The sample program are
described as below. It assume two PCI-8134 are plugged on the slot, axis 1
and axis5 are asked to work with ISR: