Rockwell-automation 1747-PCIS API Software - Open Controller Bedienungsanleitung Seite 38

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 174
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 37
Publication 1747-UM002A-US-P - June 2000
3-6 Developing Applications
/*=======================================================================
= INCLUDE FILES =
=========================================================================*/
#include ”ocapi.h”
#include <stdio.h>
#include <dos.h>
#include <time.h>
#include <conio.h>
#include <string.h>
/*=======================================================================
= MODULE WIDE GLOBAL VARIABLES =
=========================================================================*/
HANDLE Handle; /* Software ID to scanner device */
OCIOCFG OCcfg; /* Chassis I/O config. data structure */
/*=======================================================================
= FUNCTION PROTOTYPES =
=========================================================================*/
void Ioexit( int );
/*=======================================================================
= MAIN PROGRAM =
=========================================================================*/
void main()
{
int retcode; /* Return code from API calls */
int i;
int slots;
int input_slot, input_found = 0;
int output_slot, output_found = 0;
OCINIT ocpart;
BYTE status;
OCVERSIONINFO verinfo;
BYTE swpos;
WORD wData;
/*
** Open the scanner
*/
retcode = OC_OpenScanner( &Handle, 0, 0);
if ( retcode != SUCCESS )
{
printf( ”\nERROR: OC_OpenScanner failed: %d\n”, retcode );
Ioexit( 1 );
}
Access the
scanner.
Seitenansicht 37
1 2 ... 33 34 35 36 37 38 39 40 41 42 43 ... 173 174

Kommentare zu diesen Handbüchern

Keine Kommentare