Rockwell-automation 1747-PCIS API Software - Open Controller Manuel d'utilisateur Page 43

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 174
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 42
Publication 1747-UM002A-US-P - June 2000
Developing Applications 3-11
OC_ExtendedErrorMsg(Handle, &exterr, &msg);
printf(”\nERROR: %s\n”, msg);
}
}
OC_CloseScanner(Handle);
exit(retcode);
} /* end Ioexit() */
Programming Example for
Windows NT
The following Windows NT example (sample.c on your Windows
NT API disk) shows how to program the above steps. Callouts on the
right margin identify the code for each step.
/********************************************************************
* Title: Simple application sample code for 1746 I/O PCI Interface API
*
* Abstract:
*
* This file contains a simple application using the PCI
* bus interface API.
*
* Environment:
* 1747-PCIS 1746 I/O PCI Interface
* Microsoft Windows NT 4.0
* Microsoft Visual C++ / Borland C++
* (c)Copyright Allen-Bradley *
************************************************************************/
/*=======================================================================
= INCLUDE FILES =
=======================================================================*/
#include <windows.h>
#include <process.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <conio.h>
#include <string.h>
#include "ocapi.h"
/*=======================================================================
= MODULE WIDE GLOBAL VARIABLES =
=======================================================================*/
HANDLE OChandle;
OCIOCFG OCcfg;
/************************************************************************
* Entry point:
* Ioexit
*
* Description:
* Common error handling routine. This routine displays any
* extended error and exits the program.
*
* Arguments:
* rc : int ( input )
* This error code is passed to the exit() routine.
Vue de la page 42
1 2 ... 38 39 40 41 42 43 44 45 46 47 48 ... 173 174

Commentaires sur ces manuels

Pas de commentaire