Operation Theory
39
3. Define a Global Function (Thread Body). Use WaitForS-
ingleObject() or WaitForMultipleObjects() to wait events.
Remember to reset this event after you get the event.
UINT IntThreadProc(LPVOID pParam)
{
U32 IntSts;
while(ThreadOn==TRUE)
{
::WaitForSingleObject(hEvent[6],INFINITE);
_8136_S_Get_Int_status(0,0,&IntSts);
::ResetEvent(hEvent[6]);
}
return 0;
}
4. Start the thread( Use a boolean value to control the
thread's life )
ThreadOn=TRUE;
AfxBeginThread(IntThreadProc,GetSafeHwnd(),THREA
D_PRIORITY_NORMAL);
5. Before exiting the program, remember to let the thread
go to end naturally.
ThreadOn=FALSE;
Note: If users need to deal interrupt under VB6.0. Please refer to
section 5.7 for details.
We suggest user creates a thread and uses
WaitForSingleOb-
ject
() for each event in order to guarantee proper performance.
Summary of Contents for PCI-8136
Page 4: ......
Page 20: ...12 Installation...
Page 32: ...24 Signal Connections Figure 3 7 Connect to open collector output...
Page 48: ...40 Operation Theory...
Page 72: ...64 Function Library...
Page 78: ...70 Appendix 12 A save finish window will appear 13 Press Exit button to exit utility...
Page 80: ...72 Appendix Channel 2 Channel 3...
Page 81: ...Appendix 73 Channel 4 Channel 5...
Page 82: ...74 Appendix...