Rockwell-automation 1747-PCINT API Software for 1746 I/O Bedienungsanleitung Seite 135

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 155
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 134
OC_WaitForEosDmdIn Library of Routines 6–81
Publication 1747-6.5.3 June 1998
Example:
HANDLE handle;
intrc;
MSGBUF eosMSG
/* Request an input scan, but don’t wait */
OC_DemandInputScan(handle, OCNOWAIT);
/* Could have other code here */
/* Wait 1 second for the EOS */
rc = OC_WaitForEosDmdIn(handle, 1000);
switch(rc) {
case SUCCESS:/* got EOS*/
/* reset the EOS_DMDIN event*/
OC_PollScanner (handle,OCMSG_EOS_DMDIN,&eosMSG);
/* do logic, etc. synchronized with the I/O scan */
break;
case ERR_OCRESPONSE:/* timed out */
printf(“\nTimed out waiting for EOS\n”);
break;
default;
printf(“\nError!\n”);
break;
}
Seitenansicht 134
1 2 ... 130 131 132 133 134 135 136 137 138 139 140 ... 154 155

Kommentare zu diesen Handbüchern

Keine Kommentare