Rockwell-automation 1747-PCIS API Software - Open Controller Instrukcja Użytkownika Strona 129

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 174
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 128
Publication 1747-UM002A-US-P - June 2000
Library of Routines 6-69
OC_WaitForEos
Blocks the calling thread until an end-of-scan (EOS) notification is
received from the scanner or
msTimeout milliseconds have elapsed.
Syntax:
int OC_WaitForEos(HANDLE handle, DWORD msTimeout)
Parameters:
Description:
If an EOS message has been received since the last OCMSG_EOS
message was retrieved with the OC_PollScanner function,
OC_WaitForEos returns SUCCESS immediately.
You can use this function to synchronize a control application with
the I/O scan. See the OC_EnableEOSNotify function.
Return Value:
Considerations:
Supported in the Windows NT API library only.
Example:
HANDLE handle;
intrc;
MSGBUF eosMSG
/* Wait for 10 seconds for the EOS */
rc = OC_WaitForEos(handle, 10000);
switch(rc) {
case SUCCESS: /* got EOS*/
/* reset the EOS event*/
OC_PollScanner (handle,OCMSG_EOS,&eosMSG);
break;
case ERR_OCRESPONSE:/* timed out */
printf(“\nTimed out waiting for EOS\n”);
break;
default;
printf(“\nError!\n”);
break;
}
Parameter: Description:
handle Must be a valid handle returned from OC_OpenScanner
msTimeout Specifies the number of milliseconds to wait
Set to INFINITE to wait forever
Name: Value: Description:
SUCCESS 0 an EOS message was received
ERR_RESPONSE 10
msTimeout milliseconds elapsed without an EOS
ERR_OCACCESS 2
handle does not have access to scanner
Przeglądanie stron 128
1 2 ... 124 125 126 127 128 129 130 131 132 133 134 ... 173 174

Komentarze do niniejszej Instrukcji

Brak uwag